diff options
Diffstat (limited to 'private/oleauto/tools')
181 files changed, 68307 insertions, 0 deletions
diff --git a/private/oleauto/tools/win16/hdos/bin/ml.err b/private/oleauto/tools/win16/hdos/bin/ml.err new file mode 100644 index 000000000..7b3386fb3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/bin/ml.err @@ -0,0 +1,259 @@ +FATAL +cannot open file +I/O error closing file +I/O error writing file +I/O error reading file +out of far memory +assembler limit : macro parameter name table full +invalid command-line option +nesting level too deep +unmatched macro nesting +line too long +unmatched block nesting +directive must be in control block +error count exceeds 100; stopping assembly +invalid numerical command-line argument +too many arguments +statement too complex +N/A +missing source filename +SEVERE +memory operand not allowed in context +immediate operand not allowed +cannot have more than one ELSE clause per IF block +extra characters after statement +symbol type conflict +symbol redefinition +undefined symbol +non-benign record redefinition +syntax error +syntax error in expression +invalid type expression +distance invalid for word size of current segment +PROC, MACRO, or macro repeat directive must precede LOCAL +.MODEL must precede this directive +cannot define as public or external +segment attributes cannot change +expression expected +operator expected +invalid use of external symbol +operand must be RECORD type or field +identifier not a record +record constants may not span line breaks +instruction operands must be the same size +instruction operand must have size +invalid operand size for instruction +operands must be in same segment +constant expected +operand must be a memory expression +expression must be a code address +multiple base registers not allowed +multiple index registers not allowed +must be index or base register +invalid use of register +invalid INVOKE argument +must be in segment block +DUP too complex +too many initial values for structure +statement not allowed inside structure definition +missing operand for macro operator +line too long +segment register not allowed in context +string or text literal too long +statement too complex +identifier too long +invalid character in file +missing angle bracket or brace in literal +missing single or double quotation mark in string +empty (null) string +nondigit in number +syntax error in floating-point constant +real or BCD number not allowed +text item required +forced error +forced error : value equal to 0 +forced error : value not equal to 0 +forced error : symbol not defined +forced error : symbol defined +forced error : string blank +forced error : string not blank +forced error : strings equal +forced error : strings not equal +[ELSE]IF2/.ERR2 not allowed : single-pass assembler +expression too complex for .UNTILCXZ +can ALIGN only to power of 2 +structure alignment must be 1, 2, or 4 +expected +incompatable CPU mode and segment size +LOCK must be followed by a memory operation +instruction prefix not allowed +no operands allowed for this instruction +invalid instruction operands +initializer magnitude too large for specified size +cannot access symbol in given segment or group +operands have different frames +cannot access label through segment registers +jump destination too far +jump destination must specify a label +instruction does not allow NEAR indirect addressing +instruction does not allow FAR indirect addressing +instruction does not allow FAR direct addressing +jump distance not possible in current CPU mode +missing operand after unary operator +cannot mix 16- and 32-bit registers +invalid scale value +constant value too large +instruction or register not accepted in current CPU mode +reserved word expected +instruction form requires 80386/486 +END directive required at end of file +too many bits in RECORD +positive value expected +index value past end of string +count must be positive or zero +count value too large +operand must be relocatable +constant or relocatable label expected +segment, group, or segment register expected +segment expected +invalid operand for OFFSET +invalid use of external absolute +segment or group not allowed +cannot add two relocatable labels +cannot add memory expression and code label +segment exceeds 64K limit +invalid type for a data declaration +HIGH and LOW require immediate operands +N/A +cannot have implicit far jump or call to near label +use of register assumed to ERROR +only white space or comment can follow backslash +COMMENT delimiter expected +conflicting parameter definition +PROC and prototype calling conventions conflict +invalid radix tag +INVOKE argument type mismatch : argument +invalid coprocessor register +instructions and initialized data not allowed in AT segments +/AT switch requires the TINY memory model +cannot have segment address references with TINY model +language type must be specified +PROLOGUE must be macro function +EPILOGUE must be macro procedure +alternate identifier not allowed with EXTERNDEF +text macro nesting level too deep +N/A +missing macro argument +EXITM used inconsistently +macro function argument list too long +N/A +VARARG parameter must be last parameter +VARARG parameter not allowed with LOCAL +VARARG parameter requires C calling convention +ORG needs a constant or local offset +register value overwritten by INVOKE +structure too large to pass with INVOKE : argument +not overriding private proc as public +too many arguments to INVOKE +too few arguments to INVOKE +invalid data initializer +N/A +RET operand too large +too many operands to instruction +cannot have more than one .ELSE clause per .IF block +expected data label +cannot nest procedures +EXPORT must be FAR +procedure declared with two visibility attributes +macro label not defined +invalid symbol type in expression +byte register cannot be first operand +word register cannot be first operand +special register cannot be first operand +coprocessor register cannot be first operand +cannot change size of expression computations +syntax error in control-flow directive +cannot use 16-bit register with a 32-bit address +constant value out of range +missing right parenthesis +type is wrong size for register +structure cannot be instanced +non-benign structure redefinition: label incorrect +non-benign structure redefinition: too few labels +OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed +non-benign structure redefinition: incorrect initializers +non-benign structure redefinition: too few initializers +non-benign structure redefinition: label has incorrect offset +structure field expected +unexpected literal found in expression +N/A +divide by zero in expression +directive must appear inside a macro +cannot expand macro function +too few bits in RECORD +macro function cannot redefine itself +N/A +invalid qualified type +floating-point initializer on an integer variable +nested structure improperly initialized +invalid use of FLAT +structure improperly initialized +improper list initialization +initializer must be a string or single item +initializer must be a single item +initializer must be a single byte +improper use of list initializer +improper literal initialization +extra characters in literal initialization +must use floating-point initializer +cannot use .EXIT for OS_OS2 with .8086 +invalid combination with segment alignment +INVOKE requires prototype for procedure +cannot include structure in self +symbol language attribute conflict +non-benign COMM redefinition +COMM variable exceeds 64K +parameter or local cannot have void type +cannot use TINY model with OS_OS2 +expression size must be 32 bits +.EXIT does not work with 32-bit segments +.STARTUP does not work with 32-bit segments +ORG directive not allowed in unions +D/T +illegal use of segment register +cannot declare scoped code label as PUBLIC +.MSFLOAT directive is obsolete : .MSFLOAT ignored +ESC instruction is obsolete : ESC ignored +missing operator in expression +missing right parenthesis in expression +missing left parenthesis in expression +reference to forward macro definition +LEVEL 1 +cannot modify READONLY segment +N/A +non-unique STRUCT/UNION field used without qualification +start address on END directive ignored with .STARTUP +cannot ASSUME CS +unknown default prologue argument +too many arguments in macro call +option untranslated, directive required +invalid command-line option value, default is used +insufficent memory for /EP : /EP ignored +expected '>' on text literal +multiple .MODEL directives found : .MODEL ignored +line number information for segment without class 'CODE' +instructions and initialized data not supported in AT segments +LEVEL 2 +@@: label defined but not referenced +expression expected, assume value 0 +EXTERNDEF previously assumed to be external +length of symbol previously assumed to be different +symbol previously assumed to not be in a group +types are different +LEVEL 3 +N/A +no return from procedure +N/A +conditional jump lengthened +procedure argument or local not referenced +expression may be pass-dependent diff --git a/private/oleauto/tools/win16/hdos/bin/rcpp.err b/private/oleauto/tools/win16/hdos/bin/rcpp.err new file mode 100644 index 000000000..d26c8494d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/bin/rcpp.err @@ -0,0 +1,334 @@ +/* SCCSWHAT( "@(#)c1.err 2.29 88/02/25 18:18:00 " ) */ + /* fatals */ + +1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Technical Support" +1002 "out of heap space" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected EOF" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1008 "no input file specified" +1009 "compiler limit : macros too deeply nested" +1010 "compiler limit : macro expansion too big" +1012 "bad parenthesis nesting - missing '%c'" +1013 "cannot open source file '%s'" +1014 "too many include files" +1015 "cannot open include file '%s'" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected '#elif'" +1019 "unexpected '#else'" +1020 "unexpected '#endif'" +1021 "bad preprocessor command '%s'" +1022 "expected '#endif'" +1023 "no int size specified" +1024 "no ptr size specified" +1025 "no function size specified" +1026 "parser stack overflow, please simplify your program" +1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */ +1028 "%s segment allocation exceeds 64K" /* QC */ +1031 "compiler limit : function calls too deeply nested" /* QC, c23 */ +1032 "cannot open object listing file '%s'" /* QC, c23 */ +1035 "expression too complex, please simplify" /* QC, c23 */ +1037 "cannot open object file '%s'" /* QC, c23 */ +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "floating point overflow" +1047 "too many %s flags, '%s'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1052 "too many #if/#ifdef's" +1053 "compiler limit : struct/union nesting" +1054 "compiler limit : initializers too deeply nested" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected EOF in macro expansion (missing ')'?)" +1059 "out of near heap space" +1060 "out of far heap space" +1061 "compiler limit : blocks too deeply nested" /* QC */ +1062 "error writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" /* QC */ +1064 "compiler limit : identifier overflowed internal buffer" +1065 "compiler limit : declarator too complex" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Technical Support" + + /* errors */ + +2001 "newline in constant" +2002 "out of macro actual parameter space" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%s'" +2006 "#include expected a file name, found '%s'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%s'" +2010 "'%c' : unexpected in formal list" +2011 "'%s' : definition too big" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first non-whitespace" +2015 "too many chars in constant" +2016 "no closing single quote" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor command, found '%c'" +2020 "bad octal number '%c'" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for char" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" +2026 "'%s' : member of enum redefinition" +2028 "struct/union member needs to be inside a struct/union" +2029 "'%Fs' : bit-fields only allowed in structs" +2030 "'%Fs' : struct/union member redefinition" +2031 "'%Fs' : function cannot be struct/union member" +2032 "'%Fs' : base type with near/far/huge not allowed" +2033 "'%Fs' : bit-field cannot have indirection" +2034 "'%Fs' : bit-field type too small for number of bits" +2035 "enum/struct/union '%Fs' : unknown size" +2036 "left of '%s%s' must have a struct/union type" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" +2039 "'->' requires struct/union pointer" +2040 "'.' requires struct/union name" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%s' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2050 "non-integral switch expression" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "case value %d already used" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%s'" +2060 "syntax error : EOF" +2061 "syntax error : identifier '%s'" +2062 "type '%s' unexpected" +2063 "'%s' : not a function" +2064 "term does not evaluate to a function" +2065 "'%s' : undefined" +2066 "cast to function returning . . . is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast" +2069 "cast of 'void' term to non-void" +2070 "illegal sizeof operand" +2071 "'%Fs' : bad storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : cannot initialize array in function" +2074 "'%Fs' : cannot initialize struct/union in function" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" +2077 "non-integral field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined struct/union '%Fs'" +2082 "redefinition of formal parameter '%Fs'" +2083 "array '%Fs' already has a size" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "use of undefined enum/struct/union '%s'" +2089 "typedef specifies a near/far function" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "cannot initialize a static or struct with address of automatic vars" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual has type void : parameter %d" +2096 "struct/union comparison illegal" +2097 "illegal initialization" +2098 "non-address expression" +2099 "non-constant offset" +2100 "illegal indirection" +2101 "'&' on constant" +2102 "'&' requires lvalue" +2103 "'&' on register variable" +2104 "'&' on bit-field ignored" +2105 "'%s' needs lvalue" +2106 "'%s' : left operand must be lvalue" +2107 "illegal index, indirection not allowed" +2108 "non-integral index" +2109 "subscript on non-array" +2110 "'+' : 2 pointers" +2111 "pointer + non-integral value" +2112 "illegal pointer subtraction" +2113 "'-' : right operand pointer" +2114 "'%s' : pointer on left; needs integral right" +2115 "'%s' : incompatible types" +2116 "'%s' : bad %s operand" +2117 "'%s' : illegal for struct/union" +2118 "negative subscript" +2119 "'typedefs' both define indirection" +2120 "'void' illegal with all types" +2121 "typedef specifies different enum" +2122 "typedef specifies different struct" +2123 "typedef specifies different union" +2125 "%Fs : allocation exceeds 64K" /* QC, c23 */ +2126 "%Fs : auto allocation exceeds %s" /* QC, c23 */ +2127 "parameter allocation exceeds 32K" /* QC, c23 */ +2130 "#line expected a string containing the file name, found '%s'" +2131 "attributes specify more than one near/far/huge" +2132 "syntax error : unexpected identifier" +2133 "array '%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" +2135 "missing ')' in macro expansion" +2137 "empty character constant" +2138 "unmatched close comment '*/'" +2139 "type following '%s' is illegal" +2140 "argument type cannot be function returning . . ." +2141 "value out of range for enum constant" +2142 "ellipsis requires three periods" +2143 "syntax error : missing '%s' before '%s'" +2144 "syntax error : missing '%s' before type '%Fs'" +2145 "syntax error : missing '%s' before identifier" +2146 "syntax error : missing '%s' before identifier '%s'" +2147 "unknown size" +2148 "array too large" +2149 "'%Fs' : named bit-field cannot have 0 width" +2150 "'%Fs' : bit-field must have type int, signed int, or unsigned int" +2151 "more than one cdecl/fortran/pascal attribute specified" +2152 "'%s' : pointers to functions with different attributes" +2153 "hex constants must have at least 1 hex digit" +2154 "'%s' : does not refer to a segment" +2155 "'%s' : already in a segment" +2156 "pragma must be at outer level" +2157 "'%s' : must be declared before use in pragma list" +2158 "'%s' : is a function" +2159 "more than one storage class specified" +2160 "## cannot occur at the beginning of a macro definition" +2161 "## cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%s' : not available as an intrinsic" +2164 "'%s' : intrinsic was not declared" +2165 "'%s' : cannot modify pointers to data" +2166 "lval specifies 'const' object" +2167 "'%Fs' : too many actual parameters for intrinsic" +2168 "'%Fs' : too few actual parameters for intrinsic" +2169 "'%Fs' : is an intrinsic, it cannot be defined" +2170 "'%s' : intrinsic not declared as a function" +2171 "'%s' : bad operand" +2172 "'%Fs' : actual is not a pointer : parameter %d" +2173 "'%Fs' : actual is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual has type void : parameter %d, parameter list %d" +2175 "'%Fs' : unresolved external" /* QC */ +2176 "static far data not supported" /* QC */ +2177 "constant too big" +2178 "'%s' : storage class for same_seg variables must be 'extern'" +2179 "'%Fs' : was used in same_seg, but storage class is no longer 'extern'" +2180 "controlling expression has type 'void'" +2181 "pragma requires command line option '%s'" /* QC */ +2182 "'%Fs' : 'void' on variable" +2183 "'%Fs' : 'interrupt' function must be 'far'" +2184 "'%Fs' : '%s' function cannot be 'pascal/fortran'" +2186 "'%Fs' : 'saveregs/interrupt' modifiers mutually exclusive" +2187 "cast of near function pointer to far function pointer" +2188 "#error : %s" +2190 "'%s' : is a text segment" +2191 "'%s' : is a data segment" +2192 "'%s' : function has already been defined" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Technical Support" + + /* warnings */ + +4001 "macro '%s' requires parameters" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "missing close parenthesis after 'defined'" +4005 "'%s' : redefinition" +4006 "#undef expected an identifier" +4009 "string too big, trailing chars truncated" +4011 "identifier truncated to '%s'" +4012 "float constant in a cross compilation" +4013 "constant too big" +4014 "'%Fs' : bit-field type must be unsigned" +4015 "'%Fs' : bit-field type must be integral" +4016 "'%s' : no function return type, using 'int' as default" +4017 "cast of int expression to far pointer" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch : parameter %d" +4024 "'%Fs' : different types : parameter %d" +4025 "function declaration specified variable argument list" +4026 "function was declared with formal argument list" +4027 "function was declared without formal argument list" +4028 "parameter %d declaration different" +4029 "declared parameter list different from definition" +4030 "first parameter list is longer than the second" +4031 "second parameter list is longer than the first" +4032 "unnamed struct/union as parameter" +4033 "function must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unexpected formal parameter list" +4037 "'%Fs' : formal parameters ignored" +4038 "'%Fs' : formal parameter has bad storage class" +4039 "'%Fs' : function used as an argument" +4040 "near/far/huge on '%Fs' ignored" +4041 "formal parameter '%s' is redefined" +4042 "'%Fs' : has bad storage class" +4044 "huge on '%Fs' ignored, must be an array" +4045 "'%s' : array bounds overflow" +4046 "'&' on function/array, ignored" +4047 "'%s' : different levels of indirection" +4048 "array's declared subscripts different" +4049 "'%s' : indirection to different types" +4051 "data conversion" +4052 "different enum types" +4053 "at least one void operand" +4060 "conversion of long address to short address" /* QC, c23 */ +4061 "long/short mismatch in argument : conversion supplied" /* QC, c23 */ +4062 "near/far mismatch in argument : conversion supplied" /* QC, c23 */ +4067 "unexpected characters following '%s' directive - newline expected" +4068 "unknown pragma" +4071 "'%Fs' : no function prototype given" +4074 "non standard extension used - '%s'" +4075 "size of switch expression or case constant too large - converted to int" +4076 "'%s' : may be used on integral types only" +4077 "unknown check_stack option" +4079 "unexpected token '%s'" +4080 "expected 'identifier' for segment name, found '%s'" +4081 "expected a comma, found '%s'" +4082 "expected an identifier, found '%s'" +4083 "expected '(', found '%s'" +4084 "expected a pragma keyword, found '%s'" +4085 "expected [on | off]" +4086 "expected [1 | 2 | 4]" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch : parameter %d, parameter list %d" +4089 "'%Fs' : different types : parameter %d, parameter list %d" +4090 "different 'const' attributes" +4091 "no symbols were declared" +4092 "untagged enum/struct/union declared no symbols" +4093 "unescaped newline in character constant in non-active code" +4094 "unexpected newline" +4095 "expected ')', found '%s'" +4096 "huge treated as far" /* QC */ +4098 "void function returning a value" +4099 "expected ')', (too many arguments?)" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : function definition used as prototype" +4104 "'%s' : near data in same_seg pragma, ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires integer between 1 and 127" +4107 "pragma requires integer between 15 and 255" +4108 "pragma requires integer between 79 and 132" +4109 "unexpected identifier '%s'" +4110 "unexpected token 'int constant'" +4111 "unexpected token 'string'" +4112 "macro name '%s' is reserved, %s ignored" +4113 "function parameter lists differed" +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Technical Support" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/c1.err b/private/oleauto/tools/win16/hdos/c800/bin/c1.err new file mode 100644 index 000000000..fa4b34783 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/c1.err @@ -0,0 +1,1088 @@ +/* SCCSWHAT( "@(#)c1.err 3.56 89/12/06 13:43:09 " ) */ + /* warnings */ + +4001 "nonstandard extension 'single line comment' was used" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "incorrect construction after 'defined'" +4005 "'%Fs' : macro redefinition" +4006 "#undef expected an identifier" +4007 "'%Fs' : must be '%Fs'" +4008 "'%Fs' : '%Fs' attribute ignored" +4009 "string too big; trailing characters truncated" +4010 "single-line comment contains line-continuation character" +4011 "'%Fs' : identifier was truncated to '%d' characters" +4012 "float constant in a cross compilation" /* XC */ +4013 "'%Fs' undefined; assuming extern returning int" +4014 "concatenating mismatched wide strings" +4015 "'%Fs' : type of bit field must be integral" +4016 "'%s' : no function return type; using 'int' as default" /* C6 */ +4017 "cast of 'int' expression to far pointer" +4018 "'%Fs' : signed/unsigned mismatch" +4019 "empty statement at global scope" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch for actual parameter %d" +4023 "'%Fs' : based pointer passed to unprototyped function : parameter %d" +4024 "'%Fs' : different types for formal and actual parameter %d" +4025 "'%Fs' : based pointer passed to function with variable arguments: parameter %d" +4026 "function declared with formal parameter list" +4027 "function declared without formal parameter list" +4028 "formal parameter %d different from declaration" +4029 "declared formal parameter list different from definition" +4030 "first formal parameter list longer than the second list" +4031 "second formal parameter list longer than the first list" +4032 "formal parameter %d has different type when promoted" +4033 "'%Fs' must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unnamed %Fs as actual parameter" +4037 "conflicting ambient class modifiers" +4038 "'%Fs' : illegal ambient class modifier" +4039 "ambient class modifier on reference ignored" +4040 "memory attribute on '%Fs' ignored" +4041 "compiler limit : terminating browser output" +4042 "'%Fs' : has bad storage class" +4043 "function specifier used more than once" +4044 "specifier __huge on '%Fs' ignored; can only be applied to array" +4045 "'%Fs' : array bounds overflow" +4046 "'%Fs' : unsized array treated as %Fs" +4047 "'%Fs' : different levels of indirection" +4048 "different declared array subscripts" +4049 "'%Fs' : indirection to different types" +4050 "'%Fs' : different code attributes" +4051 "type conversion; possible loss of data" +4052 "function declarations different; one contains variable arguments" +4053 "one void operand for '?:'" +4054 "'%Fs' : from function pointer '%Fs' to data pointer '%Fs'" +4055 "'%Fs' : from data pointer '%Fs' to function pointer '%Fs'" +4056 "overflow in floating-point constant arithmetic" +4057 "'%Fs' : indirection to slightly different base types" +4058 "unions are now aligned on alignment requirement, not size" +4059 "pascal string too big, length byte is length % 256" + +4060 "switch statement contains no 'case' or 'default' labels" +4061 "enumerate '%Fs' in switch of enum '%Fs' is not explicitly handled by a case label" +4062 "enumerate '%Fs' in switch of enum '%Fs' is not handled" +4063 "case '%ld' is not a valid value for switch of enum '%Fs'" +4064 "switch of incomplete enum '%Fs'" +4065 "switch statement contains 'default' but no 'case' labels" + +4067 "unexpected characters following '%Fs' directive - newline expected" +4068 "unknown pragma" +4069 "long double is the same precision as double" +4070 "return of a 'void' expression" +4071 "'%Fs' : no function prototype given" +4072 "'%Fs' : no function prototype on __fastcall function" +4073 "initializers put in library initialization area" +4074 "initializers put in compiler reserved initialization area" +4075 "initializers put in unrecognized initialization area" +4076 "'%Fs' : can be used on integral types only" +4077 "unknown check_stack option" +4078 "case constant '%ld' too big for the type of the switch expression" +4079 "unexpected token '%Fs'" +4080 "expected identifier for segment name; found '%Fs'" +4081 "expected a comma; found '%Fs'" +4082 "expected an identifier; found '%Fs'" +4083 "expected '('; found '%Fs'" +4084 "expected a pragma directive; found '%Fs'" +4085 "expected pragma parameter to be 'on' or 'off'" +4086 "expected pragma parameter to be '1', '2', '4', '8', or '16'" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch in actual parameter %d, formal parameter %d" +4089 "'%Fs' : different types in actual parameter %d, formal parameter %d" +4090 "'%Fs' : different const or volatile qualifiers" +4091 "no symbols were declared" +4092 "sizeof returns 'unsigned long'" +4093 "unescaped newline in character constant in inactive code" +4094 "untagged '%Fs' declared no symbols" +4095 "expected ')'; found '%Fs'" +4096 "'%Fs' must be used with '%Fs'" +4097 "nonstandard extension : typedef-name '%Fs' used as synonym for class-name '%Fs'" +4098 "'%Fs' : 'void' function returning a value" +4099 "'%Fs' : type name first seen using '%Fs' now seen using '%Fs'" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : used #pragma pack to change alignment" +4104 "'%Fs' : near data in same_seg pragma; ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires an integer between 1 and 127" +4107 "pragma requires an integer between 15 and 255" +4108 "pragma requires an integer between 79 and 132" +4109 "unexpected identifier '%Fs'" +4110 "unexpected token 'number'" +4111 "unexpected token 'string'" +4112 "#line requires an integer between 1 and 32767" +4113 "function parameter lists differed" +4114 "same type qualifier used more than once" +4115 "'%Fs' : named type definition in parentheses" +4116 "unnamed type definition in parentheses" +4117 "macro name '%Fs' is reserved, '%Fs' ignored" +4118 "pragma not supported during fast compile" +4119 "different bases '%Fs' and '%Fs' specified" +4120 "based/unbased mismatch" +4121 "'%Fs' : alignment of a member was sensitive to packing" +4122 "'%Fs' : alloc_text applicable only to functions with C linkage" +4123 "different base expressions specified" +4124 "__fastcall with stack checking is inefficient" +4125 "decimal digit terminates octal escape sequence" +4126 "'%c' : unknown memory-model command-line option" +4127 "conditional expression is constant" +4128 "storage-class specifier after type" +4129 "'%c' : unrecognized character escape sequence" +4130 "'%Fs' : logical operation on address of string constant" +4131 "'%Fs' : uses old-style declarator" +4132 "'%Fs' : const object should be initialized" +4133 "'%Fs' : incompatible types - pointer to 'void' combined with pointer to type" +4134 "conversion between pointers to members of same class" +4135 "conversion between different integral types" +4136 "conversion between different floating-point types" +4137 "'%Fs' : no return value from floating-point function" +4138 "'*/' found outside of comment" +4139 "'0x%lx' : hex escape sequence is out of range" +4140 "'%Fs' : redefined, preceding references may be invalid" /* QC */ +4141 "'%Fs' : used more than once" +4142 "benign redefinition of type" +4143 "pragma 'same_seg' not supported; use __based allocation" +4144 "'%Fs' : relational expression as switch expression" +4145 "'%Fs' : relational expression as switch expression; possible confusion with '%Fs'" +4146 "unary minus operator applied to unsigned type, result still unsigned" +4147 "'%Fs' : '%Fs' ignored on pointer and reference declarations" +4148 "'%Fs' : DS != SS for '__near' '%Fs'" +4149 "'%Fs' : different ambient model than base class '%Fs'" +4150 "deletion of pointer to incomplete type '%Fs'; no destructor called" +4151 "'%Fs' : operator should be explicitly '%Fs'" +4152 "nonstandard extension, function/data pointer conversion in expression" +4153 "function/data pointer conversion in expression" +4154 "deletion of an array expression; conversion to pointer supplied" +4155 "deletion of an array expression without using the array form of 'delete'" +4156 "deletion of an array expression without using the array form of 'delete'; array form substituted" +4157 "pragma was ignored by C compiler" +4158 "assuming #pragma pointers_to_members(full_generality, %Fs_inheritance)" + +4184 "near call to thunk for '%Fs' in a different segment" + +4200 "nonstandard extension used : zero-sized array in struct/union" +4201 "nonstandard extension used : nameless struct/union" +4202 "nonstandard extension used : '...': prototype parameter in name list illegal" +4203 "nonstandard extension used : union with static member variable" +4204 "nonstandard extension used : non-constant aggregate initializer" +4205 "nonstandard extension used : static function declaration in function scope" +4206 "nonstandard extension used : translation unit is empty" +4207 "nonstandard extension used : extended initializer form" +4208 "nonstandard extension used : delete [exp] - exp evaluated but ignored" +4209 "nonstandard extension used : benign typedef redefinition" +4210 "nonstandard extension used : function given file scope" +4211 "nonstandard extension used : redefined extern to static" +4212 "nonstandard extension used : function declaration used ellipsis" +4213 "nonstandard extension used : cast on l-value" +4214 "nonstandard extension used : bit field types other than int" +4215 "nonstandard extension used : long float" +4216 "nonstandard extension used : float long" +4217 "nonstandard extension used : function declaration from a previous block" +4218 "nonstandard extension used : must specify at least a storage class or a type" +4219 "nonstandard extension used : trailing ',' used for variable argument list" +4220 "varargs matches remaining parameters" +4221 "nonstandard extension used : '%Fs' : cannot be initialized using address of automatic variable '%Fs'" +4222 "nonstandard extension used : '%Fs' : 'static' should not be used on member functions defined at file scope" +4223 "nonstandard extension used : non-lvalue array converted to pointer" + +4241 "'%Fs' : member access is restricted" + +4243 "%Fs conversion from '%Fs' to '%Fs' exists, but is inaccessible" + +4245 "'friend' specified for nonexistent function '%Fs'" + +4247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +4248 "'%Fs' : cannot access %Fs %Fs declared in class '%Fs'" +4249 "'%Fs' : no path to %Fs %Fs declared in virtual base '%Fs'" +4250 "'%Fs' : inherits '%Fs::%Fs' via dominance" +4251 "'%Fs' : base type '%Fs' should be exported to export %Fs '%Fs'" +4252 "'%Fs' is not defined; cannot specify CodeView information" + +4260 "no override, '%Fs::%Fs' has %Fs 'this' memory model whereas '%Fs::%Fs' has %Fs 'this' memory model" +4261 "no override, '%Fs::%Fs' has %Fs calling convention whereas '%Fs::%Fs' has %Fs calling convention" +4262 "no override, '%Fs::%Fs' has %Fs 'this' whereas '%Fs::%Fs' has %Fs 'this'" + +4270 "'%Fs' : do not initialize a non-const '%Fs' with a non-lvalue '%Fs' function return" + +4300 "conversion of pointer to nonintegral type" + +4305 "'%Fs' : truncation from '%Fs' to '%Fs'" +4306 "'%Fs' : conversion from '%Fs' to '%Fs' of greater size" +4307 "'%Fs' : integral constant overflow" +4308 "negative integral constant converted to unsigned type" +4309 "'%Fs' : truncation of constant value" + +4341 "'%Fs' : signed value is out of range for enum constant" +4342 "precision lost in initialization of enum constant" + +4354 "'%Fs' : initialization of reference to member requires a temporary variable" +4355 "'this' : used in base member initializer list" + +4385 "%Fs the '%Fs' in base '%Fs'" +4386 "%Fs to the '%Fs' in base '%Fs'" +4387 "'%Fs' : was considered" + +4401 "'%Fs' : member is bit field" +4402 "must use PTR operator" +4403 "illegal PTR operator" +4404 "period on directive ignored" +4405 "'%Fs' : identifier is reserved word" +4406 "operand on directive ignored" + +4409 "illegal instruction size" +4410 "illegal size for operand" +4411 "'%Fs' : symbol resolves to displacement register" + +4414 "'%Fs' : short jump to function converted to near" + +4500 "'%Fs' : class has private/protected data members; user-defined constructor advised" +4501 "'%Fs' : use of '::' unnecessary here" +4502 "'linkage' requires use of keyword 'extern'" + +4504 "type still ambiguous after parsing %d tokens, assuming declaration" +4505 "'%Fs' : unreferenced local function has been removed" +4506 "no definition for inline function '%Fs'" +4507 "explicit linkage specified after default linkage was used" +4508 "'%Fs' : function should return a value; 'void' return type assumed" + +4510 "'%Fs' : default constructor could not be generated" +4511 "'%Fs' : copy constructor could not be generated" +4512 "'%Fs' : assignment operator could not be generated" +4513 "'%Fs' : destructor could not be generated" + +4520 "'%Fs' : multiple default constructors specified" +4521 "'%Fs' : multiple copy constructors specified" +4522 "'%Fs' : multiple assignment operators specified" +4523 "'%Fs' : multiple destructors specified" +4524 "'%Fs' : redundant use of 'friend' on destructor" +4525 "'%Fs' : redundant use of 'friend' on constructor" + +4527 "instances of %Fs '%Fs' can never be destroyed - user-defined destructor required" +4528 "illegal 'pure' syntax, must be '= 0'" + +4607 "'%Fs' : must be initialized in constructor base/member initializer list" + +4610 "%Fs '%Fs' can never be instantiated - user defined constructor required" + +4612 "bad #pragma syntax, pragma ignored" +4613 "'%Fs' : class of segment cannot be changed" +4614 "'%Fs' : varargs parameters with this type were promoted" /* /NT */ +4615 "#pragma warning : unknown user warning type" +4616 "#pragma warning : warning number '%d' out of range, must be between '%d' and '%d'" +4617 "#pragma warning : invalid warning number" + +4620 "no postfix form of 'operator ++' found for type '%Fs', using prefix form" +4621 "no postfix form of 'operator --' found for type '%Fs', using prefix form" +4622 "overwriting debug information formed during creation of the precompiled header in object file: '%s'" + +4630 "'%Fs' : '%Fs' storage-class specifier illegal on member definition" + +4650 "debugging information not in precompiled header; only global symbols from the header will be available" +4651 "'/D%s' specified for precompiled header but not for current compile" +4652 "command-line option '%Fs' inconsistent with precompiled header; precompiled header option ignored" + +4699 "Note: %Fs" + +4706 "assignment within conditional expression" /* QC, c23 */ + +4710 "'%Fs' : function not expanded" /* QC, c23 */ + +4726 "'%c' : unknown memory model command-line option" +4727 "conditional expression is constant" + +4741 "/Oq option ignored for __fastcall function '%Fs'" + +4746 "'%Fs' : unsized array given size %Fs" + +4756 "overflow in constant arithmetic" /* QC2, c1, c23 */ + +4758 "address of automatic (local) variable taken, DS != SS" /* QC, c23 */ +4759 "segment lost in conversion" /* QC, c23 */ +4760 "'%Fs' : segment lost in initialization" /* QC, c23 */ + +4761 "integral size mismatch in argument : conversion supplied" /* QC, c23 */ +4762 "near/far mismatch in argument : conversion supplied" /* QC, c23 */ + +4769 "conversion of near pointer to long integer" /* QC, c23 */ + +4785 "near call to '%Fs' in different segment" /* QC, c23 */ + +4788 "'%Fs' : identifier was truncated to '%d' characters" + +4793 "native code generated for p-code function '%Fs' with inline assembly" + +4900 "intermediate language mismatch between '%s' version '%ld' and '%s' version '%ld'" + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" + /* errors */ + +2001 "newline in constant" +2002 "invalid wide-character constant" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%Fs'" +2006 "#include expected a filename, found '%Fs'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%Fs'" +2010 "'%c' : unexpected in macro formal parameter list" +2011 "'%Fs' : '%Fs' type redefinition" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first nonwhite space" +2015 "too many characters in constant" +2016 "no closing single quotation mark" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor directive, found '%c'" +2020 "'%Fs' : '%Fs' member redefinition" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for character" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" /* QC 2.5 */ +2026 "string too big, trailing characters truncated" +2027 "use of undefined type '%Fs'" +2028 "struct/union member must be inside a struct/union" +2029 "left of '%s' specifies undefined class/struct/union '%Fs'" +2030 "'%Fs' : struct/union member redefinition" /* QC 2.5 */ +2031 "'%Fs' : function cannot be struct/union member" /* QC 2.5 */ +2032 "'%Fs' : function cannot be member of %Fs '%Fs'" +2033 "'%Fs' : bit field cannot have indirection" +2034 "'%Fs' : type of bit field too small for number of bits" +2035 "struct/union '%Fs' : unknown size" /* QC 2.5 */ +2036 "'%Fs' : unknown size" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" /* QC 2.5 */ +2039 "'%Fs' : is not a member of '%Fs'" +2040 "'%Fs' : different levels of indirection" +2041 "illegal digit '%c' for base '%d'" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%Fs' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2049 "case value '%ld' already used" +2050 "switch expression not integral" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "'%Fs' : wide string mismatch" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%Fs'" +2060 "syntax error : end of file found" +2061 "syntax error : identifier '%Fs'" +2062 "type '%Fs' unexpected" +2063 "'%Fs' : not a function" +2064 "term does not evaluate to a function" +2065 "'%Fs' : undeclared identifier" +2066 "cast to function type is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast from '%Fs' to '%Fs'" +2069 "cast of 'void' term to non-'void'" +2070 "illegal sizeof operand" +2071 "'%Fs' : illegal storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : partially initialized array requires a default constructor" +2074 "'%Fs' : '%Fs' initialization needs curly braces" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" /* QC 2.5 */ +2077 "nonscalar field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined class/struct/union '%Fs'" +2080 "illegal __far __fastcall function or __saveregs function" +2081 "'%Fs' : name in formal parameter list illegal" +2082 "redefinition of formal parameter '%Fs'" +2083 "%Fs comparison illegal" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "'%Fs' : illegal for %Fs" +2089 "'%Fs' : '%Fs' too large" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "'%Fs' : cannot be initialized using address of automatic variable '%Fs'" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual parameter has type 'void' : parameter %d" +2096 "struct/union comparison illegal" /* QC 2.5 */ +2097 "illegal initialization" +2098 "expression is not an address" +2099 "initializer is not a constant" +2100 "illegal indirection" +2101 "'%Fs' on constant" +2102 "'%Fs' requires l-value" +2103 "'%Fs' on register variable" +2104 "'%Fs' on bit field ignored" +2105 "'%Fs' needs l-value" +2106 "'%Fs' : left operand must be l-value" +2107 "illegal index, indirection not allowed" +2108 "subscript is not of integral type" +2109 "subscript requires array or pointer type" +2110 "cannot add two pointers" +2111 "pointer addition requires integral operand" +2112 "pointer subtraction requires integral or pointer operand" +2113 "pointer can only be subtracted from another pointer" +2114 "'%Fs' : pointer on left; needs integral value on right" +2115 "'%Fs' : incompatible types" +2116 "function parameter lists differed" +2117 "'%Fs' : array bounds overflow" +2118 "negative subscript" +2119 "typedef types both define indirection" +2120 "'void' illegal with all types" +2121 "'%Fs' : bad %Fs operand" +2122 "'%Fs' : prototype parameter in name list illegal" +2123 "'%Fs' : cannot call __fastcall function '%Fs' from p-code" +2124 "divide or mod by zero" +2125 "'%Fs' : allocation exceeds 64K" /* QC, c23 */ +2126 "'%Fs' : incorrect operand" +2127 "parameter allocation exceeds 32K" /* QC, c23 */ +2128 "'%Fs' : alloc_text/same_seg applicable only to functions with C linkage" +2129 "static function '%Fs' declared but not defined" +2130 "#line expected a string containing the filename, found '%Fs'" +2131 "more than one memory attribute" +2132 "syntax error : unexpected identifier" +2133 "'%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" /* QC 2.5 */ +2135 "'%Fs' : illegal bit field operation" +2136 "'%Fs' : prototype must have parameter types" +2137 "empty character constant" +2138 "illegal to define an enumeration without any members" +2139 "type following '%s' is illegal" +2140 "parameter cannot be function type" +2141 "value out of range for enum constant" +2142 "function declarations differ, variable parameters specified only in one of them" +2143 "syntax error : missing '%Fs' before '%Fs'" +2144 "syntax error : missing '%Fs' before type '%Fs'" +2145 "syntax error : missing '%Fs' before identifier" +2146 "syntax error : missing '%Fs' before identifier '%Fs'" +2147 "'%Fs' : const array must be fully initialized" +2148 "array too large" +2149 "'%Fs' : named bit field cannot have zero width" +2150 "'%Fs' : bit field must have type 'int', 'signed int', or 'unsigned int'" +2151 "more than one language attribute" +2152 "'%Fs' : pointers to functions with different attributes" +2153 "hex constants must have at least one hex digit" +2154 "'%Fs' : does not refer to a segment name" +2155 "'?' : invalid left operand, expected arithmetic or pointer type" +2156 "pragma must be outside function" +2157 "'%Fs' : must be declared before use in pragma list" +2158 "'%Fs' : is a function" +2159 "more than one storage class specified" +2160 "'##' cannot occur at the beginning of a macro definition" +2161 "'##' cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%Fs' : not available as an intrinsic function" +2164 "'%Fs' : intrinsic function not declared" +2165 "'%Fs' : cannot modify pointers to data" +2166 "l-value specifies const object" +2167 "'%Fs' : too many actual parameters for intrinsic function" +2168 "'%Fs' : too few actual parameters for intrinsic function" +2169 "'%Fs' : intrinsic function, cannot be defined" +2170 "'%Fs' : not declared as a function, cannot be intrinsic" +2171 "'%Fs' : illegal operand" +2172 "'%Fs' : actual parameter is not a pointer : parameter %d" +2173 "'%Fs' : actual parameter is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual parameter has type 'void' : parameter %d, parameter list %d" +2175 "'%Fs' : invalid locale" +2176 "static huge data not supported by '%Fs'" /* QC & Pcode */ +2177 "constant too big" +2178 "'%Fs' : storage class for same_seg variables must be extern" +2179 "'%Fs' : was used in same_seg, but storage class is no longer extern" +2180 "controlling expression has type 'void'" +2181 "illegal else without matching if" +2182 "'%Fs' : has type 'void'" +2183 "syntax error: translation unit is empty" +2184 "illegal return of a 'void' value" +2185 "'%Fs' : illegal based allocation" +2186 "'%Fs' : illegal operand of type 'void'" +2187 "cast of near function pointer to far function pointer" +2188 "'%ld' : too big for wide character" +2189 "#error : %Fs" +2190 "first parameter list longer than second" +2191 "second parameter list longer than first" +2192 "parameter '%d' declaration different" +2193 "'%Fs' : already in a segment" +2194 "'%Fs' : is a text segment" +2195 "'%Fs' : is a data segment" +2197 "'%Fs' : too many actual parameters" +2198 "'%Fs' : too few actual parameters" +2199 "syntax error : found '%Fs (' at global scope (was a declaration intended?)" +2200 "'%Fs' : function has already been defined" +2201 "'%Fs' : cannot export static declarations" +2202 "'%Fs' : not all control paths return a value" +2203 "delete operator cannot specify bounds for an array" +2204 "'%Fs' : type definition found within parentheses" +2205 "'%Fs' : cannot initialize extern variables with block scope" +2206 "'%Fs' : typedef cannot be used for function definition" +2207 "'%Fs' in struct/union '%Fs' has a zero-sized array" /* QC 2.5 */ +2208 "'%Fs' : no members defined using this type" +2209 "type cast in __based construct must be (__segment)" +2210 "'%Fs' : must be near/far data pointer" +2211 "(__segment) applied to function identifier '%Fs'" +2212 "'%Fs' : __based not available for pointers to functions" +2213 "'%Fs' : illegal argument to __based" +2214 "pointers based on 'void' require the use of :>" +2215 "':>' operator only for objects based on 'void'" +2216 "'%Fs' cannot be used with '%Fs'" +2217 "'%Fs' must be used with '%Fs'" +2218 "type in __based construct must be 'void'" +2219 "syntax error : type qualifier must be after '*'" +2220 "warning treated as error - no object file generated" +2221 "'.' : left operand points to class/struct/union, use '->'" /* QC 2.5 */ +2222 "'->' : left operand has struct/union type, use '.'" /* QC 2.5 */ +2223 "left of '->%Fs' must point to class/struct/union" +2224 "left of '.%Fs' must have class/struct/union type" +2225 "'%Fs' : function allocation must be in a named segment" +2226 "syntax error : unexpected type '%Fs'" +2227 "left of '->%Fs' must point to class/struct/union" +2228 "left of '.%Fs' must have class/struct/union type" +2229 "%Fs '%Fs' has an illegal zero-sized array" +2230 "'%Fs' : indirection to different types" +2231 "'.' : left operand points to '%Fs', use '->'" +2232 "'->' : left operand has '%Fs' type, use '.'" +2233 "'%Fs' : arrays of objects containing zero-size arrays are illegal" +2234 "arrays of references are illegal" +2235 "';' in formal parameter list" +2236 "unexpected '%Fs' '%Fs'" +2237 "unexpected %Fs '%Fs'" +2238 "unexpected token[s] preceding '%s'" +2239 "unexpected token '%Fs' following declaration of '%Fs'" +2240 "unexpected '%Fs' following formal list (only modifiers are allowed)" +2241 "'%Fs' : member access is restricted" +2242 "typedef name cannot follow class/struct/union" +2243 "%Fs conversion from '%Fs' to '%Fs' exists, but is inaccessible" +2244 "'%Fs' : unable to resolve function overload" +2245 "nonexistent function '%Fs' specified as friend" +2246 "'%Fs' : illegal static data member in locally defined class" +2247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +2248 "'%Fs' : cannot access %Fs %Fs declared in class '%Fs'" +2249 "'%Fs' : no accessible path to %Fs %Fs declared in virtual base '%Fs'" +2250 "'%Fs' : ambiguous inheritance of '%Fs::%Fs'" +2251 "'%Fs' : defined but not declared" +2252 "'%Fs' : pure specifier can only be specified for functions" +2253 "'%Fs' : pure specifier only applies to virtual function - specifier ignored" +2254 "'%Fs' : pure specifier not allowed on friend functions" +2255 "'%Fs' : a friend function can only be declared in a class" +2256 "illegal use of friend specifier on '%Fs'" +2257 "p-code generation pragma not allowed without /Oq" +2258 "illegal pure syntax, must be '= 0'" +2259 "'%Fs' : illegal attempt to instantiate abstract class" +2260 "function pointer cast to a data pointer" +2261 "data pointer cast to a function pointer" +2262 "'%Fs' : cannot be destroyed" +2263 "function returns pointer based on __self" +2264 "'%Fs' : error in function definition or declaration; function not called" +2265 "'%Fs' : reference to a zero-sized array is illegal" +2266 "'%Fs' : reference to a nonconstant bounded array is illegal" +2267 "'%Fs' : static functions with block scope are illegal" +2268 "'%Fs' : different const or volatile qualifiers" +2269 "'%Fs' : different ambient model than base class '%Fs'" +2270 "'%Fs' : modifiers not allowed on nonmember functions" +2271 "'%Fs' : new/delete cannot have formal list modifiers" +2272 "'%Fs' : modifiers not allowed on static member functions" +2273 "'%Fs' : illegal as right side of '->' operator" +2274 "'%Fs' : illegal as right side of '.' operator" +2275 "'%Fs' : illegal use of this type as an expression" +2276 "'%Fs' : illegal operation on bound member function expression" +2277 "'%Fs' : cannot take the address of a constructor" +2278 "'%Fs' : no function with C linkage found" +2279 "cannot use braces to initialize default arguments" +2280 "missing '{' before identifier '%Fs'?" +2281 "'%Fs' : is not a function, but contains <function returning>; '%Fs' is unexpected" +2282 "'%Fs' is followed by '%Fs' (missing ','?)" +2283 "'%Fs' : pure specifier not allowed on unnamed %Fs" +2284 "unbalanced parenthesis found while processing a member function" +2285 "pointers to members representation has already been determined - pragma ignored" +2286 "pointers to members of '%Fs' representation is already set to %s inheritance - declaration ignored" +2287 "'%Fs': inheritance representation: '%Fs' is less general than the required '%Fs'" +2288 "typedef has a trailing __based which cannot be applied to the symbol's indirection" +2289 "same type qualifier used more than once" +2290 "C++ '%Fs' syntax is reserved for future use" +2291 "'%Fs' : illegal modifier '%Fs' for 'this' pointer" +2292 "'%Fs': best case inheritance representation: '%Fs' declared but '%Fs' required" +2293 "'%Fs': illegal to have a non-static member variable as a __based specifier" + +2300 "'%Fs' : class does not have a destructor called '~%Fs'" +2301 "left of '->~%Fs' must point to class/struct/union" +2302 "left of '.~%Fs' must have class/struct/union type" + +2350 "'%Fs' is not a static member" +2351 "obsolete C++ constructor initialization syntax" +2352 "'%Fs::%Fs' : illegal call of nonstatic member function" +2353 "'%Fs' : improper use of constructor initializers" +2354 "'%Fs' : initialization of reference member requires a temporary variable" +2355 "'this' : can only be referenced inside nonstatic member functions" +2356 "initialization segment must not change during translation unit" + +2360 "initialization of '%Fs' is skipped by 'case' label" +2361 "initialization of '%Fs' is skipped by 'default' label" +2362 "initialization of '%Fs' is skipped by 'goto %Fs'" + +2369 "'%Fs' : redefinition; different subscripts" +2370 "'%Fs' : redefinition; different storage class" +2371 "'%Fs' : redefinition; different basic types" +2372 "'%Fs' : redefinition; different types of indirection" +2373 "'%Fs' : redefinition; different type modifiers" +2374 "'%Fs' : redefinition; multiple initialization" +2375 "'%Fs' : redefinition; different linkage" +2376 "'%Fs' : redefinition; different based allocation" +2377 "'%Fs' : redefinition; typedef cannot be overloaded with any other symbol" +2378 "'%Fs' : redefinition; symbol cannot be overloaded with a typedef" +2379 "formal parameter %d has different type when promoted" +2380 "type[s] preceding '%Fs' (constructor with return type, or illegal redefinition of current class-name?)" + +2385 "'%Fs::%Fs' is ambiguous" +2386 "ambiguous conversion from '%Fs*' to '%Fs*'" +2387 "ambiguous conversion from '%Fs&' to '%Fs&'" + +2390 "'%Fs' : incorrect storage class '%Fs'" +2391 "'%Fs' : 'friend' cannot be used during type definition" + +2400 "inline syntax error in '%Fs'; found '%Fs'" +2401 "'%Fs' : register must be base in '%Fs'" +2402 "'%Fs' : register must be index in '%Fs'" +2403 "'%Fs' : register must be base/index in '%Fs'" +2404 "'%Fs' : illegal register in '%Fs'" +2405 "illegal short forward reference with offset" +2406 "'%Fs' : name undefined in '%Fs'" +2407 "illegal 'float' register in '%Fs'" +2408 "illegal type on PTR operator in '%Fs'" +2409 "illegal type used as operator in '%s'" +2410 "'%Fs' : ambiguous member name in '%Fs'" +2411 "'%Fs' : illegal struct/union member in '%Fs'" +2412 "'%Fs' : case-insensitive label redefined" +2413 "'%Fs' : illegal align size" +2414 "illegal number of operands" +2415 "improper operand type" +2416 "'%Fs' : illegal opcode for processor" +2417 "divide by zero in '%Fs'" +2418 "'%Fs' : not in a register" +2419 "mod by zero in '%Fs'" +2420 "'%Fs' : illegal symbol in %Fs" +2421 "PTR operator used with register in '%Fs'" +2422 "illegal segment override in '%Fs'" +2423 "'%ld' : illegal scale" +2424 "'%Fs' : improper expression in '%Fs'" +2425 "'%Fs' : nonconstant expression in '%Fs'" +2426 "'%Fs' : illegal operator in '%Fs'" +2427 "'%Fs' : jump referencing label is out of range" /* QC */ + +2429 "'%Fs' : illegal far label reference" +2430 "more than one index register in '%Fs'" +2431 "illegal index register in '%Fs'" +2432 "illegal reference to 16-bit data in '%Fs'" +2433 "'%Fs' : '%Fs' not permitted on data declarations" +2434 "'%Fs' : cannot convert default argument from '%Fs' to '%Fs'" +2435 "'%Fs' : function called before default arguments were resolved" +2436 "'%Fs' : cannot initialize member functions" +2437 "'%Fs' : already initialized" +2438 "'%Fs' : cannot initialize static class data via constructor" +2439 "'%Fs' : member could not be initialized" +2440 "'%Fs' : cannot convert from '%Fs' to '%Fs'" +2441 "function call through pointer before default arguments were resolved" +2442 "p-code expression too complex for setjmp or Catch" +2443 "operand size conflict" + +2446 "'%Fs' : no conversion from '%Fs' to '%Fs'" +2447 "missing function header (old-style formal list?)" +2448 "'%Fs' : function-style initializer appears to be a function definition" +2449 "found '{' at file scope (missing function header?)" +2450 "switch expression of type '%Fs' is illegal" +2451 "conditional expression of type '%Fs' is illegal" +2452 "array bound expression of type '%Fs' is illegal" +2453 "array bound expression uses function name" + +2458 "'%Fs' : redefinition within definition" +2459 "'%Fs' : is being defined; cannot add as an anonymous member" +2460 "'%Fs' : uses '%Fs', which is being defined" +2461 "'%Fs' : constructor syntax missing formal parameters" +2462 "'%Fs' : cannot define a type in a 'new-expression'" +2463 "cannot define an anonymous type in a 'new-expression'" +2464 "'%Fs' : cannot use 'new' to allocate a reference" +2465 "cannot define an anonymous type inside parentheses" +2466 "cannot allocate an array of constant size 0" +2467 "illegal declaration of anonymous '%Fs'" +2468 "'new' : cannot allocate 'const'/'volatile' objects (type is '%Fs')" +2470 "cannot open database '%Fs'" +2471 "cannot update database '%Fs'" + +2500 "'%Fs' : '%Fs' is already a direct base class" +2501 "'%Fs' : missing decl-specifiers" +2502 "'%Fs' : too many access modifiers on the base class" +2503 "'%Fs' : base classes cannot contain zero-sized arrays" +2504 "'%Fs' : base class undefined" +2505 "'%Fs' : is not a legal base class" +2506 "'%Fs' : ambiguous" +2507 "'%Fs' : too many virtual modifiers on the base class" +2508 "'%Fs' : access denied" +2509 "'%Fs' : member function not declared in '%Fs'" +2510 "'%Fs' : left of '::' must be a class/struct/union" +2511 "'%Fs' : overloaded member function not found in '%Fs'" +2512 "'%Fs' : no appropriate default constructor available" +2513 "'%Fs' : decl-specifier is missing a declarator before '='" +2514 "'%Fs' : class has no constructors" +2515 "'%Fs' : not in class '%Fs'" + +2517 "'%Fs' : right of '::' is undefined" + +2519 "cannot convert '%Fs *' to '%Fs *'" + +2523 "'%Fs::~%Fs' : destructor tag mismatch" +2524 "'%Fs' : destructors must have a 'void' formal parameter list" +2525 "'%Fs' : explicit destructor is named but not called" + +2527 "'%Fs' : array of references must be fully initialized" +2528 "illegal pointer to reference" +2529 "illegal reference to a reference" +2530 "'%Fs' : references must be initialized" +2531 "'%Fs' : reference to a bit field illegal" +2532 "'%s' : cannot modify references" +2533 "'%Fs' : constructors not allowed a return type" +2534 "'%Fs' : constructor cannot return a value" +2535 "'%Fs' : member function already defined or declared" +2536 "'%Fs::%Fs' : cannot specify explicit initializer for arrays" +2537 "'%Fs' : illegal linkage specification" +2538 "new : cannot specify initializer for arrays" +2539 "new : '%Fs' no default constructor to initialize arrays of objects" +2540 "nonconstant expression as array bound" +2541 "delete : cannot delete objects that are not pointers" +2542 "'%Fs' : class object has no constructor for initialization" +2543 "expected ']' for operator '[]'" +2544 "expected ')' for operator '()'" +2545 "'%Fs' : unable to find overloaded operator" +2546 "'%Fs' : illegal mix of 'void' pointer with pointer to type" +2547 "illegal cast of overloaded function" +2548 "'%Fs' : missing default parameter for parameter %s" +2549 "user-defined conversion cannot specify a return type" +2550 "'%Fs' : constructor initializer lists are only allowed on constructor definitions" +2551 "'void *' type needs explicit cast" +2552 "'%Fs' : nonaggregates cannot be initialized with initializer list" +2553 "no legal conversion of return value to return type '%Fs'" +2555 "'%Fs::%Fs' : overriding virtual function differs from '%Fs::%Fs' only by return type" +2556 "'%Fs' : overloaded functions only differ by return type" +2557 "'%Fs' : private and protected members cannot be initialized without a constructor" +2558 "'%Fs' : no copy constructor available" +2559 "'%Fs' : no match for specified operator" +2560 "'%Fs' : overloaded function differs only by calling convention/memory model" +2561 "'%Fs' : function must return a value" +2562 "'%Fs' : 'void' function returning a value" +2563 "mismatch in formal parameter list" +2564 "formal/actual parameters mismatch in call through pointer to function" +2565 "'::%Fs' was previously declared as a global function" +2566 "overloaded function in conditional expression" +2567 "'%Fs' : intrinsic function must have prototypes when using C++" +2568 "'%Fs' : unable to resolve function overload '%Fs'" +2569 "'%Fs' : union cannot be used as a base class" +2570 "'%Fs' : union cannot have base classes" +2571 "'%Fs' : union cannot have virtual function '%Fs'" +2572 "'%Fs' : redefinition of default parameter : parameter %s" +2573 "'%Fs' : simple type cast must have exactly one expression" +2574 "'%Fs' : illegal static destructor declaration" +2575 "'%Fs' : only member functions and bases can be virtual" +2576 "'%Fs' : virtual used for static member function" +2577 "'%Fs' : destructor cannot return a value" + +2579 "'%Fs::%Fs(%s)' : parameter list not sufficiently different to '%Fs::%Fs(%s)'" +2580 "redefinition of class name '%Fs'" +2581 "'%Fs' : static 'operator =' function is illegal" +2582 "'%Fs' : 'operator =' function is unavailable" +2583 "'%Fs' : illegal const/volatile 'this' pointer used for constructors/destructors" +2584 "'%Fs' : direct base '%Fs' is inaccessible; already a base of '%Fs'" +2585 "explicit conversion to '%Fs' is ambiguous" +2586 "incorrect user-defined conversion syntax : illegal indirections" +2587 "'%Fs' : illegal use of local variable as default parameter" +2588 "'::~%Fs' : illegal global destructor" +2589 "'%Fs' : illegal token on right side of '::'" +2590 "'%Fs' : ambiguous user-defined conversions in switch expression" +2591 "'%Fs' : ambiguous user-defined conversions in conditional expression" +2592 "no legal conversion of initialization expression to type '%Fs'" +2593 "'operator %Fs' is ambiguous" +2594 "'%Fs' : ambiguous conversions from '%Fs' to '%Fs'" +2595 "'%Fs' : qualified name already has a constructor" +2596 "'%Fs' : qualified name already has a destructor" +2597 "'%Fs' : does not specify an object" +2598 "linkage specification must be at global scope" +2599 "'%Fs' : local functions are not supported" +2601 "functions cannot be defined in local classes" +2602 "'%Fs::%Fs' is not a member of a base of '%Fs'" +2603 "illegal access declaration: '%Fs' is not a direct base of '%Fs'" +2604 "cannot declare %Fs access to %Fs member '%Fs::%Fs'" +2605 "overloaded functions '%Fs::%Fs' do not have same access" +2606 "'%Fs::%Fs': illegal private access declaration" +2607 "'%Fs' : cannot implicitly convert a '%Fs' to a '%Fs' that is not const" +2608 "illegal reference cast - operand not an l-value" +2609 "'%Fs' : cannot implicitly convert a non-lvalue '%Fs' function return to a '%Fs' that is not const" +2610 "%Fs '%Fs' can never be instantiated; user-defined constructor is required" +2611 "'%Fs' : illegal following '~' (expected identifier)" +2612 "trailing '%Fs' illegal in base/member initializer list" +2613 "trailing '%Fs' illegal in base class list" +2614 "'%Fs' : illegal member initialization: '%Fs' is not a base or member" +2615 "memory attribute must appear before class name in pointer to member" +2617 "'%Fs' : inconsistent return statement" +2618 "'%Fs' : inconsistent return statement" +2619 "union '%Fs' : cannot have static member variable '%Fs'" +2620 "union '%Fs' : member '%Fs' has default constructor" +2621 "union '%Fs' : member '%Fs' has copy constructor" +2622 "union '%Fs' : member '%Fs' has assignment operator" +2623 "union '%Fs' : member '%Fs' has destructor" +2624 "'%Fs' : references to 'void' are illegal" +2625 "anonymous union did not declare any data members" +2626 "anonymous union defines %Fs member '%Fs'" +2627 "member function defined in unnamed class" +2628 "'%Fs' followed by '%Fs' is illegal (did you forget a ';'?)" +2629 "unexpected '%s ('" +2630 "'%Fs' found in what should be a comma-separated list" +2631 "'%Fs' : destructors not allowed a return type" +2632 "'%Fs' followed by '%Fs' is illegal" +2633 "'%Fs' : 'inline' is the only legal storage class for constructors" +2634 "'&%Fs::%Fs' : pointer to reference member is illegal" +2635 "cannot convert a '%Fs*' to a '%Fs*'; conversion from a virtual base class is implied" +2636 "pointer to reference member is illegal" +2637 "'%s' : cannot modify pointers to data members" +2638 "'%Fs' : memory model modifier illegal on pointer to data member" +2639 "compiler generated %Fs required by unnamed class" + +2641 "illegal pointer to member cast across virtual inheritance path" +2642 "cast to pointer to member must be from related pointer to member" +2643 "illegal cast from pointer to member" +2644 "basis class '%Fs' for pointer to member has not been defined" +2645 "no qualified name for pointer to member (found ':: *')" +2646 "global anonymous unions must be declared static" +2647 "'%Fs' : cannot dereference a '%Fs' on a '%Fs'" +2648 "'%Fs' : use of member as default parameter requires static member" +2649 "'%Fs' : is not a '%Fs'" +2650 "'%Fs' : cannot be a virtual function" + +2652 "'%Fs' : illegal copy constructor: first parameter must not be a '%Fs'" +2653 "'%Fs' : is not a class name" +2654 "'%Fs' : attempt to access member outside a member function" +2655 "'%Fs' : definition or redeclaration illegal in current scope" +2656 "'%Fs' : function not allowed as a bit field" +2657 "'%Fs::*' found at the start of a statement (did you forget to specify a type?)" +2658 "multiple conversions : %Fs(%Fs) and %Fs::operator %Fs()" +2659 "'%Fs' : overloaded function as left operand" +2660 "'%Fs' : function does not take %d parameters" +2661 "'%Fs' : no overloaded function takes %d parameters" +2662 "'%Fs' : cannot convert 'this' pointer from '%Fs' to '%Fs'" +2663 "'%Fs' : %d overloads have no legal conversion for 'this' pointer" +2664 "'%Fs' : cannot convert parameter %d from '%Fs' to '%Fs'" +2665 "'%Fs' : %d overloads have no legal conversion for parameter %d" +2666 "'%Fs' : %d overloads have similar conversions" +2667 "'%Fs' : none of %d overload have a best conversion" +2668 "'%Fs' : ambiguous call to overloaded function" + +2671 "'%Fs' : static member functions do not have 'this' pointers" +2672 "'%Fs' : new/delete member functions do not have 'this' pointers" +2673 "'%Fs' : global functions do not have 'this' pointers" +2674 "'%Fs' : no acceptable conversions from '%Fs' to '%Fs'" +2675 "unary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the predefined operator" +2676 "binary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the predefined operator" +2677 "binary '%Fs' : no global operator defined which takes type '%Fs' (or there is no acceptable conversion)" + +2701 "'%Fs' : __oldcall function defined with varargs" /* /NT */ +2702 " __try may not appear in termination block" /* /NT */ +2703 "illegal __leave statement" +2704 "'%Fs' : __va_start intrinsic only allowed in varargs" /* /NT */ +2705 "'%Fs' : illegal jump into __try scope" /* /NT */ + +2707 "'%Fs' : bad context for intrinsic function" /* /NT */ +2708 "'%Fs' : actual parameters length in bytes differs from previous call or reference" +2709 "'%Fs' : formal parameters length in bytes differs from previous declaration" +2710 "cannot delete a pointer to a const object" +2711 "cannot delete a pointer to a function" + +2720 "'%Fs' : '%Fs' storage-class specifier illegal on members" +2721 "'%Fs' : storage-class specifier illegal between operator keyword and type" +2722 "'::%Fs' : illegal following operator command; use 'operator %Fs'" +2723 "'%Fs' : '%Fs' storage-class specifier illegal on function definition" +2724 "'%Fs' : 'static' should not be used on member functions defined at file scope" + +2730 "'%Fs' : cannot be a base class of itself" +2731 "'%Fs' : function cannot be overloaded" +2732 "linkage specification contradicts earlier specification for %Fs" +2733 "second C linkage of overloaded function '%Fs' not allowed" +2734 "'%Fs' : const object must be initialized if not extern" +2735 "'%Fs' keyword is not permitted in formal parameter type specifier" +2736 "'%Fs' keyword is not permitted in cast" +2737 "'%Fs' : base class '%Fs' must be exported" + +2750 "'%Fs' : 'const T' to 'T' : '%Fs' to '%Fs'" +2751 "'%Fs' : 'volatile T' to 'T' : '%Fs' to '%Fs'" +2752 "'%Fs' : 'const T *' to 'T *' : '%Fs' to '%Fs'" +2753 "'%Fs' : 'volatile T *' to 'T *' : '%Fs' to '%Fs'" +2754 "'%Fs' : 'const T **' to 'T **' : '%Fs' to '%Fs'" +2755 "'%Fs' : 'volatile T **' to 'T **' : '%Fs' to '%Fs'" +2756 "'%Fs' : 'memory model mismatch' : '%Fs' to '%Fs'" +2757 "'%Fs' : 'language modifier mismatch: '%Fs' to '%Fs'" +2758 "'%Fs' : must be initialized in constructor base/member initializer list" + +2800 "'operator %Fs' cannot be overloaded" +2801 "'operator %Fs' must be a %Fs member" +2802 "static member 'operator %Fs' has no formal parameters" +2803 "'operator %Fs' must have at least one formal parameter of class type" +2804 "binary 'operator %Fs' has too many parameters" +2805 "binary 'operator %Fs' has too few parameters" +2806 "'operator %Fs' has too many formal parameters" +2807 "the second formal parameter to postfix 'operator %Fs' must be 'int'" +2808 "unary 'operator %Fs' has too many formal parameters" +2809 "'operator %Fs' has no formal parameters" +2810 "second formal parameter for 'operator delete' must be 'unsigned int'" +2811 "too many formal parameters for based form of 'operator delete'" +2812 "second formal parameter required for based form of 'operator delete'" +2813 "too many formal parameters for 'operator delete'" +2814 "second actual parameter for based form of 'operator delete' must be '__based(void)*'" +2815 "first actual parameter for based form of 'operator delete' must be '__segment'" +2816 "alternative form of 'operator delete' must be a member" +2817 "return type for 'operator delete' must be 'void'" +2818 "incorrect return type for 'operator ->'" +2819 "recursive return type for 'operator ->'" +2820 "second formal parameter required for based form of 'operator new'" +2821 "first formal parameter to 'operator new' must be 'unsigned int'" +2822 "second formal parameter for huge form of 'operator new' must be 'unsigned int'" +2823 "return type for based form of 'operator new' must be 'void __based(void)*'" +2824 "return type for 'operator new' must be 'void *'" +2825 "first formal parameter for huge form of 'operator new' must be 'unsigned long'" +2826 "second formal parameter required for huge form of 'operator new'" +2827 "'operator %s' cannot be globally overridden with unary form" +2828 "'operator %s' cannot be globally overridden with binary form" +2829 "'operator %Fs' cannot have a variable parameter list" +2830 "only placement parameters to 'operator new' can have default values" +2831 "'operator %Fs' cannot have default parameters" +2832 "'%Fs' form of 'operator %Fs' cannot be a member" +2833 "'operator %Fs' is not a recognized operator or type" +2834 "'operator %Fs' must be globally qualified" +2835 "user-defined conversion '%Fs' takes no formal parameters" +2836 "cannot export '%Fs': a previous declaration did not export it" +2837 "'%Fs' : illegal local static variable in exported inline function" +2838 "illegal qualified name in member declaration" + +2850 "#pragma hdrstop cannot be nested in a function or definition" +2851 "#pragma hdrstop required for /Yu command-line option without filename" +2852 "'%Fs' is not a valid precompiled header file" +2853 "'%Fs' is not a precompiled header file created with this compiler" +2854 "syntax error in #pragma hdrstop" +2855 "command-line option '%Fs' inconsistent with precompiled header" +2856 "#pragma hdrstop cannot be inside an #if block" +2857 "'#include' statement specified with the /Yc%Fs command-line option was not found in the source file" + +2900 "'%Fs' : huge array cannot be aligned to segment boundary" + +2910 "cannot call function from p-code with more than 255 bytes of arguments" +2911 "cannot define p-code function with more than 255 bytes of parameters" + +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + /* fatals */ + +1001 "internal compiler error\n\t\t(compiler file '%s', line %d)" + +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end of file found" +1005 "string too big for buffer" +1006 "write error on compiler-generated file" +1007 "unrecognized flag '%Fs' in '%Fs'" +1008 "no input file specified" +1009 "compiler limit : macros nested too deeply" +1010 "unexpected end of file while looking for precompiled header directive" +1011 "compiler limit : '%Fs' : macro definition too big" +1012 "unmatched parenthesis : missing '%c'" +1013 "compiler limit : too many open parentheses" +1014 "too many include files : depth = %d" +1015 "compiler limit : too many segments" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected #elif" +1019 "unexpected #else" +1020 "unexpected #endif" +1021 "invalid preprocessor command '%Fs'" +1022 "expected #endif" +1023 "cannot open source file '%Fs'" +1024 "cannot open include file '%Fs'" +1025 "compiler terminated by user" /* QC */ +1026 "parser stack overflow, program too complex" +1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */ +1028 "'%s' : segment allocation exceeds 64K" /* QC */ +1029 "there are more than 512 bytes of arguments" +1030 "there are more than 512 bytes of local variables" +1031 "compiler limit : function calls nested too deeply" /* QC, c23 */ +1032 "cannot open object code listing file '%s'" /* QC, c23 */ + +1034 "%Fs: no include path set" +1035 "expression too complex; simplify expression" /* QC, c23 */ + +1037 "cannot open object file '%s'" /* QC, c23 */ +1038 "compiler limit : '%Fs' : control flow state too complex; simplify function" + +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "compiler limit : linkage specifications nested too deeply" +1046 "compiler limit : %Fs nested too deeply" +1047 "limit of %Fs exceeded at '%Fs'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%Fs' : code segment too large" + +1052 "compiler limit : #if or #ifdef blocks nested too deeply" +1053 "compiler limit : struct/union nested too deeply" /* QC 2.5 */ +1054 "compiler limit : initializers nested too deeply" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected end of file in macro expansion" +1058 "compiler limit : too many formal arguments" +1059 "compiler is out of near heap space" +1060 "compiler is out of far heap space" +1061 "compiler limit : blocks nested too deeply" /* QC */ +1062 "error while writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" +1064 "compiler limit : token overflowed internal buffer" +1065 "compiler limit : out of tags" +1066 "compiler limit : decorated name length exceeded" + +1068 "cannot open file '%Fs'" +1069 "write error on file '%s'" /* QC */ +1070 "mismatched #if/#endif pair in file '%Fs'" +1071 "unexpected end of file found in comment" +1072 "'%Fs' : cannot read file" + +1082 "Cannot close %Fs file: '%Fs': %Fs (%Fs:%ld)" +1083 "Cannot open %Fs file: '%Fs': %Fs" +1084 "Cannot read %Fs file: '%Fs': %Fs" +1085 "Cannot write %Fs file: '%Fs': %Fs (%Fs:%ld)" +1086 "Cannot seek %Fs file: '%Fs': %Fs (%Fs:%ld)" +1087 "Cannot tell %Fs file: '%Fs': %Fs (%Fs:%ld)" +1088 "Cannot flush %Fs file: '%Fs': %Fs (%Fs:%ld)" + +1090 "data allocation exceeds 64K" /* QC, c23 */ + +1126 "'%Fs' : automatic allocation exceeds %s" /* QC, c23 */ +1127 "'%Fs' : segment redefinition" + +1500 "'%Fs' : cannot open inline function definition file" +1501 "compiler limit : too many temporary variables" +1502 "inline member-function definition missing '}'" +1503 "default parameter definition missing ',' or ')'" +1504 "type still ambiguous after parsing %d tokens, unable to recover" +1505 "unrecoverable parser look-ahead error" +1506 "unrecoverable block scoping error" +1507 "previous user errors and subsequent error recovery halt further compilation" + +1700 "%Fs compiler is out of far heap space" /* QC, c23 */ + +1852 "'%Fs' is not a valid precompiled header file" +1853 "'%Fs' is not a precompiled header file created with this compiler" +1855 "command-line option '%Fs' inconsistent with precompiled header" + +1900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/c23.err b/private/oleauto/tools/win16/hdos/c800/bin/c23.err new file mode 100644 index 000000000..f560113bb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/c23.err @@ -0,0 +1,99 @@ + /* fatals */ + +1001 "internal compiler error\n\t\t(compiler file '%s', line %d)" +1002 "compiler is out of heap space in pass 2" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end-of-file found" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1013 "cannot open source file '%s'" +1015 "compiler limit : too many segments" +1027 "DGROUP data allocation exceeds 64K" +1029 "there are > 512 bytes of arguments" +1030 "there are > 512 bytes of local variables" +1032 "cannot open object listing file '%s'" +1033 "cannot open assembly language output file '%s'" +1035 "expression too complex, please simplify" +1036 "cannot open source listing file '%s'" +1037 "cannot open object file '%s'" +1039 "unrecoverable heap overflow in pass 3" +1040 "unexpected end-of-file in source file '%s'" +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "floating-point overflow" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%s' : code segment too large" + +1055 "compiler limit : out of keys" +1067 "intrinsic not implemented" +1073 "bad '%s' flag, would overwrite '%s' with '%s'" +1074 "too many '%s' flags, '%s'" +1083 "Cannot open %Fs file: '%Fs': %Fs" +1084 "Cannot read %Fs file: '%Fs': %Fs" +1085 "Cannot write %Fs file: '%Fs': %Fs" +1090 "'%s' data allocation exceeds 64K" +1126 "'%s' : automatic allocation exceeds %s" +1127 "'%s' : segment redefinition" +1900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" + + /* errors */ + +2125 "'%s' : allocation exceeds 64K" +2127 "parameter allocation exceeds 32K" +2129 "static function '%s' not found" +2220 "warning treated as error - no object file generated" +2374 "'%s' redefinition; multiple initialization" +2418 "'%s' : not in a register" +2427 "'%s' : jump referencing label is out of range" +2900 "'%s' : huge array cannot be aligned to segment boundary" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + /* warnings */ + +4700 "local variable '%s' used without having been initialized" +4701 "local variable '%s' may be used without having been initialized" +4702 "unreachable code" +4703 "'%s' : function too large for global optimizations" +4704 "'%s' : in-line assembler precludes global optimizations" +4705 "statement has no effect" +4706 "assignment within conditional expression" +4707 "'%s' : function too large for global optimizations (%s)" /* internal use */ +4708 "ran out of heap at: %s" /* internal use */ +4709 "comma operator within array index expression" +4710 "function '%s' not expanded" +4711 "function '%s' selected for automatic inline expansion" +4712 "'%s' : used as register - loss of debugging information" +4713 "%s: internal compiler error; restarting\n\t\t(compiler file '%s', line %d)" +4723 "potential divide by 0" +4724 "potential mod by 0" +4726 "'%c' : unknown memory-model command-line option" +4727 "conditional expression is constant" +4746 "'%s' : unsized array treated as '%s'" +4756 "overflow in constant arithmetic" +4757 "overflow in constant multiplication" +4758 "address of automatic (local) variable taken, DS != SS" +4759 "segment lost in conversion" +4760 "'%Fs' : segment lost in initialization" +4761 "integral size mismatch in argument; conversion supplied" +4762 "near/far mismatch in argument : conversion supplied" +4763 "'%s' : function too large for post-optimizer" +4765 "recoverable heap overflow in post-optimizer - some optimizations may be missed" +4766 "local symbol table overflow - some local symbols may be missing in listings" +4769 "conversion of near pointer to long integer" +4772 "'%s' : too many debug entry points, maximum %d" +4773 "scoping too deep, deepest scoping merged when debugging" +4785 "near call to '%s' in different segment" +4786 "string too long - truncated to %d characters" +4787 "unprototyped function '%s' called in exception" +4788 "'%Fs' : identifier was truncated to '%d' characters" +4790 "insufficient memory to process debugging information" +4791 "loss of debugging information caused by optimization" +4792 "long double type not supported by alternate math library" +4900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/cl.err b/private/oleauto/tools/win16/hdos/c800/bin/cl.err new file mode 100644 index 000000000..ff942a472 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/cl.err @@ -0,0 +1,43 @@ + /* error messages */ + +2001 "too many symbols predefined with /D" +2002 "memory-model conflict" +2003 "missing source filename" +2005 "%s requires /vmg" +2008 "limit of %s exceeded at '%s'" +2011 "only one floating-point option allowed" +2012 "too many linker arguments" +2013 "incomplete model specification" +2016 "%s and %s command-line options are incompatible" +2018 "cannot create linker response file" +2019 "cannot overwrite source or object file '%s'" +2020 "%s option requires extended keywords to be enabled (/Ze)" +2021 "invalid numeric argument '%s'" +2022 "cannot open '%s'" +2023 "invalid model specification - flat model only" +2027 "cannot execute '%s'" +2028 "too many open files; cannot redirect '%s'" +2030 "internal compiler error in '%s'" +2031 "too many command-line options" +2000 "unknown command-line error" + + /* warning messages */ + +4001 "listing overrides assembly output" +4002 "ignoring unknown option '%s'" +4003 "processor-option conflict" +4004 "/G3 only available in optimizing compiler; assuming /G2" +4005 "cannot find '%s';\nPlease enter new filename (full path) or CTRL+C to quit: " +4007 "'%s' requires '%s'; option ignored" +4009 "threshold only for far or huge data; ignored" +4011 "preprocessing overrides source listing" +4012 "function declarations override source listing" +4013 "combined listing overrides object listing" +4014 "invalid value '%d' for '%s'; assuming '%d'" +4018 ".DEF files supported for segmented executable files only" +4019 "string too long; truncated to %d characters" +4020 "'%s' : missing argument; option ignored" +4021 "no action performed" +4022 "option '%s' invalid for %d-bit target" +4023 "option '%s' forces use of optimizing compiler" +4000 "unknown command-line warning" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/cl.msg b/private/oleauto/tools/win16/hdos/c800/bin/cl.msg new file mode 100644 index 000000000..e6a82388c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/cl.msg @@ -0,0 +1,139 @@ +C COMPILER OPTIONS +-MEMORY MODEL- +/AS small model (default) +/AC compact model +/AM medium model +/AL large model +/AH huge model +/AT tiny model (.COM files) +/A<string> (custom memory model) +-OPTIMIZATION- +/O enable optimization (same as /Ot) +/O1 minimize space +/O2 maximize speed +/Oa assume no aliasing +/Ob<n> inline expansion (default n=0) +/Oc local common subexpression opt. +/Od disable optimization (default) +/Oe enable registers allocation +/Of[-] toggle p-code quoting +/Og global common subexpression opt. +/Oi enable intrinsic functions +/Ol enable loop optimizations +/On disable "unsafe" optimizations +/Oo[-] toggle post code-gen. opt. +/Op[-] improve floating-pt consistency +/Oq enable maximum p-code optimization +/Or gen. common exit code (CodeView) +/Os favor code size +/Ot favor code speed +/Ov[-] toggle p-code frame sorting +/OV<n> control inlining by func. size +/Ow assume cross-function aliasing +/Ox maximum opts. (/Ob1cegilnot /Gs) +/Oz enable "unsafe" optimizations +-CODE GENERATION- +/G0 8086 instructions (default) +/G1 186 instructions +/G2 286 instructions +/G3 386 instructions +/GA protected-mode Win entry/exit code +/GD protected-mode Win entry/exit code +/GE<x> customize Windows entry/exit +/Gq backwards compatibility with v. 6 +/Gc Pascal style calling conventions +/Gd C style calling conventions +/Ge use stack-check calls +/Gf enable string pooling +/Gs remove stack-check calls +/Gn remove p-code native entry points +/Gp<num> specify p-code entry tables +/Gr _fastcall style calling convention +/Gt[num] data size threshold +/GW real-mode Windows entry/exit code +/Gw real-mode Windows entry/exit code +/Gx assume that data is near +/Gx- assume that data is far +/Gy separate functions for linker +/Zr check null pointers (/f only) +-OUTPUT FILES- +/Fa[file] name assembly listing file +/Fc[file] name source/object listing +/Fd[file] name .PDB filename +/Fe<file> name executable filename +/Fl[file] name object listing filename +/Fm[file] name map filename +/Fo<file> name object filename +/Fr[file] name .SBR filename +/Fp<file> name .PCH filename +/FR[file] name extended .SBR filename +/Fs[file] name source listing filename +-PREPROCESSOR- +/C don't strip comments +/D<name>[=|#text] define macro +/E preprocess to stdout +/EP same as /E but no #line +/I<directory> add #include path +/P preprocess to file +/U<name> remove predefined macro +/u remove all defined macros +/X ignore "standard places" +-LANGUAGE- +/vd{0|1} disable/enable vtordisp +/vm<x> type of pointers to members +/Z7 C 7 style CodeView information +/Za disable extensions (implies /Op) +/Zd line number information +/Ze enable extensions (default) +/Zg generate function prototypes +/Zi prepare for debugging (CodeView) +/Zl omit default library name in .OBJ +/Zp[n] pack structs on n-byte boundary +/Zs check syntax only +-FLOATING POINT- +/FPa calls with altmath +/FPc calls with emulator +/FPc87 calls with 8087 library +/FPi inline with emulator (default) +/FPi87 inline with 8087 +-SOURCE LISTING- +/Sl<columns> set line width +/Sp<lines> set page length +/St<string> set title string +/Ss<string> set subtitle string +-MISCELLANEOUS- +/batch specify batch mode compilation +/Bm<num> set compiler's available mem. +/c compile only, no link +/H<num> external name length +/J default char type is unsigned +/f select fast compiler (default) +/f- select optimizing compiler +/Yc create .PCH file +/Yd put debug info in .PCH file +/Yu use .PCH file +/YX automatic precompiled header +/nologo suppress copyright message +/Mq compile for QuickWin +/ND<name> name data segment +/NM<name> name code segment +/NQ<name> combine p-code temp segments +/NT<name> name code segment +/NV<name> name far v-table segment +/Tc<file> compile file without .c +/Tp<file> compile file without .cpp +/V<string> set version string +/W<n> warning level (default n=1) +/w disable all warnings +/WX treat all warnings as errors +/Zn turn off SBRPACK for .SBR files +-MASM SUPPORT- +/MA<MASM switch> +/Ta<file> assemble file without .asm +-LINKING- +/F <hex_num> stack size (hex. bytes) +/Lr append 'r' to default lib in .OBJ +/link [lib] give lib name to linker +/Ln do not link CRT.LIB +/Ld select dynamically-linked library +/Lw select statically-linked library diff --git a/private/oleauto/tools/win16/hdos/c800/include/assert.h b/private/oleauto/tools/win16/hdos/c800/include/assert.h new file mode 100644 index 000000000..b57c7b245 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/assert.h @@ -0,0 +1,35 @@ +/*** +*assert.h - define the assert macro +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the assert(exp) macro. +* [ANSI/System V] +* +****/ + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#undef assert + +#ifdef NDEBUG + +#define assert(exp) ((void)0) + +#else +#ifdef __cplusplus +extern "C" { +#endif +void __cdecl _assert(void *, void *, unsigned); +#ifdef __cplusplus +} +#endif + +#define assert(exp) \ + ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) ) + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/bios.h b/private/oleauto/tools/win16/hdos/c800/include/bios.h new file mode 100644 index 000000000..c3a7d1276 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/bios.h @@ -0,0 +1,244 @@ +/*** +*bios.h - declarations for bios interface functions and supporting definitions +* +* Copyright (c) 1987-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the constants, structures, and functions +* used for accessing and using various BIOS interfaces. +* +****/ + +#ifndef _INC_BIOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _MT + +/* manifest constants for BIOS serial communications (RS-232) support */ + +/* serial port services */ + +#define _COM_INIT 0 /* init serial port */ +#define _COM_SEND 1 /* send character */ +#define _COM_RECEIVE 2 /* receive character */ +#define _COM_STATUS 3 /* get serial port status */ + +/* serial port initializers. One and only one constant from each of the + * following four groups - character size, stop bit, parity, and baud rate - + * must be specified in the initialization byte. + */ + +/* character size initializers */ + +#define _COM_CHR7 2 /* 7 bits characters */ +#define _COM_CHR8 3 /* 8 bits characters */ + +/* stop bit values - on or off */ + +#define _COM_STOP1 0 /* 1 stop bit */ +#define _COM_STOP2 4 /* 2 stop bits */ + +/* parity initializers */ + +#define _COM_NOPARITY 0 /* no parity */ +#define _COM_ODDPARITY 8 /* odd parity */ +#define _COM_EVENPARITY 24 /* even parity */ + +/* baud rate initializers */ + +#define _COM_110 0 /* 110 baud */ +#define _COM_150 32 /* 150 baud */ +#define _COM_300 64 /* 300 baud */ +#define _COM_600 96 /* 600 baud */ +#define _COM_1200 128 /* 1200 baud */ +#define _COM_2400 160 /* 2400 baud */ +#define _COM_4800 192 /* 4800 baud */ +#define _COM_9600 224 /* 9600 baud */ + + +/* manifest constants for BIOS disk support */ + +/* disk services */ + +#define _DISK_RESET 0 /* reset disk controller */ +#define _DISK_STATUS 1 /* get disk status */ +#define _DISK_READ 2 /* read disk sectors */ +#define _DISK_WRITE 3 /* write disk sectors */ +#define _DISK_VERIFY 4 /* verify disk sectors */ +#define _DISK_FORMAT 5 /* format disk track */ + +/* struct used to send/receive information to/from the BIOS disk services */ + +#ifndef _DISKINFO_T_DEFINED +#pragma pack(2) + +struct _diskinfo_t { + unsigned drive; + unsigned head; + unsigned track; + unsigned sector; + unsigned nsectors; + void __far *buffer; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskinfo_t _diskinfo_t +#endif + +#pragma pack() +#define _DISKINFO_T_DEFINED +#endif + + +/* manifest constants for BIOS keyboard support */ + +/* keyboard services */ + +#define _KEYBRD_READ 0 /* read next character from keyboard */ +#define _KEYBRD_READY 1 /* check for keystroke */ +#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */ + +/* services for enhanced keyboards */ + +#define _NKEYBRD_READ 0x10 /* read next character from keyboard */ +#define _NKEYBRD_READY 0x11 /* check for keystroke */ +#define _NKEYBRD_SHIFTSTATUS 0x12 /* get current shift key status */ + + +/* manifest constants for BIOS printer support */ + +/* printer services */ + +#define _PRINTER_WRITE 0 /* write character to printer */ +#define _PRINTER_INIT 1 /* intialize printer */ +#define _PRINTER_STATUS 2 /* get printer status */ + + +/* manifest constants for BIOS time of day support */ + +/* time of day services */ + +#define _TIME_GETCLOCK 0 /* get current clock count */ +#define _TIME_SETCLOCK 1 /* set current clock count */ + + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif + +#define _REGS_DEFINED +#endif + + +/* function prototypes */ + +#ifndef _WINDOWS +unsigned __cdecl _bios_disk(unsigned, struct _diskinfo_t *); +#endif +unsigned __cdecl _bios_equiplist(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_keybrd(unsigned); +#endif +unsigned __cdecl _bios_memsize(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_printer(unsigned, unsigned, unsigned); +unsigned __cdecl _bios_serialcom(unsigned, unsigned, unsigned); +#endif +unsigned __cdecl _bios_timeofday(unsigned, long *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_BIOS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/cderr.h b/private/oleauto/tools/win16/hdos/c800/include/cderr.h new file mode 100644 index 000000000..402ac0956 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cderr.h @@ -0,0 +1,58 @@ +/*****************************************************************************\ +* * +* cderr.h - Common dialog error return codes * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_CDERR +#define _INC_CDERR + +#define CDERR_DIALOGFAILURE 0xFFFF + +#define CDERR_GENERALCODES 0x0000 +#define CDERR_STRUCTSIZE 0x0001 +#define CDERR_INITIALIZATION 0x0002 +#define CDERR_NOTEMPLATE 0x0003 +#define CDERR_NOHINSTANCE 0x0004 +#define CDERR_LOADSTRFAILURE 0x0005 +#define CDERR_FINDRESFAILURE 0x0006 +#define CDERR_LOADRESFAILURE 0x0007 +#define CDERR_LOCKRESFAILURE 0x0008 +#define CDERR_MEMALLOCFAILURE 0x0009 +#define CDERR_MEMLOCKFAILURE 0x000A +#define CDERR_NOHOOK 0x000B +#define CDERR_REGISTERMSGFAIL 0x000C + +#define PDERR_PRINTERCODES 0x1000 +#define PDERR_SETUPFAILURE 0x1001 +#define PDERR_PARSEFAILURE 0x1002 +#define PDERR_RETDEFFAILURE 0x1003 +#define PDERR_LOADDRVFAILURE 0x1004 +#define PDERR_GETDEVMODEFAIL 0x1005 +#define PDERR_INITFAILURE 0x1006 +#define PDERR_NODEVICES 0x1007 +#define PDERR_NODEFAULTPRN 0x1008 +#define PDERR_DNDMMISMATCH 0x1009 +#define PDERR_CREATEICFAILURE 0x100A +#define PDERR_PRINTERNOTFOUND 0x100B +#define PDERR_DEFAULTDIFFERENT 0x100C + +#define CFERR_CHOOSEFONTCODES 0x2000 +#define CFERR_NOFONTS 0x2001 +#define CFERR_MAXLESSTHANMIN 0x2002 + +#define FNERR_FILENAMECODES 0x3000 +#define FNERR_SUBCLASSFAILURE 0x3001 +#define FNERR_INVALIDFILENAME 0x3002 +#define FNERR_BUFFERTOOSMALL 0x3003 + +#define FRERR_FINDREPLACECODES 0x4000 +#define FRERR_BUFFERLENGTHZERO 0x4001 + +#define CCERR_CHOOSECOLORCODES 0x5000 + +#endif /* !_INC_CDERR */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc b/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc new file mode 100644 index 000000000..eb7dfad7b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc @@ -0,0 +1,1410 @@ +comment $ +cmacros - assembly macros for interfacing to hlls +(C)Copyright Microsoft Corp. 1984-1988 +$ +.xcref +.xcref ??_out +??_out macro t +ifndef ?QUIET +%out t +endif +endm +outif macro name,defval,onmsg,offmsg +ifndef name +ifb <defval> +name=0 +else +name=defval +endif +endif +if name +name=1 +ifnb <onmsg> +??_out <! onmsg> +endif +else +ifnb <offmsg> +??_out <! offmsg> +endif +endif +endm +.xcref ??error +??error macro msg +e r r o r ----- msg +.err +endm +.xcref ASMpass +.xcref memS,memM,memL,memC,memH,memMOD,sizec,sized +if1 +ASMpass=1 +ifdef ?SMALL +memS=1 +endif +ifdef ?MEDIUM +memM=1 +endif +ifdef ?COMPACT +memC=1 +endif +ifdef ?LARGE +memL=1 +endif +ifdef ?HUGE +memH=1 +endif +??_out <cMacros Version 5.20 - Copyright (c) Microsoft Corp. 1984-1988> +outif memS,0,<Small model> +outif memM,0,<Medium model> +outif memL,0,<Large model> +outif memC,0,<Compact model> +outif memH,0,<Huge model> +memMOD= memS + memM + memL + memC + memH +if memMOD ne 1 +if memMOD eq 0 +memS = 1 +else +??error <more than 1 memory model selected> +endif +endif +sizec= memM + memL + memH +sized= memL + memC + (memH*2) +outif ?DF,0,<No segments or groups will be defined> +outif ?TF,0,<Epilog sequences assume valid SP> +outif ?WIN,1,<Windows support> +ifdef PMODE +?pmd=1 +??_out <! 286 protect mode> +else +?pmd=0 +endif +ifdef ?386regs +if ?386regs +??_out <! 386 registers enabled> +endif +else +?386regs=0 +endif +if ?WIN eq 1 +outif ?PLM,1,<> +else +outif ?PLM,1,<Pascal calling convention> +endif +ifndef ?NODATA +?nodata1=0 +else +?nodata1=1 +??_out <! NODATA module> +endif +ifndef ?CHKSTK +?chkstk1=0 +else +?chkstk1=1 +ifdef ?CHKSTKPROC +??_out <! Private stack checking enabled> +else +??_out <! Stack checking enabled> +endif +endif +ifndef DOS5 +?DOS5=0 +else +?DOS5=1 +??_out <! DOS5 module> +endif +ifdef ?PROFILE +??_out <! Native profiling enabled> +endif +else +ASMpass=2 +endif +ifdef ?pmd +.286p +endif +if ?386regs +.xcref ?n,?ax,?eax,?bx,?ebx +.xcref ?cx,?ecx,?dx,?edx +.xcref ?si,?esi,?di,?edi,?es,?ds,?fs +.xcref ?gs +else +.xcref ?n,?ax,?ah,?al,?bx,?bh +.xcref ?bl,?cx,?ch,?cl,?dx,?dh +.xcref ?dl,?si,?di,?es,?ds,?bp +.xcref ?sp,?ss,?cs +endif +.xcref ?rsl,?cpd,?argl,?argc,?ba +.xcref ?acb,???,?po +.xcref ?pas,?pc +.xcref uconcat,mpush,mpop +.xcref ?ri,?pp,?pp1,?al1 +.xcref ?ad,?ap,?atal,?dd,?dd1,?dd2 +.xcref ?pg,?pg1,?aloc,?cs1,?cs2 +.xcref ?DF,?TF,?ff,?PLM,?WIN,?ia,?pu,?adj +.xcref ?uf,?rp,?nx,?nd,?nodata1,?chkstk1,?DOS5,?pmd,?lds,?exp +.xcref ?wfp,arg,cCall,cProc,assumes,?cs3,?cs2,?cs1 +.xcref defgrp,addseg,createSeg +.xcref save,outif,errnz,errn$,errnz1 +.xcref ?PLMPrevParm,?gcc +.xcref ?cCall1,?pcc +?rsl = 0 +?cpd = 0 +?argl = 0 +?argc = 0 +?ba = 0 +?acb = 0 +??? = 0 +?po = 0 +?pas = 0 +?pc = 0 +?ia = 0 +?pu = 0 +?adj = 0 +?rp = 0 +?uf = 0 +?nd = 0 +?nx = 0 +?wfp = 0 +?lds = 0 +?exp = 0 +?ff = 0 +?dd2 = 0 +?cCall1 = 0 +?pcc = 0 +?PLMPrevParm = 0 +.xcref ?casen +if1 +?casen = 0 +endif +if ?386regs +?n = 0000000000000000b +?ax = 0000000000000001b +?eax = 0000000000000010b +?bx = 0000000000000100b +?ebx = 0000000000001000b +?cx = 0000000000010000b +?ecx = 0000000000100000b +?dx = 0000000001000000b +?edx = 0000000010000000b +?si = 0000000100000000b +?esi = 0000001000000000b +?di = 0000010000000000b +?edi = 0000100000000000b +?ds = 0001000000000000b +?es = 0010000000000000b +?fs = 0100000000000000b +?gs = 1000000000000000b +else +?n = 0000000000000000b +?ax = 0000000000000011b +?ah = 0000000000000001b +?al = 0000000000000010b +?bx = 0000000000001100b +?bh = 0000000000000100b +?bl = 0000000000001000b +?cx = 0000000000110000b +?ch = 0000000000010000b +?cl = 0000000000100000b +?dx = 0000000011000000b +?dh = 0000000001000000b +?dl = 0000000010000000b +?si = 0000000100000000b +?di = 0000001000000000b +?es = 0000010000000000b +?ds = 0000100000000000b +?bp = 0001000000000000b +?sp = 0010000000000000b +?ss = 0100000000000000b +?cs = 1000000000000000b +endif +.cref +uconcat macro a,b,c,d,e,f,g +a&b c&d e&f&g +endm +if ?386regs +mpush macro r +irp x,<ax,eax,bx,ebx,cx,ecx,dx,edx,si,esi,di,edi,ds,es,fs,gs> +if (r and ?&&x) + push x +endif +endm +endm +else +mpush macro r +irp x,<ax,bx,cx,dx,si,di,es,ds,bp,sp,ss,cs> +if (r and ?&&x) + push x +endif +endm +endm +endif +if ?386regs +mpop macro r +irp x,<gs,fs,es,ds,edi,di,esi,si,edx,dx,ecx,cx,ebx,bx,eax,ax> +if (r and ?&&x) + pop x +endif +endm +endm +else +mpop macro r +irp x,<cs,ss,sp,bp,ds,es,di,si,dx,cx,bx,ax> +if (r and ?&&x) + pop x +endif +endm +endm +endif +save macro r +?rsl=0 +?ri ?rsl,<r> +endm +?ri macro n,r +irp x,<r> +.ERRNDEF ?&&x +n=n or ?&&x +endm +endm +.xcref +.xcref parmB,parmW,parmD,parmQ,parmT,parmCP,parmDP +.cref +parmB macro n +?pp <n>,<byte>,2,1 +endm +parmW macro n +?pp <n>,<word>,2,2 +endm +parmD macro n +ife ?PLM +irp x,<n> +?pp <&&x>,<dword>,0,4 +?pp <off_&&x>,<word>,2,2 +?pp <seg_&&x>,<word>,2,2 +endm +else +irp x,<n> +?pp <seg_&&x>,<word>,2,2 +?pp <off_&&x>,<word>,2,2 +?pp <&&x>,<dword>,0,4 +endm +endif +endm +parmQ macro n +?pp <n>,<qword>,8,8 +endm +parmT macro n +?pp <n>,<tbyte>,10,10 +endm +if sizec +parmCP macro n +parmD <n> +endm +else +parmCP macro n +parmW <n> +endm +endif +if sized +parmDP macro n +parmD <n> +endm +else +parmDP macro n +parmW <n> +endm +endif +?pp macro n,t,l,s +if ?cpd +.xcref +irp x,<n> +.xcref ?t&&x +?t&&x=s +ife ?PLM +?pp1 x,<t>,,,%(?po+?adj) +?po=?po+l +else +?PLMPrevParm=?PLMPrevParm+1 +?po=?po+l +?pp1 x,<t>,%?po,%?adj,,%?PLMPrevParm,%(?PLMPrevParm-1) +endif +endm +.cref +else +??error <parm(s) "&n" declared outside proc def> +endif +endm +?pp1 macro n,t,o,a,b,cpc,ppc +ife ?PLM +n equ (t ptr [bp+b]) +else +.xcref +.xcref ?PLMParm&cpc +.cref +?PLMParm&cpc ¯o po +uconcat <n>,,<equ>,,<(t ptr [bp+>,%(a+po-o),<])> +?PLMParm&ppc po +purge ?PLMParm&cpc +&endm +endif +endm +ifndef ?NOPARMR +if ?pmd +parmR macro n,r,r2 +??error <Sorry: ParmR can't be used with PMODE=1> +endm +else +.xcref +.xcref ?pr,parmR +.cref +parmR macro n,r,r2 +?pr n,r,r2,%?rp,%(?ia+2) +endm +?pr macro n,r,r2,i,o +.xcref +ifnb <r2> +parmR seg_&n,r +parmR off_&n,r2 +n equ (dword ptr [bp-o-2]) +.xcref ?t&n +?t&n=4 +else +.xcref ?rp&i +?rp&i=0 +ifdef ?&r +?rp&i=?&r +endif +if ??? or (?cpd eq 0) or (?rp&i eq 0) +??error <invalid parmR encountered: &n,&r> +exitm +endif +n equ (word ptr [bp-o]) +?t&n=2 +irp x,<bh,ch,dh,bl,cl,dl,ah,al> +if ?&&x eq ?&r +n equ (byte ptr [bp-o]) +?t&n=1 +exitm +endif +endm +?ia=?ia+2 +?rp=?rp+1 +endif +.cref +endm +endif +endif +.xcref +.xcref localB,localW,localD,localQ,localT,localCP,localDP,localV +.cref +localB macro n +?aloc <n>,<byte ptr>,1,1,0 +endm +localW macro n +?aloc <n>,<word ptr>,2,2,1 +endm +localD macro n +irp x,<n> +?aloc <seg_&&x>,<word ptr>,2,2,1 +?aloc <off_&&x>,<word ptr>,2,2,1 +?aloc <&&x>,<dword ptr>,0,4,1 +endm +endm +localQ macro n +?aloc <n>,<qword ptr>,8,8,1 +endm +localT macro n +?aloc <n>,<tbyte ptr>,10,10,1 +endm +if sizec +localCP macro n +localD <n> +endm +else +localCP macro n +localW <n> +endm +endif +if sized +localDP macro n +localD <n> +endm +else +localDP macro n +localW <n> +endm +endif +localV macro n,a +?aloc <n>,,%(a),0,1 +endm +?aloc macro n,t,l,s,a +if ?cpd +.xcref +irp x,<n> +???=???+l +if a +???=((??? + 1) and 0fffeh) +endif +?al1 x,<t>,%(???+?ia) +.xcref ?t&&x +?t&&x=s +endm +.cref +else +??error <locals "&n" declared outside procedure def> +endif +endm +?al1 macro n,t,o +n equ (t [bp-o]) +endm +?gcc macro s,i,cc +s = i +ifnb <cc> +ifidn <cc>,<C> +s=0 +endif +ifidn <cc>,<PLM> +s=1 +endif +ifidn <cc>,<PASCAL> +s=1 +endif +endif +endm +ifndef ?NOGLOBAL +.xcref +.xcref globalB,globalW,globalD,globalQ,globalT,globalCP,globalDP +.cref +globalB macro n,i,s,c +?ad <n>,1 +?dd n,1,<byte>,<db>,<i>,<s>,<c> +endm +globalW macro n,i,s,c +?ad <n>,2 +?dd n,1,<word>,<dw>,<i>,<s>,<c> +endm +globalD macro n,i,s,c +?ad <n>,4 +?dd n,1,<dword>,<dd>,<i>,<s>,<c> +off_&n equ n +seg_&n equ n[2] +endm +globalQ macro n,i,s,c +?ad <n>,8 +?dd n,1,<qword>,<dq>,<i>,<s>,<c> +endm +globalT macro n,i,s,c +?ad <n>,10 +?dd n,1,<tbyte>,<dt>,<i>,<s>,<c> +endm +if sizec +globalCP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalCP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +if sized +globalDP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalDP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +endif +ifndef ?NOSTATIC +.xcref +.xcref staticB,staticW,staticD,staticQ,staticT,staticCP,staticDP +.cref +staticB macro n,i,s +?ad <n>,1 +?dd n,0,<byte>,<db>,<i>,<s>,<PLM> +endm +staticW macro n,i,s +?ad <n>,2 +?dd n,0,<word>,<dw>,<i>,<s>,<PLM> +endm +staticD macro n,i,s +?ad <n>,4 +?dd n,0,<dword>,<dd>,<i>,<s>,<PLM> +endm +staticQ macro n,i,s +?ad <n>,8 +?dd n,0,<qword>,<dq>,<i>,<s>,<PLM> +endm +staticT macro n,i,s +?ad <n>,10 +?dd n,0,<tbyte>,<dt>,<i>,<s>,<PLM> +endm +if sizec +staticCP macro n,i,s +staticD n,<i>,<s> +endm +else +staticCP macro n,i,s +staticW n,<i>,<s> +endm +endif +if sized +staticDP macro n,i,s +staticD n,<i>,<s> +endm +else +staticDP macro n,i,s +staticW n,<i>,<s> +endm +endif +endif +?dd macro n,p,t,d,i,s,c +?gcc ?dd2,%?PLM,<c> +ife ?dd2 +n label t +?dd1 _&n,p,<d>,<i>,<s> +else +?dd1 n,p,<d>,<i>,<s> +endif +endm +?dd1 macro n,p,d,i,s +if p +public n +endif +ifb <s> +n d i +else +ifb <i> +n d s dup (?) +else +n d s dup (i) +endif +endif +endm +ifndef ?NOEXTERN +.xcref +.xcref ?ex1,?ex2,externB,externW,externD,externQ,externT +.xcref externNP,externFP,externP,externCP,externDP,externA +.cref +?ex2 = 0 +externA macro n,c +?ex1 <n>,40h,<abs>,<c>,<> +endm +externB macro n,c +?ex1 <n>,1,<byte>,<c>,<> +endm +externW macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +externD macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +externQ macro n,c +?ex1 <n>,8,<qword>,<c>,<> +endm +externT macro n,c +?ex1 <n>,10,<tbyte>,<c>,<> +endm +externNP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +externFP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +if sizec +externP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +else +externP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +endif +if sizec +externCP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externCP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +if sized +externDP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externDP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +?ex1 macro n,s,d,c,scv +?gcc ?ex2,%?PLM,<c> +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?ex2 +extrn _&&x:&d +x equ _&&x +else +extrn x:&d +endif +ifidn <scv>,<cc> +.xcref +.xcref ?CC&&x +.cref +?CC&&x=?ex2 +endif +endm +endm +endif +ifndef ?NOLABEL +.xcref +.xcref ?lb1,?lblpu,?lb2 +.xcref labelB,labelW,labelD,labelQ,labelT +.xcref labelNP,labelFP,labelP,labelCP,labelDP +.cref +?lblpu = 0 +?lb2 = 0 +labelB macro n,c +?lb1 <n>,1,<byte>,<c> +endm +labelW macro n,c +?lb1 <n>,2,<word>,<c> +endm +labelD macro n,c +?lb1 <n>,4,<dword>,<c> +endm +labelQ macro n,c +?lb1 <n>,8,<qword>,<c> +endm +labelT macro n,c +?lb1 <n>,10,<tbyte>,<c> +endm +labelNP macro n,c +?lb1 <n>,2,<near>,<c> +endm +labelFP macro n,c +?lb1 <n>,4,<far>,<c> +endm +if sizec +labelP macro n,c +?lb1 <n>,4,<far>,<c> +endm +else +labelP macro n,c +?lb1 <n>,2,<near>,<c> +endm +endif +if sizec +labelCP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelCP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +if sized +labelDP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelDP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +?lb1 macro n,s,d,c +?gcc ?lb2,%?PLM,<c> +?lblpu=0 +irp x,<n> +ifidn <x>,<PUBLIC> +?lblpu=1 +else +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?lb2 +if ?lblpu +public _&&x +endif +_&&x label &d +x equ _&&x +else +if ?lblpu +public x +endif +x label &d +endif +endif +endm +endm +endif +ifndef ?NODEF +.xcref +.xcref defB,defW,defD,defQ,defT,defCP,defDP +.cref +defB macro n +?ad <n>,1 +endm +defW macro n +?ad <n>,2 +endm +defD macro n +?ad <n>,4 +endm +defQ macro n +?ad <n>,8 +endm +defT macro n +?ad <n>,10 +endm +if sizec +defCP macro n +defD <n> +endm +else +defCP macro n +defW <n> +endm +endif +if sized +defDP macro n +defD <n> +endm +else +defDP macro n +defW <n> +endm +endif +endif +?ad macro n,s +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +endm +endm +ifndef ?NOPTR +.xcref +.xcref regPtr,farPtr +.cref +regPtr macro n,s,o +farPtr n,s,o +endm +farPtr macro n,s,o +.xcref +.xcref ?t&n +.cref +n ¯o + push s + push o +&endm +?t&n=80h +endm +endif +arg macro a +irp x,<a> +?argc=?argc+1 +?atal <x>,%?argc +endm +endm +?atal macro n,i +.xcref +.xcref ?ali&i +.cref +?ali&i ¯o +?ap n +&endm +endm +?ap macro n +?argl=?argl+2 +ifdef ?t&n +ife ?t&n-1 + push word ptr (n) +exitm +endif +ife ?t&n-2 + push n +exitm +endif +ife ?t&n-4 + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+2 +exitm +endif +ife ?t&n-8 + push word ptr (n)[6] + push word ptr (n)[4] + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+6 +exitm +endif +if ?t&n and 80h +n +?argl=?argl+2 +exitm +endif +ife ?t&n + push word ptr (n) +exitm +endif +endif + push n +endm +cCall macro n,a,c +ifnb <a> +arg <a> +endif +mpush %?rsl +ifdef ?CC&n +?cCall1=?CC&n +else +?cCall1=?PLM +endif +ifnb <c> +?gcc ?cCall1,%?cCall1,<c> +endif +?argl=0 +ife ?cCall1 +?acb=?argc +else +?acb=1 +endif +rept ?argc +uconcat <?ali>,%?acb +uconcat <purge>,,<?ali>,%?acb +ife ?cCall1 +?acb=?acb-1 +else +?acb=?acb+1 +endif +endm + call n +if ((?cCall1 eq 0) and (?argl ne 0)) + add sp,?argl +endif +mpop %?rsl +?rsl=0 +?argc= 0 +?argl= 0 +endm +cProc macro n,cf,a +if ?cpd +?utpe +endif +?cpd=1 +???=0 +?argc=0 +?ba=0 +?po=0 +?pu=0 +?ia=0 +?adj=4 +?rp=0 +?uf=0 +?wfp=?WIN +?ff=0 +?pas=0 +?pcc=?PLM +?lds=0 +?exp=0 +ifnb <a> +?ri ?pas,<a> +endif +?pc=sizec +?nd=?nodata1 +?nx=0 +irp x,<cf> +ifidn <x>,<FAR> +?pc=1 +endif +ifidn <x>,<NEAR> +?pc=0 +endif +ifidn <x>,<PUBLIC> +?pu=1 +endif +ifidn <x>,<SMALL> +?uf=1 +endif +ifidn <x>,<DATA> +?nd=0 +endif +ifidn <x>,<NODATA> +?nd=1 +endif +ifidn <x>,<ATOMIC> +?nx=1 +endif +ifidn <x>,<C> +?pcc=0 +endif +ifidn <x>,<PLM> +?pcc=1 +endif +ifidn <x>,<PASCAL> +?pcc=1 +endif +ifidn <x>,<WIN> +?wfp=1 +endif +ifidn <x>,<NONWIN> +?wfp=0 +endif +ifidn <x>,<LOADDS> +?lds=1 +endif +ifidn <x>,<EXPORTED> +?exp=1 +endif +endm +if ?pcc +?PLMPrevParm=0 +.xcref +.xcref ?PLMParm0 +.cref +?PLMParm0 ¯o +purge ?PLMParm0 +&endm +endif +.xcref +.xcref ?CC&n +.cref +?CC&n=?pcc +if (?nx eq 1) and (?nd eq 0) +?nx = 0 +??error <ATOMIC specified without NODATA - ATOMIC ignored> +endif +if ?pc +if ?wfp+?exp+?lds +ife ?nx +ife ?pmd +?ia=2 +endif +?pas = ?pas and (not ?ds) +endif +endif +?adj=?adj+2 +else +?wfp=0 +endif +ife ?386regs +?pas = ?pas and (not (?sp+?cs+?ss)) +endif +if ?uf +if ?386regs +?pas = ?pas and (not (?si+?di)) +else +?pas = ?pas and (not (?bp+?si+?di)) +endif +endif +ife ?pcc +?pg <_&n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +else +?pg <n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +endif +endm +?pg macro n,p,c,a,w,nnu,cc +.xcref +if ?uf +if ?nd +??error <NODATA encountered in &n - user frame ignored> +?uf=0 +endif +endif +.xcref cBegin +cBegin ¯o g +.xcref +if cc +uconcat <?PLMParm>,%?PLMPrevParm,%?po +endif +if ?uf +if ?rp +??error <parmR encountered in &n - user frame ignored> +?uf=0 +endif +endif +?pg1 <n>,c,a,%?po,w,%?uf,%?nd,%?rp,cc +?cpd=0 +?argc=0 +?ba=1 +???=(???+1) and 0fffeh +if p +public n +endif +ife c +n proc near +else +n proc far +endif +ife cc +nnu equ n +endif +ifidn <g>,<nogen> +if ???+?po+a+?rp +??_out <cBegin - possible invalid use of nogen> +endif +else +if ?uf +?mf c,%???,%?po +mpush a +else +if w+?exp+?lds +if ?pmd +ife ?nd +if ?lds +mov ax,_DATA +else +if ?exp +mov ax,ds +nop +endif +endif +endif +ife ?nx +if ???+?po +if ?chkstk1 +push bp +mov bp,sp +else +if ??? +enter ???,0 +else +push bp +mov bp,sp +endif +endif +endif +push ds +if ?lds+?exp +mov ds,ax +endif +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +else +ife ?nd + mov ax,ds + nop +endif +ife ?nx +ife ?DOS5 + inc bp +endif + push bp + mov bp,sp + push ds +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +ife ?nd + mov ds,ax +endif +endif +else +if ?pmd +if ?exp +mov ax,ds +nop +else +if ?lds +mov ax,_DATA +endif +endif +if ?ff+???+?po+?rp +if ?chkstk1 +push bp +mov bp,sp +else +if ??? +enter ???,0 +else +push bp +mov bp,sp +endif +endif +endif +if ?exp+?lds +push ds +mov ds,ax +endif +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +endif +if ?rp +?uf=0 +rept ?rp +uconcat mpush,,?rp,%?uf +?uf=?uf+1 +endm +endif +if ??? +if ?chkstk1 +ifdef ?CHKSTKPROC +?CHKSTKPROC %??? +else + mov ax,??? +ife cc + call _chkstk +else + call chkstk +endif +endif +else +ife ?pmd + sub sp,??? +endif +endif +endif +mpush a +endif +ifdef ?PROFILE +if c + call StartNMeas +endif +endif +endif +.cref +purge cBegin +&endm +.xcref ?utpe +?utpe ¯o +??error <unterminated procedure definition: "&n"> +&endm +.cref +endm +?pg1 macro n,c,a,o,w,f,d,r,cc +.xcref +.xcref cEnd +cEnd ¯o g +.xcref +?ba=0 +ifidn <g>,<nogen> +if o+a+r +??_out <cEnd - possible invalid use of nogen> +endif +else +ifdef ?PROFILE +if c +call StopNMeas +endif +endif +mpop a +if f + db 0c3h +else +if w+?exp+?lds +if ?pmd +ife ?nx +pop ds +endif +ife ?nx +if ?chkstk1+???+?po +leave +endif +else +if ?ff+???+?po+?rp +leave +endif +endif +else +ife ?nx +if (?TF eq 0) or (???+?rp) + lea sp,-2[bp] +endif + pop ds + pop bp +ife ?DOS5 + dec bp +endif +else +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif +if ???+?po+?rp + pop bp +endif +endif +endif +else +if ?pmd +if ?ff+???+?po+?rp +leave +endif +else +if ?ff+???+?po+?rp +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif + pop bp +endif +endif +endif +ife cc + ret +else + ret o +endif +endif +endif +n endp +.cref +purge cEnd +&endm +.cref +endm +assumes macro s,ln +ifndef ln&_assumes +assume s:ln +else +ln&_assumes s +endif +endm +createSeg macro n,ln,a,co,cl,grp +ifnb <grp> +addseg grp,n +else +ln&OFFSET equ offset n: +ln&BASE equ n +?cs3 <ln>,<n> +endif +ifnb <cl> +n segment a co '&cl' +else +n segment a co +endif +n ends +?cs1 <ln>,<n> +endm +addseg macro grp,seg +.xcref +.xcref grp&_def +.cref +ifndef grp&_def +grp&_def=0 +endif +if grp&_def ne ASMpass +.xcref +.xcref grp&_add +.cref +grp&_add ¯o s +grp&_in <seg>,s +&endm +.xcref +.xcref grp&_in +.cref +grp&_in ¯o sl,s +ifb <s> +grp group sl +else +grp&_add ¯o ns +grp&_in <sl,s>,ns +&endm +endif +&endm +grp&_def=ASMpass +else +grp&_add seg +endif +endm +defgrp macro grp,ln +addseg grp +ifnb <ln> +irp x,<ln> +?cs3 <&x>,<grp> +x&&OFFSET equ offset grp: +x&&BASE equ grp +endm +endif +endm +?cs1 macro ln,n +.xcref +.xcref ln&_sbegin +.cref +ln&_sbegin ¯o +.xcref +.xcref ?mf +.cref +?mf &¯o c,l,p +if c + extrn n&_FARFRAME:near + call n&_FARFRAME +else + extrn n&_NEARFRAME:near + call n&_NEARFRAME +endif + db l shr 1 + db p shr 1 +&&endm +?cs2 <ln>,<n> +n segment +&endm +endm +?cs2 macro ln,n +.xcref +.xcref sEnd +.cref +sEnd ¯o +n ends +purge ?mf +purge sEnd +&endm +endm +?cs3 macro ln,n +.xcref +.xcref ln&_assumes +.cref +ln&_assumes ¯o s +assume s:&n +&endm +endm +.xcref +.xcref sBegin +.cref +sBegin macro ln +ln&_sbegin +endm +ife ?DF +createSeg _TEXT,Code,word,public,CODE +ife ?nodata1 +createSeg _DATA,Data,word,public,DATA,DGROUP +defgrp DGROUP,Data +endif +if ?chkstk1 +ifndef ?CHKSTKPROC +externp <chkstk> +endif +endif +endif +errnz macro x +if2 +if x +errnz1 <x>,%(x) +endif +endif +endm +errnz1 macro x1,x2 += *errnz* x1 = x2 +.err +endm +errn$ macro l,x +errnz <offset $ - offset l x> +endm +ifdef ?PROFILE +externFP <StartNMeas,StopNMeas> +endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/colordlg.h b/private/oleauto/tools/win16/hdos/c800/include/colordlg.h new file mode 100644 index 000000000..86ae4e9bb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/colordlg.h @@ -0,0 +1,49 @@ +/*****************************************************************************\ +* * +* colordlg.h - Common dialog color dialog's control id numbers * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_COLORDLG +#define _INC_COLORDLG + +#define DLG_COLOR 10 + +#define COLOR_HUESCROLL 700 /* color dialog */ +#define COLOR_SATSCROLL 701 +#define COLOR_LUMSCROLL 702 +#define COLOR_HUE 703 +#define COLOR_SAT 704 +#define COLOR_LUM 705 +#define COLOR_RED 706 +#define COLOR_GREEN 707 +#define COLOR_BLUE 708 +#define COLOR_CURRENT 709 +#define COLOR_RAINBOW 710 +#define COLOR_SAVE 711 +#define COLOR_ADD 712 +#define COLOR_SOLID 713 +#define COLOR_TUNE 714 +#define COLOR_SCHEMES 715 +#define COLOR_ELEMENT 716 +#define COLOR_SAMPLES 717 +#define COLOR_PALETTE 718 +#define COLOR_MIX 719 +#define COLOR_BOX1 720 +#define COLOR_CUSTOM1 721 + +#define COLOR_HUEACCEL 723 +#define COLOR_SATACCEL 724 +#define COLOR_LUMACCEL 725 +#define COLOR_REDACCEL 726 +#define COLOR_GREENACCEL 727 +#define COLOR_BLUEACCEL 728 + +#define NUM_BASIC_COLORS 48 +#define NUM_CUSTOM_COLORS 16 + +#endif /* !_INC_COLORDLG */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/commdlg.h b/private/oleauto/tools/win16/hdos/c800/include/commdlg.h new file mode 100644 index 000000000..723f7b4d3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/commdlg.h @@ -0,0 +1,318 @@ +/*****************************************************************************\ +* * +* commdlg.h - Common dialog functions, types, and definitions * +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_COMMDLG +#define _INC_COMMDLG + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef WINAPI /* If not included with 3.1 headers... */ +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +typedef struct tagOFN +{ + DWORD lStructSize; + HWND hwndOwner; + HINSTANCE hInstance; + LPCSTR lpstrFilter; + LPSTR lpstrCustomFilter; + DWORD nMaxCustFilter; + DWORD nFilterIndex; + LPSTR lpstrFile; + DWORD nMaxFile; + LPSTR lpstrFileTitle; + DWORD nMaxFileTitle; + LPCSTR lpstrInitialDir; + LPCSTR lpstrTitle; + DWORD Flags; + UINT nFileOffset; + UINT nFileExtension; + LPCSTR lpstrDefExt; + LPARAM lCustData; + UINT (CALLBACK *lpfnHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpTemplateName; +} OPENFILENAME; +typedef OPENFILENAME FAR* LPOPENFILENAME; + +BOOL WINAPI GetOpenFileName(OPENFILENAME FAR*); +BOOL WINAPI GetSaveFileName(OPENFILENAME FAR*); +int WINAPI GetFileTitle(LPCSTR, LPSTR, UINT); + +#define OFN_READONLY 0x00000001 +#define OFN_OVERWRITEPROMPT 0x00000002 +#define OFN_HIDEREADONLY 0x00000004 +#define OFN_NOCHANGEDIR 0x00000008 +#define OFN_SHOWHELP 0x00000010 +#define OFN_ENABLEHOOK 0x00000020 +#define OFN_ENABLETEMPLATE 0x00000040 +#define OFN_ENABLETEMPLATEHANDLE 0x00000080 +#define OFN_NOVALIDATE 0x00000100 +#define OFN_ALLOWMULTISELECT 0x00000200 +#define OFN_EXTENSIONDIFFERENT 0x00000400 +#define OFN_PATHMUSTEXIST 0x00000800 +#define OFN_FILEMUSTEXIST 0x00001000 +#define OFN_CREATEPROMPT 0x00002000 +#define OFN_SHAREAWARE 0x00004000 +#define OFN_NOREADONLYRETURN 0x00008000 +#define OFN_NOTESTFILECREATE 0x00010000 + +/* Return values for the registered message sent to the hook function + * when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the + * filename to be accepted, OFN_SHARENOWARN rejects the name but puts + * up no warning (returned when the app has already put up a warning + * message), and OFN_SHAREWARN puts up the default warning message + * for sharing violations. + * + * Note: Undefined return values map to OFN_SHAREWARN, but are + * reserved for future use. + */ + +#define OFN_SHAREFALLTHROUGH 2 +#define OFN_SHARENOWARN 1 +#define OFN_SHAREWARN 0 + +typedef struct tagCHOOSECOLOR +{ + DWORD lStructSize; + HWND hwndOwner; + HWND hInstance; + COLORREF rgbResult; + COLORREF FAR* lpCustColors; + DWORD Flags; + LPARAM lCustData; + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpTemplateName; +} CHOOSECOLOR; +typedef CHOOSECOLOR FAR *LPCHOOSECOLOR; + +BOOL WINAPI ChooseColor(CHOOSECOLOR FAR*); + +#define CC_RGBINIT 0x00000001 +#define CC_FULLOPEN 0x00000002 +#define CC_PREVENTFULLOPEN 0x00000004 +#define CC_SHOWHELP 0x00000008 +#define CC_ENABLEHOOK 0x00000010 +#define CC_ENABLETEMPLATE 0x00000020 +#define CC_ENABLETEMPLATEHANDLE 0x00000040 + +typedef struct tagFINDREPLACE +{ + DWORD lStructSize; /* size of this struct 0x20 */ + HWND hwndOwner; /* handle to owner's window */ + HINSTANCE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + DWORD Flags; /* one or more of the FR_?? */ + LPSTR lpstrFindWhat; /* ptr. to search string */ + LPSTR lpstrReplaceWith; /* ptr. to replace string */ + UINT wFindWhatLen; /* size of find buffer */ + UINT wReplaceWithLen; /* size of replace buffer */ + LPARAM lCustData; /* data passed to hook fn. */ + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + /* ptr. to hook fn. or NULL */ + LPCSTR lpTemplateName; /* custom template name */ +} FINDREPLACE; +typedef FINDREPLACE FAR *LPFINDREPLACE; + +#define FR_DOWN 0x00000001 +#define FR_WHOLEWORD 0x00000002 +#define FR_MATCHCASE 0x00000004 +#define FR_FINDNEXT 0x00000008 +#define FR_REPLACE 0x00000010 +#define FR_REPLACEALL 0x00000020 +#define FR_DIALOGTERM 0x00000040 +#define FR_SHOWHELP 0x00000080 +#define FR_ENABLEHOOK 0x00000100 +#define FR_ENABLETEMPLATE 0x00000200 +#define FR_NOUPDOWN 0x00000400 +#define FR_NOMATCHCASE 0x00000800 +#define FR_NOWHOLEWORD 0x00001000 +#define FR_ENABLETEMPLATEHANDLE 0x00002000 +#define FR_HIDEUPDOWN 0x00004000 +#define FR_HIDEMATCHCASE 0x00008000 +#define FR_HIDEWHOLEWORD 0x00010000 + +HWND WINAPI FindText(FINDREPLACE FAR*); +HWND WINAPI ReplaceText(FINDREPLACE FAR*); + +typedef struct tagCHOOSEFONT +{ + DWORD lStructSize; /* */ + HWND hwndOwner; /* caller's window handle */ + HDC hDC; /* printer DC/IC or NULL */ + LOGFONT FAR* lpLogFont; /* ptr. to a LOGFONT struct */ + int iPointSize; /* 10 * size in points of selected font */ + DWORD Flags; /* enum. type flags */ + COLORREF rgbColors; /* returned text color */ + LPARAM lCustData; /* data passed to hook fn. */ + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + /* ptr. to hook function */ + LPCSTR lpTemplateName; /* custom template name */ + HINSTANCE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + LPSTR lpszStyle; /* return the style field here + * must be LF_FACESIZE or bigger */ + UINT nFontType; /* same value reported to the EnumFonts + * call back with the extra FONTTYPE_ + * bits added */ + int nSizeMin; /* minimum pt size allowed & */ + int nSizeMax; /* max pt size allowed if */ + /* CF_LIMITSIZE is used */ +} CHOOSEFONT; +typedef CHOOSEFONT FAR *LPCHOOSEFONT; + +BOOL WINAPI ChooseFont(CHOOSEFONT FAR*); + +#define CF_SCREENFONTS 0x00000001 +#define CF_PRINTERFONTS 0x00000002 +#define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS) +#define CF_SHOWHELP 0x00000004L +#define CF_ENABLEHOOK 0x00000008L +#define CF_ENABLETEMPLATE 0x00000010L +#define CF_ENABLETEMPLATEHANDLE 0x00000020L +#define CF_INITTOLOGFONTSTRUCT 0x00000040L +#define CF_USESTYLE 0x00000080L +#define CF_EFFECTS 0x00000100L +#define CF_APPLY 0x00000200L +#define CF_ANSIONLY 0x00000400L +#define CF_NOVECTORFONTS 0x00000800L +#define CF_NOOEMFONTS CF_NOVECTORFONTS +#define CF_NOSIMULATIONS 0x00001000L +#define CF_LIMITSIZE 0x00002000L +#define CF_FIXEDPITCHONLY 0x00004000L +#define CF_WYSIWYG 0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */ +#define CF_FORCEFONTEXIST 0x00010000L +#define CF_SCALABLEONLY 0x00020000L +#define CF_TTONLY 0x00040000L +#define CF_NOFACESEL 0x00080000L +#define CF_NOSTYLESEL 0x00100000L +#define CF_NOSIZESEL 0x00200000L + +/* these are extra nFontType bits that are added to what is returned to the + * EnumFonts callback routine */ + +#define SIMULATED_FONTTYPE 0x8000 +#define PRINTER_FONTTYPE 0x4000 +#define SCREEN_FONTTYPE 0x2000 +#define BOLD_FONTTYPE 0x0100 +#define ITALIC_FONTTYPE 0x0200 +#define REGULAR_FONTTYPE 0x0400 + +#define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1) + + +/* strings used to obtain unique window message for communication + * between dialog and caller + */ +#define LBSELCHSTRING "commdlg_LBSelChangedNotify" +#define SHAREVISTRING "commdlg_ShareViolation" +#define FILEOKSTRING "commdlg_FileNameOK" +#define COLOROKSTRING "commdlg_ColorOK" +#define SETRGBSTRING "commdlg_SetRGBColor" +#define FINDMSGSTRING "commdlg_FindReplace" +#define HELPMSGSTRING "commdlg_help" + +/* HIWORD values for lParam of commdlg_LBSelChangeNotify message */ +#define CD_LBSELNOITEMS -1 +#define CD_LBSELCHANGE 0 +#define CD_LBSELSUB 1 +#define CD_LBSELADD 2 + +typedef struct tagPD +{ + DWORD lStructSize; + HWND hwndOwner; + HGLOBAL hDevMode; + HGLOBAL hDevNames; + HDC hDC; + DWORD Flags; + UINT nFromPage; + UINT nToPage; + UINT nMinPage; + UINT nMaxPage; + UINT nCopies; + HINSTANCE hInstance; + LPARAM lCustData; + UINT (CALLBACK* lpfnPrintHook)(HWND, UINT, WPARAM, LPARAM); + UINT (CALLBACK* lpfnSetupHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpPrintTemplateName; + LPCSTR lpSetupTemplateName; + HGLOBAL hPrintTemplate; + HGLOBAL hSetupTemplate; +} PRINTDLG; +typedef PRINTDLG FAR* LPPRINTDLG; + +BOOL WINAPI PrintDlg(PRINTDLG FAR*); + +#define PD_ALLPAGES 0x00000000 +#define PD_SELECTION 0x00000001 +#define PD_PAGENUMS 0x00000002 +#define PD_NOSELECTION 0x00000004 +#define PD_NOPAGENUMS 0x00000008 +#define PD_COLLATE 0x00000010 +#define PD_PRINTTOFILE 0x00000020 +#define PD_PRINTSETUP 0x00000040 +#define PD_NOWARNING 0x00000080 +#define PD_RETURNDC 0x00000100 +#define PD_RETURNIC 0x00000200 +#define PD_RETURNDEFAULT 0x00000400 +#define PD_SHOWHELP 0x00000800 +#define PD_ENABLEPRINTHOOK 0x00001000 +#define PD_ENABLESETUPHOOK 0x00002000 +#define PD_ENABLEPRINTTEMPLATE 0x00004000 +#define PD_ENABLESETUPTEMPLATE 0x00008000 +#define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000 +#define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000 +#define PD_USEDEVMODECOPIES 0x00040000 +#define PD_DISABLEPRINTTOFILE 0x00080000 +#define PD_HIDEPRINTTOFILE 0x00100000 + +typedef struct tagDEVNAMES +{ + UINT wDriverOffset; + UINT wDeviceOffset; + UINT wOutputOffset; + UINT wDefault; +} DEVNAMES; +typedef DEVNAMES FAR* LPDEVNAMES; + +#define DN_DEFAULTPRN 0x0001 + +DWORD WINAPI CommDlgExtendedError(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_COMMDLG */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/conio.h b/private/oleauto/tools/win16/hdos/c800/include/conio.h new file mode 100644 index 000000000..ba72116f0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/conio.h @@ -0,0 +1,73 @@ +/*** +*conio.h - console and port I/O declarations +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* the MS C V2.03 compatible console and port I/O routines. +* +****/ + +#ifndef _INC_CONIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* function prototypes */ + +#ifndef _WINDOWS +char * __cdecl _cgets(char *); +int __cdecl _cprintf(const char *, ...); +int __cdecl _cputs(const char *); +int __cdecl _cscanf(const char *, ...); +int __cdecl _getch(void); +int __cdecl _getche(void); +#endif +int __cdecl _inp(unsigned); +unsigned __cdecl _inpw(unsigned); +#ifndef _WINDOWS +int __cdecl _kbhit(void); +#endif +int __cdecl _outp(unsigned, int); +unsigned __cdecl _outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl _putch(int); +int __cdecl _ungetch(int); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _WINDOWS +char * __cdecl cgets(char *); +int __cdecl cprintf(const char *, ...); +int __cdecl cputs(const char *); +int __cdecl cscanf(const char *, ...); +int __cdecl getch(void); +int __cdecl getche(void); +#endif +int __cdecl inp(unsigned); +unsigned __cdecl inpw(unsigned); +#ifndef _WINDOWS +int __cdecl kbhit(void); +#endif +int __cdecl outp(unsigned, int); +unsigned __cdecl outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl putch(int); +int __cdecl ungetch(int); +#endif +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_CONIO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/cpl.h b/private/oleauto/tools/win16/hdos/c800/include/cpl.h new file mode 100644 index 000000000..bdcfc7f80 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cpl.h @@ -0,0 +1,157 @@ +/*****************************************************************************\ +* * +* cpl.h - Control panel extension DLL definitions * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +****************************************************************************** +* General rules for being installed in the Control Panel: +* +* 1) The DLL must export a function named CPlApplet which will handle +* the messages discussed below. +* 2) If the applet needs to save information in CONTROL.INI minimize +* clutter by using the application name [MMCPL.appletname]. +* 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use +* the following form: +* ... +* [MMCPL] +* uniqueName=c:\mydir\myapplet.dll +* ... +* +* +* The order applet DLL's are loaded by CONTROL.EXE is: +* +* 1) MAIN.CPL is loaded from the windows system directory. +* +* 2) Installable drivers that are loaded and export the +* CplApplet() routine. +* +* 3) DLL's specified in the [MMCPL] section of CONTROL.INI. +* +* 4) DLL's named *.CPL from windows system directory. +* +*/ +#ifndef _INC_CPL +#define _INC_CPL + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * CONTROL.EXE will answer this message and launch an applet + * + * WM_CPL_LAUNCH + * + * wParam - window handle of calling app + * lParam - LPSTR of name of applet to launch + * + * WM_CPL_LAUNCHED + * + * wParam - TRUE/FALSE if applet was launched + * lParam - NULL + * + * CONTROL.EXE will post this message to the caller when the applet returns + * (ie., when wParam is a valid window handle) + * + */ +#define WM_CPL_LAUNCH (WM_USER+1000) +#define WM_CPL_LAUNCHED (WM_USER+1001) + +/* A function prototype for CPlApplet() */ + +typedef LRESULT (CALLBACK *APPLET_PROC)(HWND hwndCpl, UINT msg, LPARAM lParam1, LPARAM lParam2); + +/* The data structure CPlApplet() must fill in. */ + +typedef struct tagCPLINFO +{ + int idIcon; /* icon resource id, provided by CPlApplet() */ + int idName; /* name string res. id, provided by CPlApplet() */ + int idInfo; /* info string res. id, provided by CPlApplet() */ + LONG lData; /* user defined data */ +} CPLINFO, *PCPLINFO, FAR *LPCPLINFO; + +typedef struct tagNEWCPLINFO +{ + DWORD dwSize; /* similar to the commdlg */ + DWORD dwFlags; + DWORD dwHelpContext; /* help context to use */ + LONG lData; /* user defined data */ + HICON hIcon; /* icon to use, this is owned by CONTROL.EXE (may be deleted) */ + char szName[32]; /* short name */ + char szInfo[64]; /* long name (status line) */ + char szHelpFile[128];/* path to help file to use */ +} NEWCPLINFO, *PNEWCPLINFO, FAR *LPNEWCPLINFO; + + +/* The messages CPlApplet() must handle: */ + +#define CPL_INIT 1 +/* This message is sent to indicate CPlApplet() was found. */ +/* lParam1 and lParam2 are not defined. */ +/* Return TRUE or FALSE indicating whether the control panel should proceed. */ + + +#define CPL_GETCOUNT 2 +/* This message is sent to determine the number of applets to be displayed. */ +/* lParam1 and lParam2 are not defined. */ +/* Return the number of applets you wish to display in the control */ +/* panel window. */ + + +#define CPL_INQUIRE 3 +/* This message is sent for information about each applet. */ +/* lParam1 is the applet number to register, a value from 0 to */ +/* (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure. */ +/* Fill in CPL_INFO's idIcon, idName, idInfo and lData fields with */ +/* the resource id for an icon to display, name and description string ids, */ +/* and a long data item associated with applet #lParam1. */ + + +#define CPL_SELECT 4 +/* This message is sent when the applet's icon has been clicked upon. */ +/* lParam1 is the applet number which was selected. lParam2 is the */ +/* applet's lData value. */ + + +#define CPL_DBLCLK 5 +/* This message is sent when the applet's icon has been double-clicked */ +/* upon. lParam1 is the applet number which was selected. lParam2 is the */ +/* applet's lData value. */ +/* This message should initiate the applet's dialog box. */ + + +#define CPL_STOP 6 +/* This message is sent for each applet when the control panel is exiting. */ +/* lParam1 is the applet number. lParam2 is the applet's lData value. */ +/* Do applet specific cleaning up here. */ + + +#define CPL_EXIT 7 +/* This message is sent just before the control panel calls FreeLibrary. */ +/* lParam1 and lParam2 are not defined. */ +/* Do non-applet specific cleaning up here. */ + + +#define CPL_NEWINQUIRE 8 +/* this is the same as CPL_INQUIRE execpt lParam2 is a pointer to a */ +/* NEWCPLINFO structure. this will be sent before the CPL_INQUIRE */ +/* and if it is responed to (return != 0) CPL_INQUIRE will not be sent */ + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_CPL */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ctype.h b/private/oleauto/tools/win16/hdos/c800/include/ctype.h new file mode 100644 index 000000000..a81fd9bdd --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ctype.h @@ -0,0 +1,127 @@ +/*** +*ctype.h - character conversion macros and ctype macros +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines macros for character classification/conversion. +* [ANSI/System V] +* +****/ + +#ifndef _INC_CTYPE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* + * This declaration allows the user access to the ctype look-up + * array _ctype defined in ctype.obj by simply including ctype.h + */ + +extern unsigned char __near __cdecl _ctype[]; + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +/* character classification function prototypes */ + +#ifndef _CTYPE_DEFINED +int __cdecl isalpha(int); +int __cdecl isupper(int); +int __cdecl islower(int); +int __cdecl isdigit(int); +int __cdecl isxdigit(int); +int __cdecl isspace(int); +int __cdecl ispunct(int); +int __cdecl isalnum(int); +int __cdecl isprint(int); +int __cdecl isgraph(int); +int __cdecl iscntrl(int); +int __cdecl toupper(int); +int __cdecl tolower(int); +int __cdecl _tolower(int); +int __cdecl _toupper(int); +int __cdecl __isascii(int); +int __cdecl __toascii(int); +int __cdecl __iscsymf(int); +int __cdecl __iscsym(int); +#define _CTYPE_DEFINED +#endif + +#ifdef _INTL +int __cdecl __isleadbyte(int); +#endif + +/* the character classification macro definitions */ + +#define isalpha(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER) ) +#define isupper(_c) ( (_ctype+1)[_c] & _UPPER ) +#define islower(_c) ( (_ctype+1)[_c] & _LOWER ) +#define isdigit(_c) ( (_ctype+1)[_c] & _DIGIT ) +#define isxdigit(_c) ( (_ctype+1)[_c] & _HEX ) +#define isspace(_c) ( (_ctype+1)[_c] & _SPACE ) +#define ispunct(_c) ( (_ctype+1)[_c] & _PUNCT ) +#define isalnum(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER|_DIGIT) ) +#define isprint(_c) ( (_ctype+1)[_c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define isgraph(_c) ( (_ctype+1)[_c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define iscntrl(_c) ( (_ctype+1)[_c] & _CONTROL ) +#ifndef __STDC__ +#define toupper(_c) ( (islower(_c)) ? _toupper(_c) : (_c) ) +#define tolower(_c) ( (isupper(_c)) ? _tolower(_c) : (_c) ) +#endif +#define _tolower(_c) ( (_c)-'A'+'a' ) +#define _toupper(_c) ( (_c)-'a'+'A' ) +#define __isascii(_c) ( (unsigned)(_c) < 0x80 ) +#define __toascii(_c) ( (_c) & 0x7f ) + +#ifndef isleadbyte +#ifdef _INTL +#define isleadbyte(_c) __isleadbyte(_c) +#else +#define isleadbyte(_c) (0) +#endif +#endif + +/* extended ctype macros */ + +#define __iscsymf(_c) (isalpha(_c) || ((_c) == '_')) +#define __iscsym(_c) (isalnum(_c) || ((_c) == '_')) + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _CTYPE_DEFINED +int __cdecl isascii(int); +int __cdecl toascii(int); +int __cdecl iscsymf(int); +int __cdecl iscsym(int); +#else +#define isascii __isascii +#define toascii __toascii +#define iscsymf __iscsymf +#define iscsym __iscsym +#endif +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_CTYPE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/custcntl.h b/private/oleauto/tools/win16/hdos/c800/include/custcntl.h new file mode 100644 index 000000000..be3d02af1 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/custcntl.h @@ -0,0 +1,105 @@ +/*****************************************************************************\ +* * +* custcntl.h - Custom Control Library header file * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_CUSTCNTL +#define _INC_CUSTCNTL + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * Every custom control DLL must have three functions present, + * and they must be exported by the following ordinals. + */ +#define CCINFOORD 2 /* information function ordinal */ +#define CCSTYLEORD 3 /* styles function ordinal */ +#define CCFLAGSORD 4 /* translate flags function ordinal */ + +/* general size definitions */ +#define CTLTYPES 12 /* max number of control types */ +#define CTLDESCR 22 /* max size of description */ +#define CTLCLASS 20 /* max size of class name */ +#define CTLTITLE 94 /* max size of control text */ + +/* + * CONTROL STYLE DATA STRUCTURE + * + * This data structure is used by the class style dialog function + * to set and/or reset various control attributes. + * + */ +typedef struct tagCTLSTYLE +{ + UINT wX; /* x origin of control */ + UINT wY; /* y origin of control */ + UINT wCx; /* width of control */ + UINT wCy; /* height of control */ + UINT wId; /* control child id */ + DWORD dwStyle; /* control style */ + char szClass[CTLCLASS]; /* name of control class */ + char szTitle[CTLTITLE]; /* control text */ +} CTLSTYLE; +typedef CTLSTYLE * PCTLSTYLE; +typedef CTLSTYLE FAR* LPCTLSTYLE; + +/* + * CONTROL DATA STRUCTURE + * + * This data structure is returned by the control options function + * when inquiring about the capabilities of a particular control. + * Each control may contain various types (with predefined style + * bits) under one general class. + * + * The width and height fields are used to provide the host + * application with a suggested size. The values in these fields + * are in rc coordinates. + * + */ +typedef struct tagCTLTYPE +{ + UINT wType; /* type style */ + UINT wWidth; /* suggested width */ + UINT wHeight; /* suggested height */ + DWORD dwStyle; /* default style */ + char szDescr[CTLDESCR]; /* description */ +} CTLTYPE; + +typedef struct tagCTLINFO +{ + UINT wVersion; /* control version */ + UINT wCtlTypes; /* control types */ + char szClass[CTLCLASS]; /* control class name */ + char szTitle[CTLTITLE]; /* control title */ + char szReserved[10]; /* reserved for future use */ + CTLTYPE Type[CTLTYPES]; /* control type list */ +} CTLINFO; +typedef CTLINFO * PCTLINFO; +typedef CTLINFO FAR* LPCTLINFO; + +/* These two function prototypes are used by the dialog editor */ +#ifdef STRICT +typedef DWORD (CALLBACK* LPFNSTRTOID)(LPCSTR); +#else +typedef DWORD (CALLBACK* LPFNSTRTOID)(LPSTR); +#endif +typedef UINT (CALLBACK* LPFNIDTOSTR)(UINT, LPSTR, UINT); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_CUSTCNTL */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/dde.h b/private/oleauto/tools/win16/hdos/c800/include/dde.h new file mode 100644 index 000000000..26aa0139b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dde.h @@ -0,0 +1,146 @@ +/*****************************************************************************\ +* * +* dde.h - Dynamic Data Exchange structures and definitions * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_DDE +#define _INC_DDE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* DDE window messages */ + +#define WM_DDE_FIRST 0x03E0 +#define WM_DDE_INITIATE (WM_DDE_FIRST) +#define WM_DDE_TERMINATE (WM_DDE_FIRST+1) +#define WM_DDE_ADVISE (WM_DDE_FIRST+2) +#define WM_DDE_UNADVISE (WM_DDE_FIRST+3) +#define WM_DDE_ACK (WM_DDE_FIRST+4) +#define WM_DDE_DATA (WM_DDE_FIRST+5) +#define WM_DDE_REQUEST (WM_DDE_FIRST+6) +#define WM_DDE_POKE (WM_DDE_FIRST+7) +#define WM_DDE_EXECUTE (WM_DDE_FIRST+8) +#define WM_DDE_LAST (WM_DDE_FIRST+8) + +/****************************************************************************\ +* DDEACK structure +* +* Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message +* sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE, +* WM_DDE_ADVISE, or WM_DDE_UNADVISE message. +* +\****************************************************************************/ + +typedef struct tagDDEACK +{ + WORD bAppReturnCode:8, + reserved:6, + fBusy:1, + fAck:1; +} DDEACK; + +/****************************************************************************\ +* DDEADVISE structure +* +* WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam)) +* +\****************************************************************************/ + +typedef struct tagDDEADVISE +{ + WORD reserved:14, + fDeferUpd:1, + fAckReq:1; + short cfFormat; +} DDEADVISE; + +/****************************************************************************\ +* DDEDATA structure +* +* WM_DDE_DATA parameter structure for hData (LOWORD(lParam)). +* The actual size of this structure depends on the size of +* the Value array. +* +\****************************************************************************/ + +typedef struct tagDDEDATA +{ + WORD unused:12, + fResponse:1, + fRelease:1, + reserved:1, + fAckReq:1; + short cfFormat; + BYTE Value[1]; +} DDEDATA; + + +/****************************************************************************\ +* DDEPOKE structure +* +* WM_DDE_POKE parameter structure for hData (LOWORD(lParam)). +* The actual size of this structure depends on the size of +* the Value array. +* +\****************************************************************************/ + +typedef struct tagDDEPOKE +{ + WORD unused:13, /* Earlier versions of DDE.H incorrectly */ + /* 12 unused bits. */ + fRelease:1, + fReserved:2; + short cfFormat; + BYTE Value[1]; /* This member was named rgb[1] in previous */ + /* versions of DDE.H */ + +} DDEPOKE; + +/****************************************************************************\ +* The following typedef's were used in previous versions of the Windows SDK. +* They are still valid. The above typedef's define exactly the same structures +* as those below. The above typedef names are recommended, however, as they +* are more meaningful. +* +* Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did +* not correctly define the bit positions. +\****************************************************************************/ + +typedef struct tagDDELN +{ + WORD unused:13, + fRelease:1, + fDeferUpd:1, + fAckReq:1; + short cfFormat; +} DDELN; + +typedef struct tagDDEUP +{ + WORD unused:12, + fAck:1, + fRelease:1, + fReserved:1, + fAckReq:1; + short cfFormat; + BYTE rgb[1]; +} DDEUP; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_DDE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ddeml.h b/private/oleauto/tools/win16/hdos/c800/include/ddeml.h new file mode 100644 index 000000000..89e17033e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ddeml.h @@ -0,0 +1,457 @@ +/*****************************************************************************\ +* * +* ddeml.h - DDEML API header file * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ +#ifndef _INC_DDEML +#define _INC_DDEML + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If not included with 3.1 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +#ifndef DECLARE_HANDLE32 +#ifdef STRICT +#define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \ + typedef const struct name##__ _far* name +#else /* STRICT */ +#define DECLARE_HANDLE32(name) typedef DWORD name +#endif /* !STRICT */ +#endif /* !DECLARE_HANDLE32 */ + +#define EXPENTRY WINAPI + +/******** public types ********/ + +DECLARE_HANDLE32(HCONVLIST); +DECLARE_HANDLE32(HCONV); +DECLARE_HANDLE32(HSZ); +DECLARE_HANDLE32(HDDEDATA); + +/* the following structure is for use with XTYP_WILDCONNECT processing. */ + +typedef struct tagHSZPAIR +{ + HSZ hszSvc; + HSZ hszTopic; +} HSZPAIR; +typedef HSZPAIR FAR *PHSZPAIR; + +/* The following structure is used by DdeConnect() and DdeConnectList() and + by XTYP_CONNECT and XTYP_WILDCONNECT callbacks. */ + +typedef struct tagCONVCONTEXT +{ + UINT cb; /* set to sizeof(CONVCONTEXT) */ + UINT wFlags; /* none currently defined. */ + UINT wCountryID; /* country code for topic/item strings used. */ + int iCodePage; /* codepage used for topic/item strings. */ + DWORD dwLangID; /* language ID for topic/item strings. */ + DWORD dwSecurity; /* Private security code. */ +} CONVCONTEXT; +typedef CONVCONTEXT FAR *PCONVCONTEXT; + +/* The following structure is used by DdeQueryConvInfo(): */ + +typedef struct tagCONVINFO +{ + DWORD cb; /* sizeof(CONVINFO) */ + DWORD hUser; /* user specified field */ + HCONV hConvPartner; /* hConv on other end or 0 if non-ddemgr partner */ + HSZ hszSvcPartner; /* app name of partner if obtainable */ + HSZ hszServiceReq; /* AppName requested for connection */ + HSZ hszTopic; /* Topic name for conversation */ + HSZ hszItem; /* transaction item name or NULL if quiescent */ + UINT wFmt; /* transaction format or NULL if quiescent */ + UINT wType; /* XTYP_ for current transaction */ + UINT wStatus; /* ST_ constant for current conversation */ + UINT wConvst; /* XST_ constant for current transaction */ + UINT wLastError; /* last transaction error. */ + HCONVLIST hConvList; /* parent hConvList if this conversation is in a list */ + CONVCONTEXT ConvCtxt; /* conversation context */ +} CONVINFO; +typedef CONVINFO FAR *PCONVINFO; + +/***** conversation states (usState) *****/ + +#define XST_NULL 0 /* quiescent states */ +#define XST_INCOMPLETE 1 +#define XST_CONNECTED 2 +#define XST_INIT1 3 /* mid-initiation states */ +#define XST_INIT2 4 +#define XST_REQSENT 5 /* active conversation states */ +#define XST_DATARCVD 6 +#define XST_POKESENT 7 +#define XST_POKEACKRCVD 8 +#define XST_EXECSENT 9 +#define XST_EXECACKRCVD 10 +#define XST_ADVSENT 11 +#define XST_UNADVSENT 12 +#define XST_ADVACKRCVD 13 +#define XST_UNADVACKRCVD 14 +#define XST_ADVDATASENT 15 +#define XST_ADVDATAACKRCVD 16 + +/* used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... */ +#define CADV_LATEACK 0xFFFF + +/***** conversation status bits (fsStatus) *****/ + +#define ST_CONNECTED 0x0001 +#define ST_ADVISE 0x0002 +#define ST_ISLOCAL 0x0004 +#define ST_BLOCKED 0x0008 +#define ST_CLIENT 0x0010 +#define ST_TERMINATED 0x0020 +#define ST_INLIST 0x0040 +#define ST_BLOCKNEXT 0x0080 +#define ST_ISSELF 0x0100 + +/* DDE constants for wStatus field */ + +#define DDE_FACK 0x8000 +#define DDE_FBUSY 0x4000 +#define DDE_FDEFERUPD 0x4000 +#define DDE_FACKREQ 0x8000 +#define DDE_FRELEASE 0x2000 +#define DDE_FREQUESTED 0x1000 +#define DDE_FACKRESERVED 0x3ff0 +#define DDE_FADVRESERVED 0x3fff +#define DDE_FDATRESERVED 0x4fff +#define DDE_FPOKRESERVED 0xdfff +#define DDE_FAPPSTATUS 0x00ff +#define DDE_FNOTPROCESSED 0x0000 + +/***** message filter hook types *****/ + +#define MSGF_DDEMGR 0x8001 + +/***** codepage constants ****/ + +#define CP_WINANSI 1004 /* default codepage for windows & old DDE convs. */ + +/***** transaction types *****/ + +#define XTYPF_NOBLOCK 0x0002 /* CBR_BLOCK will not work */ +#define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */ +#define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */ + +#define XCLASS_MASK 0xFC00 +#define XCLASS_BOOL 0x1000 +#define XCLASS_DATA 0x2000 +#define XCLASS_FLAGS 0x4000 +#define XCLASS_NOTIFICATION 0x8000 + +#define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) +#define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS ) +#define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK ) +#define XTYP_ADVSTART (0x0030 | XCLASS_BOOL ) +#define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION) +#define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS ) +#define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK) +#define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION ) +#define XTYP_POKE (0x0090 | XCLASS_FLAGS ) +#define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_REQUEST (0x00B0 | XCLASS_DATA ) +#define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK) + +#define XTYP_MASK 0x00F0 +#define XTYP_SHIFT 4 /* shift to turn XTYP_ into an index */ + +/***** Timeout constants *****/ + +#define TIMEOUT_ASYNC -1L + +/***** Transaction ID constants *****/ + +#define QID_SYNC -1L + +/****** public strings used in DDE ******/ + +#define SZDDESYS_TOPIC "System" +#define SZDDESYS_ITEM_TOPICS "Topics" +#define SZDDESYS_ITEM_SYSITEMS "SysItems" +#define SZDDESYS_ITEM_RTNMSG "ReturnMessage" +#define SZDDESYS_ITEM_STATUS "Status" +#define SZDDESYS_ITEM_FORMATS "Formats" +#define SZDDESYS_ITEM_HELP "Help" +#define SZDDE_ITEM_ITEMLIST "TopicItemList" + + +/****** API entry points ******/ + +typedef HDDEDATA CALLBACK FNCALLBACK(UINT wType, UINT wFmt, HCONV hConv, + HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2); +typedef FNCALLBACK *PFNCALLBACK; + +#define CBR_BLOCK 0xffffffffL + +/* DLL registration functions */ + +UINT WINAPI DdeInitialize(DWORD FAR* pidInst, PFNCALLBACK pfnCallback, + DWORD afCmd, DWORD ulRes); + +/* + * Callback filter flags for use with standard apps. + */ + +#define CBF_FAIL_SELFCONNECTIONS 0x00001000 +#define CBF_FAIL_CONNECTIONS 0x00002000 +#define CBF_FAIL_ADVISES 0x00004000 +#define CBF_FAIL_EXECUTES 0x00008000 +#define CBF_FAIL_POKES 0x00010000 +#define CBF_FAIL_REQUESTS 0x00020000 +#define CBF_FAIL_ALLSVRXACTIONS 0x0003f000 + +#define CBF_SKIP_CONNECT_CONFIRMS 0x00040000 +#define CBF_SKIP_REGISTRATIONS 0x00080000 +#define CBF_SKIP_UNREGISTRATIONS 0x00100000 +#define CBF_SKIP_DISCONNECTS 0x00200000 +#define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000 + +/* + * Application command flags + */ +#define APPCMD_CLIENTONLY 0x00000010L +#define APPCMD_FILTERINITS 0x00000020L +#define APPCMD_MASK 0x00000FF0L + +/* + * Application classification flags + */ +#define APPCLASS_STANDARD 0x00000000L +#define APPCLASS_MASK 0x0000000FL + + +BOOL WINAPI DdeUninitialize(DWORD idInst); + +/* conversation enumeration functions */ + +HCONVLIST WINAPI DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic, + HCONVLIST hConvList, CONVCONTEXT FAR* pCC); +HCONV WINAPI DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); +BOOL WINAPI DdeDisconnectList(HCONVLIST hConvList); + +/* conversation control functions */ + +HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic, + CONVCONTEXT FAR* pCC); +BOOL WINAPI DdeDisconnect(HCONV hConv); +HCONV WINAPI DdeReconnect(HCONV hConv); + +UINT WINAPI DdeQueryConvInfo(HCONV hConv, DWORD idTransaction, CONVINFO FAR* pConvInfo); +BOOL WINAPI DdeSetUserHandle(HCONV hConv, DWORD id, DWORD hUser); + +BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction); + + +/* app server interface functions */ + +BOOL WINAPI DdePostAdvise(DWORD idInst, HSZ hszTopic, HSZ hszItem); +BOOL WINAPI DdeEnableCallback(DWORD idInst, HCONV hConv, UINT wCmd); + +#define EC_ENABLEALL 0 +#define EC_ENABLEONE ST_BLOCKNEXT +#define EC_DISABLE ST_BLOCKED +#define EC_QUERYWAITING 2 + +HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd); + +#define DNS_REGISTER 0x0001 +#define DNS_UNREGISTER 0x0002 +#define DNS_FILTERON 0x0004 +#define DNS_FILTEROFF 0x0008 + +/* app client interface functions */ + +HDDEDATA WINAPI DdeClientTransaction(void FAR* pData, DWORD cbData, + HCONV hConv, HSZ hszItem, UINT wFmt, UINT wType, + DWORD dwTimeout, DWORD FAR* pdwResult); + +/* data transfer functions */ + +HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, void FAR* pSrc, DWORD cb, + DWORD cbOff, HSZ hszItem, UINT wFmt, UINT afCmd); +HDDEDATA WINAPI DdeAddData(HDDEDATA hData, void FAR* pSrc, DWORD cb, DWORD cbOff); +DWORD WINAPI DdeGetData(HDDEDATA hData, void FAR* pDst, DWORD cbMax, DWORD cbOff); +BYTE FAR* WINAPI DdeAccessData(HDDEDATA hData, DWORD FAR* pcbDataSize); +BOOL WINAPI DdeUnaccessData(HDDEDATA hData); +BOOL WINAPI DdeFreeDataHandle(HDDEDATA hData); + +#define HDATA_APPOWNED 0x0001 + + + +UINT WINAPI DdeGetLastError(DWORD idInst); + +#define DMLERR_NO_ERROR 0 /* must be 0 */ + +#define DMLERR_FIRST 0x4000 + +#define DMLERR_ADVACKTIMEOUT 0x4000 +#define DMLERR_BUSY 0x4001 +#define DMLERR_DATAACKTIMEOUT 0x4002 +#define DMLERR_DLL_NOT_INITIALIZED 0x4003 +#define DMLERR_DLL_USAGE 0x4004 +#define DMLERR_EXECACKTIMEOUT 0x4005 +#define DMLERR_INVALIDPARAMETER 0x4006 +#define DMLERR_LOW_MEMORY 0x4007 +#define DMLERR_MEMORY_ERROR 0x4008 +#define DMLERR_NOTPROCESSED 0x4009 +#define DMLERR_NO_CONV_ESTABLISHED 0x400a +#define DMLERR_POKEACKTIMEOUT 0x400b +#define DMLERR_POSTMSG_FAILED 0x400c +#define DMLERR_REENTRANCY 0x400d +#define DMLERR_SERVER_DIED 0x400e +#define DMLERR_SYS_ERROR 0x400f +#define DMLERR_UNADVACKTIMEOUT 0x4010 +#define DMLERR_UNFOUND_QUEUE_ID 0x4011 + +#define DMLERR_LAST 0x4011 + +HSZ WINAPI DdeCreateStringHandle(DWORD idInst, LPCSTR psz, int iCodePage); +DWORD WINAPI DdeQueryString(DWORD idInst, HSZ hsz, LPSTR psz, DWORD cchMax, int iCodePage); +BOOL WINAPI DdeFreeStringHandle(DWORD idInst, HSZ hsz); +BOOL WINAPI DdeKeepStringHandle(DWORD idInst, HSZ hsz); +int WINAPI DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); + + +#ifndef NODDEMLSPY +/* */ +/* DDEML public debugging header file info */ +/* */ + +typedef struct tagMONMSGSTRUCT +{ + UINT cb; + HWND hwndTo; + DWORD dwTime; + HANDLE hTask; + UINT wMsg; + WPARAM wParam; + LPARAM lParam; +} MONMSGSTRUCT; + +typedef struct tagMONCBSTRUCT +{ + UINT cb; + WORD wReserved; + DWORD dwTime; + HANDLE hTask; + DWORD dwRet; + UINT wType; + UINT wFmt; + HCONV hConv; + HSZ hsz1; + HSZ hsz2; + HDDEDATA hData; + DWORD dwData1; + DWORD dwData2; +} MONCBSTRUCT; + +typedef struct tagMONHSZSTRUCT +{ + UINT cb; + BOOL fsAction; /* MH_ value */ + DWORD dwTime; + HSZ hsz; + HANDLE hTask; + WORD wReserved; + char str[1]; +} MONHSZSTRUCT; + +#define MH_CREATE 1 +#define MH_KEEP 2 +#define MH_DELETE 3 +#define MH_CLEANUP 4 + + +typedef struct tagMONERRSTRUCT +{ + UINT cb; + UINT wLastError; + DWORD dwTime; + HANDLE hTask; +} MONERRSTRUCT; + +typedef struct tagMONLINKSTRUCT +{ + UINT cb; + DWORD dwTime; + HANDLE hTask; + BOOL fEstablished; + BOOL fNoData; + HSZ hszSvc; + HSZ hszTopic; + HSZ hszItem; + UINT wFmt; + BOOL fServer; + HCONV hConvServer; + HCONV hConvClient; +} MONLINKSTRUCT; + +typedef struct tagMONCONVSTRUCT +{ + UINT cb; + BOOL fConnect; + DWORD dwTime; + HANDLE hTask; + HSZ hszSvc; + HSZ hszTopic; + HCONV hConvClient; + HCONV hConvServer; +} MONCONVSTRUCT; + +#define MAX_MONITORS 4 +#define APPCLASS_MONITOR 0x00000001L +#define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) + +/* + * Callback filter flags for use with MONITOR apps - 0 implies no monitor + * callbacks. + */ +#define MF_HSZ_INFO 0x01000000 +#define MF_SENDMSGS 0x02000000 +#define MF_POSTMSGS 0x04000000 +#define MF_CALLBACKS 0x08000000 +#define MF_ERRORS 0x10000000 +#define MF_LINKS 0x20000000 +#define MF_CONV 0x40000000 + +#define MF_MASK 0xFF000000 +#endif /* NODDEMLSPY */ + +#ifdef __cplusplus +} +#endif + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_DDEML */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/direct.h b/private/oleauto/tools/win16/hdos/c800/include/direct.h new file mode 100644 index 000000000..a3d25b055 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/direct.h @@ -0,0 +1,51 @@ +/*** +*direct.h - function declarations for directory handling/creation +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the library +* functions related to directory handling and creation. +* +****/ + +#ifndef _INC_DIRECT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* function prototypes */ + +int __cdecl _chdir(const char *); +int __cdecl _chdrive(int); +char * __cdecl _getcwd(char *, int); +char * __cdecl _getdcwd(int, char *, int); +int __cdecl _getdrive(void); +int __cdecl _mkdir(const char *); +int __cdecl _rmdir(const char *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl chdir(const char *); +char * __cdecl getcwd(char *, int); +int __cdecl mkdir(const char *); +int __cdecl rmdir(const char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_DIRECT +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/dlgs.h b/private/oleauto/tools/win16/hdos/c800/include/dlgs.h new file mode 100644 index 000000000..d701b0f05 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dlgs.h @@ -0,0 +1,192 @@ +/*****************************************************************************\ +* * +* dlgs.h - Common dialog's dialog element ID numbers * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_DLGS +#define _INC_DLGS + +#define ctlFirst 0x0400 +#define ctlLast 0x04ff + /* Push buttons */ +#define psh1 0x0400 +#define psh2 0x0401 +#define psh3 0x0402 +#define psh4 0x0403 +#define psh5 0x0404 +#define psh6 0x0405 +#define psh7 0x0406 +#define psh8 0x0407 +#define psh9 0x0408 +#define psh10 0x0409 +#define psh11 0x040a +#define psh12 0x040b +#define psh13 0x040c +#define psh14 0x040d +#define psh15 0x040e +#define pshHelp psh15 +#define psh16 0x040f + /* Checkboxes */ +#define chx1 0x0410 +#define chx2 0x0411 +#define chx3 0x0412 +#define chx4 0x0413 +#define chx5 0x0414 +#define chx6 0x0415 +#define chx7 0x0416 +#define chx8 0x0417 +#define chx9 0x0418 +#define chx10 0x0419 +#define chx11 0x041a +#define chx12 0x041b +#define chx13 0x041c +#define chx14 0x041d +#define chx15 0x041e +#define chx16 0x041f + /* Radio buttons */ +#define rad1 0x0420 +#define rad2 0x0421 +#define rad3 0x0422 +#define rad4 0x0423 +#define rad5 0x0424 +#define rad6 0x0425 +#define rad7 0x0426 +#define rad8 0x0427 +#define rad9 0x0428 +#define rad10 0x0429 +#define rad11 0x042a +#define rad12 0x042b +#define rad13 0x042c +#define rad14 0x042d +#define rad15 0x042e +#define rad16 0x042f + /* Groups, frames, rectangles, and icons */ +#define grp1 0x0430 +#define grp2 0x0431 +#define grp3 0x0432 +#define grp4 0x0433 +#define frm1 0x0434 +#define frm2 0x0435 +#define frm3 0x0436 +#define frm4 0x0437 +#define rct1 0x0438 +#define rct2 0x0439 +#define rct3 0x043a +#define rct4 0x043b +#define ico1 0x043c +#define ico2 0x043d +#define ico3 0x043e +#define ico4 0x043f + /* Static text */ +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc5 0x0444 +#define stc6 0x0445 +#define stc7 0x0446 +#define stc8 0x0447 +#define stc9 0x0448 +#define stc10 0x0449 +#define stc11 0x044a +#define stc12 0x044b +#define stc13 0x044c +#define stc14 0x044d +#define stc15 0x044e +#define stc16 0x044f +#define stc17 0x0450 +#define stc18 0x0451 +#define stc19 0x0452 +#define stc20 0x0453 +#define stc21 0x0454 +#define stc22 0x0455 +#define stc23 0x0456 +#define stc24 0x0457 +#define stc25 0x0458 +#define stc26 0x0459 +#define stc27 0x045a +#define stc28 0x045b +#define stc29 0x045c +#define stc30 0x045d +#define stc31 0x045e +#define stc32 0x045f + /* Listboxes */ +#define lst1 0x0460 +#define lst2 0x0461 +#define lst3 0x0462 +#define lst4 0x0463 +#define lst5 0x0464 +#define lst6 0x0465 +#define lst7 0x0466 +#define lst8 0x0467 +#define lst9 0x0468 +#define lst10 0x0469 +#define lst11 0x046a +#define lst12 0x046b +#define lst13 0x046c +#define lst14 0x046d +#define lst15 0x046e +#define lst16 0x046f + /* Combo boxes */ +#define cmb1 0x0470 +#define cmb2 0x0471 +#define cmb3 0x0472 +#define cmb4 0x0473 +#define cmb5 0x0474 +#define cmb6 0x0475 +#define cmb7 0x0476 +#define cmb8 0x0477 +#define cmb9 0x0478 +#define cmb10 0x0479 +#define cmb11 0x047a +#define cmb12 0x047b +#define cmb13 0x047c +#define cmb14 0x047d +#define cmb15 0x047e +#define cmb16 0x047f + /* Edit controls */ +#define edt1 0x0480 +#define edt2 0x0481 +#define edt3 0x0482 +#define edt4 0x0483 +#define edt5 0x0484 +#define edt6 0x0485 +#define edt7 0x0486 +#define edt8 0x0487 +#define edt9 0x0488 +#define edt10 0x0489 +#define edt11 0x048a +#define edt12 0x048b +#define edt13 0x048c +#define edt14 0x048d +#define edt15 0x048e +#define edt16 0x048f + /* Scroll bars */ +#define scr1 0x0490 +#define scr2 0x0491 +#define scr3 0x0492 +#define scr4 0x0493 +#define scr5 0x0494 +#define scr6 0x0495 +#define scr7 0x0496 +#define scr8 0x0497 + +/* These dialog resource ordinals really start at 0x0600, but the + * RC Compiler can't handle hex for resource IDs, hence the decimal. + */ +#define FILEOPENORD 1536 +#define MULTIFILEOPENORD 1537 +#define PRINTDLGORD 1538 +#define PRNSETUPDLGORD 1539 +#define FINDDLGORD 1540 +#define REPLACEDLGORD 1541 +#define FONTDLGORD 1542 +#define FORMATDLGORD31 1543 +#define FORMATDLGORD30 1544 + +#endif /* !_INC_DLGS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/dos.h b/private/oleauto/tools/win16/hdos/c800/include/dos.h new file mode 100644 index 000000000..ac7d26535 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dos.h @@ -0,0 +1,330 @@ +/*** +*dos.h - definitions for MS-DOS interface routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the structs and unions used for the direct DOS interface +* routines; includes macros to access the segment and offset +* values of far pointers, so that they may be used by the routines; and +* provides function prototypes for direct DOS interface functions. +* +****/ + +#ifndef _INC_DOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __interrupt _interrupt +#define __near _near +#endif + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif + +#define _REGS_DEFINED +#endif + + +/* dosexterror structure */ + +#ifndef _DOSERROR_DEFINED +#pragma pack(2) + +struct _DOSERROR { + int exterror; + char errclass; + char action; + char locus; + }; + +#if ((!defined (__STDC__)) && (!defined (__cplusplus))) +/* Non-ANSI name for compatibility */ +struct DOSERROR { + int exterror; + char class; + char action; + char locus; + }; +#endif + +#pragma pack() +#define _DOSERROR_DEFINED +#endif + + +/* _dos_findfirst structure */ + +#ifndef _FIND_T_DEFINED +#pragma pack(2) + +struct _find_t { + char reserved[21]; + char attrib; + unsigned wr_time; + unsigned wr_date; + long size; + char name[13]; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define find_t _find_t +#endif + +#pragma pack() +#define _FIND_T_DEFINED +#endif + + +/* _dos_getdate/_dossetdate and _dos_gettime/_dos_settime structures */ + +#ifndef _DATETIME_T_DEFINED +#pragma pack(2) + +struct _dosdate_t { + unsigned char day; /* 1-31 */ + unsigned char month; /* 1-12 */ + unsigned int year; /* 1980-2099 */ + unsigned char dayofweek; /* 0-6, 0=Sunday */ + }; + +struct _dostime_t { + unsigned char hour; /* 0-23 */ + unsigned char minute; /* 0-59 */ + unsigned char second; /* 0-59 */ + unsigned char hsecond; /* 0-99 */ + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define dosdate_t _dosdate_t +#define dostime_t _dostime_t +#endif + +#pragma pack() +#define _DATETIME_T_DEFINED +#endif + + +/* _dos_getdiskfree structure */ + +#ifndef _DISKFREE_T_DEFINED + +struct _diskfree_t { + unsigned total_clusters; + unsigned avail_clusters; + unsigned sectors_per_cluster; + unsigned bytes_per_sector; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskfree_t _diskfree_t +#endif + +#define _DISKFREE_T_DEFINED +#endif + + +/* manifest constants for _hardresume result parameter */ + +#define _HARDERR_IGNORE 0 /* Ignore the error */ +#define _HARDERR_RETRY 1 /* Retry the operation */ +#define _HARDERR_ABORT 2 /* Abort program issuing Interrupt 23h */ +#define _HARDERR_FAIL 3 /* Fail the system call in progress */ + /* _HARDERR_FAIL is not supported on DOS 2.x */ + +/* File attribute constants */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_VOLID 0x08 /* Volume ID file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +/* macros to break C "far" pointers into their segment and offset components + */ + +#define _FP_SEG(fp) (*((unsigned __far *)&(fp)+1)) +#define _FP_OFF(fp) (*((unsigned __far *)&(fp))) + +/* macro to construct a far pointer from segment and offset values + */ + +#define _MK_FP(seg, offset) (void __far *)(((unsigned long)seg << 16) \ + + (unsigned long)(unsigned)offset) + +/* external variable declarations */ + +extern unsigned int __near __cdecl _osversion; + + +/* function prototypes */ + +#ifndef _MT +int __cdecl _bdos(int, unsigned int, unsigned int); +#ifndef _WINDOWS +void __cdecl _chain_intr(void (__cdecl __interrupt __far *)()); +#endif +void __cdecl _disable(void); +#ifndef _WINDOWS +unsigned __cdecl _dos_allocmem(unsigned, unsigned *); +#endif +unsigned __cdecl _dos_close(int); +unsigned __cdecl _dos_commit(int); +unsigned __cdecl _dos_creat(const char *, unsigned, int *); +unsigned __cdecl _dos_creatnew(const char *, unsigned, int *); +unsigned __cdecl _dos_findfirst(const char *, unsigned, struct _find_t *); +unsigned __cdecl _dos_findnext(struct _find_t *); +#ifndef _WINDOWS +unsigned __cdecl _dos_freemem(unsigned); +#endif +void __cdecl _dos_getdate(struct _dosdate_t *); +void __cdecl _dos_getdrive(unsigned *); +unsigned __cdecl _dos_getdiskfree(unsigned, struct _diskfree_t *); +unsigned __cdecl _dos_getfileattr(const char *, unsigned *); +unsigned __cdecl _dos_getftime(int, unsigned *, unsigned *); +void __cdecl _dos_gettime(struct _dostime_t *); +void (__cdecl __interrupt __far * __cdecl _dos_getvect(unsigned))(); +#ifndef _WINDOWS +void __cdecl _dos_keep(unsigned, unsigned); +#endif +unsigned __cdecl _dos_lock(int, int, unsigned long, unsigned long); +unsigned __cdecl _dos_open(const char *, unsigned, int *); +unsigned __cdecl _dos_read(int, void __far *, unsigned, unsigned *); +unsigned long __cdecl _dos_seek(int, unsigned long, int); +#ifndef _WINDOWS +unsigned __cdecl _dos_setblock(unsigned, unsigned, unsigned *); +#endif +unsigned __cdecl _dos_setdate(struct _dosdate_t *); +void __cdecl _dos_setdrive(unsigned, unsigned *); +unsigned __cdecl _dos_setfileattr(const char *, unsigned); +unsigned __cdecl _dos_setftime(int, unsigned, unsigned); +unsigned __cdecl _dos_settime(struct _dostime_t *); +#ifndef _WINDOWS +void __cdecl _dos_setvect(unsigned, void (__cdecl __interrupt __far *)()); +#endif +unsigned __cdecl _dos_write(int, const void __far *, unsigned, unsigned *); +int __cdecl _dosexterr(struct _DOSERROR *); +void __cdecl _enable(void); +#ifndef _WINDOWS +void __cdecl _harderr(void (__far __cdecl *)(unsigned, unsigned, + unsigned __far *)); +void __cdecl _hardresume(int); +void __cdecl _hardretn(int); +#endif +int __cdecl _intdos(union _REGS *, union _REGS *); +int __cdecl _intdosx(union _REGS *, union _REGS *, struct _SREGS *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); +#endif + +void __cdecl _segread(struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define FP_SEG _FP_SEG +#define FP_OFF _FP_OFF +#define MK_FP _MK_FP + +#ifndef _MT +int __cdecl bdos(int, unsigned int, unsigned int); +int __cdecl intdos(union REGS *, union REGS *); +int __cdecl intdosx(union REGS *, union REGS *, struct SREGS *); +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#ifndef __cplusplus +int __cdecl dosexterr(struct DOSERROR *); +#endif +#endif +void __cdecl segread(struct SREGS *); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_DOS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/drivinit.h b/private/oleauto/tools/win16/hdos/c800/include/drivinit.h new file mode 100644 index 000000000..9db28db67 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/drivinit.h @@ -0,0 +1,2 @@ +/* OBSOLETE: Use print.h instead */ +#include <print.h> diff --git a/private/oleauto/tools/win16/hdos/c800/include/errno.h b/private/oleauto/tools/win16/hdos/c800/include/errno.h new file mode 100644 index 000000000..765712619 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/errno.h @@ -0,0 +1,80 @@ +/*** +*errno.h - system wide error numbers (set by system calls) +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the system-wide error numbers (set by +* system calls). Conforms to the XENIX standard. Extended +* for compatibility with Uniforum standard. +* [ANSI/System V] +* +****/ + +#ifndef _INC_ERRNO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* declare reference to errno */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +#define errno (*_errno()) +#else +extern int __near __cdecl volatile errno; +#endif + +/* Error Codes */ + +#define EZERO 0 +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define EUCLEAN 35 +#define EDEADLOCK 36 + +#ifdef __cplusplus +} +#endif + +#define _INC_ERRNO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fcntl.h b/private/oleauto/tools/win16/hdos/c800/include/fcntl.h new file mode 100644 index 000000000..2cf377be0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fcntl.h @@ -0,0 +1,54 @@ +/*** +*fcntl.h - file control options used by open() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines constants for the file control options used +* by the open() function. +* [System V] +* +****/ + +#ifndef _INC_FCNTL + +#define _O_RDONLY 0x0000 /* open for reading only */ +#define _O_WRONLY 0x0001 /* open for writing only */ +#define _O_RDWR 0x0002 /* open for reading and writing */ +#define _O_APPEND 0x0008 /* writes done at eof */ + +#define _O_CREAT 0x0100 /* create and open file */ +#define _O_TRUNC 0x0200 /* open and truncate */ +#define _O_EXCL 0x0400 /* open only if file doesn't already exist */ + +/* _O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s, +** and <lf> sequences translated to <cr><lf> on write()'s +*/ + +#define _O_TEXT 0x4000 /* file mode is text (translated) */ +#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */ + +/* macro to translate the C 2.0 name used to force binary mode for files */ + +#define _O_RAW _O_BINARY + +/* Open handle inherit bit */ + +#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_RDWR _O_RDWR +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_EXCL _O_EXCL +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY +#define O_NOINHERIT _O_NOINHERIT +#endif + +#define _INC_FCNTL +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd new file mode 100644 index 000000000..68937c99a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd @@ -0,0 +1,372 @@ +C fgraph.fd - declare constants and functions for graphics library +C +C Copyright (c) 1987-1993 Microsoft Corporation. All rights reserved. +C +C Purpose: +C This file declares the graphics library functions and +C the constants that are used with them. +C +C + +$NOTRUNCATE ! required for some names to be significant +$NOTSTRICT ! uses structures which are non-standard conforming + +C User-visible declarations for FORTRAN Graphics Library + +C Structure for getvideoconfig() as visible to user + STRUCTURE/videoconfig/ + INTEGER*2 numxpixels ! number of pixels on X axis + INTEGER*2 numypixels ! number of pixels on Y axis + INTEGER*2 numtextcols ! number of text columns available + INTEGER*2 numtextrows ! number of text rows available + INTEGER*2 numcolors ! number of actual colors + INTEGER*2 bitsperpixel ! number of bits per pixel + INTEGER*2 numvideopages ! number of available video pages + INTEGER*2 mode ! current video mode + INTEGER*2 adapter ! active display adapter + INTEGER*2 monitor ! active display monitor + INTEGER*2 memory ! adapter video memory in K bytes + END STRUCTURE + +C Return value of getcurrentposition(), etc. + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + +C Structure for text position + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + +C ERROR HANDLING + +C Status info returned by grstatus() + INTEGER*2 $GRPARAMETERALTERED,$GRCLIPPED,$GRNOOUTPUT,$GROK, + + $GRERROR,$GRMODENOTSUPPORTED,$GRNOTINPROPERMODE, + + $GRINVALIDPARAMETER,$GRFONTFILENOTFOUND, + + $GRINVALIDFONTFILE,$GRCORRUPTEDFONTFILE, + + $GRINSUFFICIENTMEMORY,$GRINVALIDIMAGEBUFFER +C Successful + PARAMETER($GROK = 0) ! success +C Warnings + PARAMETER($GRNOOUTPUT = 1) ! nothing drawn + PARAMETER($GRCLIPPED = 2) ! output was partially clipped + PARAMETER($GRPARAMETERALTERED = 3) ! input parameters adjusted + PARAMETER($GRTEXTNOTSUPPORTED = 4) ! SuperVGA text output may fail +C Errors + PARAMETER($GRERROR = -1) ! generic graphics error + PARAMETER($GRMODENOTSUPPORTED = -2) ! video mode not supported + PARAMETER($GRNOTINPROPERMODE = -3) ! not supported in current mode + PARAMETER($GRINVALIDPARAMETER = -4) ! bad parameter + PARAMETER($GRFONTFILENOTFOUND = -5) ! font file not found + PARAMETER($GRINVALIDFONTFILE = -6) ! not a font file + PARAMETER($GRCORRUPTEDFONTFILE = -7) ! inconsistent font file + PARAMETER($GRINSUFFICIENTMEMORY = -8) ! out of memory + PARAMETER($GRINVALIDIMAGEBUFFER = -9) ! bad image buffer detected + +C SETUP AND CONFIGURATION + +C Arguments to setvideomode() + INTEGER*2 $MAXRESMODE,$MAXCOLORMODE,$DEFAULTMODE,$TEXTBW40, + + $TEXTC40,$TEXTBW80,$TEXTC80,$MRES4COLOR,$MRESNOCOLOR, + + $HRESBW,$TEXTMONO,$HERCMONO,$MRES16COLOR,$HRES16COLOR, + + $ERESNOCOLOR,$ERESCOLOR,$VRES2COLOR,$VRES16COLOR, + + $MRES256COLOR,$ORESCOLOR,$SRES16COLOR,$SRES256COLOR, + + $XRES16COLOR,$XRES256COLOR,$ZRES16COLOR,$ZRES256COLOR + PARAMETER($MAXRESMODE =-3) ! graphics mode with highest resolution + PARAMETER($MAXCOLORMODE =-2) ! graphics mode with most colors + PARAMETER($DEFAULTMODE =-1) ! restore screen to original mode + PARAMETER($TEXTBW40 =0) ! 40 x 25 text, 16 grey + PARAMETER($TEXTC40 =1) ! 40 x 25 text, 16/8 color + PARAMETER($TEXTBW80 =2) ! 80 x 25 text, 16 grey + PARAMETER($TEXTC80 =3) ! 80 x 25 text, 16/8 color + PARAMETER($MRES4COLOR =4) ! 320 x 200, 4 color + PARAMETER($MRESNOCOLOR =5) ! 320 x 200, 4 grey + PARAMETER($HRESBW =6) ! 640 x 200, BW + PARAMETER($TEXTMONO =7) ! 80 x 25 text, BW + PARAMETER($HERCMONO =8) ! 720 x 348, BW for HGC + PARAMETER($MRES16COLOR =13) ! 320 x 200, 16 color + PARAMETER($HRES16COLOR =14) ! 640 x 200, 16 color + PARAMETER($ERESNOCOLOR =15) ! 640 x 350, BW + PARAMETER($ERESCOLOR =16) ! 640 x 350, 4 or 16 color + PARAMETER($VRES2COLOR =17) ! 640 x 480, BW + PARAMETER($VRES16COLOR =18) ! 640 x 480, 16 color + PARAMETER($MRES256COLOR =19) ! 320 x 200, 256 color + PARAMETER($ORESCOLOR =64) ! 640 x 400, 1 of 16 colors (Olivetti) + +C The following 8 modes require VESA SuperVGA BIOS extensions + PARAMETER($ORES256COLOR =#0100) ! 640 x 400, 256 color + PARAMETER($VRES256COLOR =#0101) ! 640 x 480, 256 color + +C WARNING: DO NOT attempt to set the following modes without ensuring +C that your monitor can safely handle that resolution. Otherwise, you +C may risk damaging your display monitor! Consult your owner's manual +C for details. +C Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES +C modes. + +C Requires NEC MultiSync 3D or equivalent, or better + PARAMETER($SRES16COLOR =#0102) ! 800 x 600, 16 color + PARAMETER($SRES256COLOR =#0103) ! 800 x 600, 256 color + +C Requires NEC MultiSync 4D or equivalent, or better + PARAMETER($XRES16COLOR =#0104) ! 1024 x 768, 16 color + PARAMETER($XRES256COLOR =#0105) ! 1024 x 768, 256 color + +C Requires NEC MultiSync 5D or equivalent, or better + PARAMETER($ZRES16COLOR =#0106) ! 1280 x 1024, 16 color + PARAMETER($ZRES256COLOR =#0107) ! 1280 x 1024, 256 color + +C VIDEOCONFIG adapter values + +C These constants can be used to determine the type of the active +C adapter, using either simple comparisons or the bitwise-AND operator. + INTEGER*2 $QUICKWIN, $MDPA,$CGA,$EGA,$MCGA,$VGA,$HGC,$OCGA, + + $OEGA,$OVGA + PARAMETER($QUICKWIN =#0000) ! QuickWin graphics + PARAMETER($MDPA =#0001) ! Monochrome Display Adapter (MDPA) + PARAMETER($CGA =#0002) ! Color Graphics Adapter (CGA) + PARAMETER($EGA =#0004) ! Enhanced Graphics Adapter (EGA) + PARAMETER($VGA =#0008) ! Video Graphics Array (VGA) + PARAMETER($MCGA =#0010) ! MultiColor Graphics Array (MCGA) + PARAMETER($HGC =#0020) ! Hercules Graphics Card (HGC) + PARAMETER($OCGA =#0042) ! Olivetti Color Graphics Adapter (OCGA) + PARAMETER($OEGA =#0044) ! Olivetti Enhanced Graphics Adapter (OEGA) + PARAMETER($OVGA =#0048) ! Olivetti Video Graphics Array (OVGA) + PARAMETER($SVGA =#0088) ! Super VGA with VESA BIOS support (SVGA) + +C VIDEOCONFIG monitor values + +C These constants can be used to determine the type of monitor in +C use, using either simple comparisons or the bitwise-AND operator + INTEGER*2 $MONO,$COLOR,$ENHCOLOR,$ANALOGMONO, + + $ANALOGCOLOR,$ANALOG + PARAMETER($MONO =#0001) ! Monochrome + PARAMETER($COLOR =#0002) ! Color (or Enhanced emulating color) + PARAMETER($ENHCOLOR =#0004) ! Enhanced Color + PARAMETER($ANALOGMONO =#0008) ! Analog Monochrome only + PARAMETER($ANALOGCOLOR=#0010) ! Analog Color only + PARAMETER($ANALOG =#0018) ! Analog Color + Analog Monochrome + +C COORDINATE SYSTEMS + +C OUTPUT ROUTINES + +C Control parameters for rectangle(), polygon(), ellipse(), and pie() + INTEGER*2 $GBORDER,$GFILLINTERIOR + PARAMETER($GBORDER =2) ! draw outline only + PARAMETER($GFILLINTERIOR =3) ! fill using current fill mask + +C Parameters for clearscreen() + INTEGER*2 $GCLEARSCREEN,$GVIEWPORT,$GWINDOW + PARAMETER($GCLEARSCREEN =0) + PARAMETER($GVIEWPORT =1) + PARAMETER($GWINDOW =2) + +C TEXT + +C Parameters for displaycursor() + INTEGER*2 $GCURSOROFF,$GCURSORON + PARAMETER($GCURSOROFF =0) + PARAMETER($GCURSORON =1) + +C Parameters for wrapon() + INTEGER*2 $GWRAPOFF,$GWRAPON + PARAMETER($GWRAPOFF =0) + PARAMETER($GWRAPON =1) + +C Parameters for scrolltextwindow() + INTEGER*2 $GSCROLLUP,$GSCROLLDOWN + PARAMETER($GSCROLLUP =1) + PARAMETER($GSCROLLDOWN =-1) + +C Request maximum number of rows in _settextrows() and _setvideomoderows() + INTEGER*2 $MAXTEXTROWS + PARAMETER($MAXTEXTROWS =-1) + +C "Action verbs" for putimage(), setwritemode() + INTEGER*2 $GPSET,$GPRESET,$GAND,$GOR,$GXOR + PARAMETER($GPSET =3) + PARAMETER($GPRESET =2) + PARAMETER($GAND =1) + PARAMETER($GOR =0) + PARAMETER($GXOR =4) + +C Color values are used with setbkcolor in graphics modes and also by +C remappalette abd remapallpalette. Also known as palette colors. +C Not to be confused with color indices (aka. color attributes). + +C Universal color values (all color modes): + INTEGER*4 $BLACK,$BLUE,$GREEN,$CYAN,$RED,$MAGENTA,$BROWN, + + $WHITE,$GRAY,$LIGHTBLUE,$LIGHTGREEN,$LIGHTCYAN, + + $LIGHTRED,$LIGHTMAGENTA,$YELLOW,$BRIGHTWHITE + PARAMETER($BLACK =#000000) + PARAMETER($BLUE =#2a0000) + PARAMETER($GREEN =#002a00) + PARAMETER($CYAN =#2a2a00) + PARAMETER($RED =#00002a) + PARAMETER($MAGENTA =#2a002a) + PARAMETER($BROWN =#00152a) + PARAMETER($WHITE =#2a2a2a) + PARAMETER($GRAY =#151515) + PARAMETER($LIGHTBLUE =#3F1515) + PARAMETER($LIGHTGREEN =#153f15) + PARAMETER($LIGHTCYAN =#3f3f15) + PARAMETER($LIGHTRED =#15153f) + PARAMETER($LIGHTMAGENTA =#3f153f) + PARAMETER($YELLOW =#153f3f) + PARAMETER($BRIGHTWHITE =#3f3f3f) + +C The following is obsolescent and defined only for backwards +C compatibility. + INTEGER*4 $LIGHTYELLOW + PARAMETER($LIGHTYELLOW =#153f3f) + +C Mono mode F ($ERESNOCOLOR) color values: + INTEGER*4 $MODEFOFF,$MODEFOFFTOON,$MODEFOFFTOHI,$MODEFONTOOFF, + + $MODEFON,$MODEFONTOHI,$MODEFHITOOFF,$MODEFHITOON, + + $MODEFHI + PARAMETER($MODEFOFF =0) + PARAMETER($MODEFOFFTOON =1) + PARAMETER($MODEFOFFTOHI =2) + PARAMETER($MODEFONTOOFF =3) + PARAMETER($MODEFON =4) + PARAMETER($MODEFONTOHI =5) + PARAMETER($MODEFHITOOFF =6) + PARAMETER($MODEFHITOON =7) + PARAMETER($MODEFHI =8) + +C Mono mode 7 ($TEXTMONO) color values: + INTEGER*4 $MODE7OFF,$MODE7ON,$MODE7HI + PARAMETER($MODE7OFF =0) + PARAMETER($MODE7ON =1) + PARAMETER($MODE7HI =2) + +C External function declarations + + INTEGER*2 grstatus[EXTERN] + INTEGER*2 setvideomode[EXTERN] + INTEGER*2 setvideomoderows[EXTERN] + INTEGER*2 setactivepage[EXTERN] + INTEGER*2 setvisualpage[EXTERN] + INTEGER*2 getactivepage[EXTERN] + INTEGER*2 getvisualpage[EXTERN] + EXTERNAL getvideoconfig + EXTERNAL setvieworg + EXTERNAL getviewcoord + EXTERNAL getphyscoord + EXTERNAL setcliprgn + EXTERNAL setviewport + EXTERNAL clearscreen + EXTERNAL moveto + EXTERNAL getcurrentposition + INTEGER*2 lineto[EXTERN] + INTEGER*2 rectangle[EXTERN] + INTEGER*2 polygon[EXTERN] + INTEGER*2 ellipse[EXTERN] + INTEGER*2 arc[EXTERN] + INTEGER*2 pie[EXTERN] + INTEGER*2 getarcinfo[EXTERN] + INTEGER*2 setpixel[EXTERN] + INTEGER*2 getpixel[EXTERN] + INTEGER*2 floodfill[EXTERN] + INTEGER*2 setcolor[EXTERN] + INTEGER*2 getcolor[EXTERN] + + EXTERNAL setlinestyle + INTEGER*2 getlinestyle[EXTERN] + INTEGER*2 setwritemode[EXTERN] + INTEGER*2 getwritemode[EXTERN] + EXTERNAL setfillmask + EXTERNAL getfillmask + INTEGER*4 setbkcolor[EXTERN] + INTEGER*4 getbkcolor[EXTERN] + INTEGER*4 remappalette[EXTERN] + INTEGER*2 remapallpalette[EXTERN] + INTEGER*2 selectpalette[EXTERN] + INTEGER*2 settextrows[EXTERN] + EXTERNAL settextwindow + EXTERNAL gettextwindow + EXTERNAL scrolltextwindow + EXTERNAL outtext + INTEGER*2 wrapon[EXTERN] + INTEGER*2 displaycursor[EXTERN] + INTEGER*2 settextcursor[EXTERN] + INTEGER*2 gettextcursor[EXTERN] + EXTERNAL settextposition + EXTERNAL gettextposition + INTEGER*2 settextcolor[EXTERN] + INTEGER*2 gettextcolor[EXTERN] + EXTERNAL getimage + EXTERNAL putimage + INTEGER*4 imagesize[EXTERN] + +C External function declarations for QuickWin Graphics API's + INTEGER*2 INCHARQQ[EXTERN] + INTEGER*2 WGOPENQQ[EXTERN] + INTEGER*2 WGCLOSEQQ[EXTERN] + INTEGER*2 WGSETACTIVEQQ[EXTERN] + INTEGER*2 WGGETACTIVEQQ[EXTERN] + +C WINDOW COORDINATE SYSTEM + +C Structure for window coordinate pair + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx ! window x coordinate + DOUBLE PRECISION wy ! window y coordinate + END STRUCTURE + + INTEGER*2 setwindow[EXTERN] + + EXTERNAL getwindowcoord + EXTERNAL getviewcoord_w + EXTERNAL getcurrentposition_w + +C Window coordinate entry points for graphics output routines + + INTEGER*2 arc_w[EXTERN] + INTEGER*2 ellipse_w[EXTERN] + INTEGER*2 floodfill_w[EXTERN] + INTEGER*2 getpixel_w[EXTERN] + INTEGER*2 lineto_w[EXTERN] + EXTERNAL moveto_w + INTEGER*2 pie_w[EXTERN] + INTEGER*2 rectangle_w[EXTERN] + INTEGER*2 polygon_w[EXTERN] + INTEGER*2 setpixel_w[EXTERN] + EXTERNAL getimage_w + INTEGER*4 imagesize_w[EXTERN] + EXTERNAL putimage_w + + STRUCTURE/fontinfo/ + INTEGER*2 type ! b0 set = vector,clear = bit map + INTEGER*2 ascent ! pix dist from top to baseline + INTEGER*2 pixwidth ! character width in pixels, 0=prop + INTEGER*2 pixheight ! character height in pixels + INTEGER*2 avgwidth ! average character width in pixels + CHARACTER*81 filename ! file name including path + CHARACTER*32 facename ! font name + END STRUCTURE + +C Font parameters + + INTEGER*2 $NO_SPACE,$FIXED_SPACE,$PROP_SPACE + PARAMETER ($NO_SPACE = 0) + PARAMETER ($FIXED_SPACE = 1) + PARAMETER ($PROP_SPACE = 2) + + INTEGER*2 $NO_FONT_MAP,$VECTOR_MAP,$BIT_MAP + PARAMETER ($NO_FONT_MAP = 0) + PARAMETER ($VECTOR_MAP = 1) + PARAMETER ($BIT_MAP = 2) + + INTEGER*2 registerfonts[EXTERN] + EXTERNAL unregisterfonts + INTEGER*2 setfont[EXTERN] + INTEGER*2 getfontinfo[EXTERN] + EXTERNAL outgtext + INTEGER*2 getgtextextent[EXTERN] + EXTERNAL setgtextvector + EXTERNAL getgtextvector diff --git a/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi new file mode 100644 index 000000000..e7a34a9a0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi @@ -0,0 +1,506 @@ +C +C fgraph.fi - declare constants and functions for graphics library +C +C Copyright (c) 1987-1993 Microsoft Corporation. All rights reserved. +C +C Purpose: +C This file declares the graphics library functions and +C the manifest constants that are used with them. +C + +$NOTRUNCATE +$NOTSTRICT + +C User-visible declarations for FORTRAN Graphics Library + + INTERFACE TO FUNCTION arc(x1,y1,x2,y2,x3,y3,x4,y4) + INTEGER*2 arc[FAR,C,ALIAS:"__arc"],x1,y1,x2,y2,x3,y3,x4,y4 + END + + INTERFACE TO FUNCTION arc_w(wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4) + INTEGER*2 arc_w[FAR,C,ALIAS:"__arc_w"] + DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4 + END + + INTERFACE TO FUNCTION getarcinfo(lpstart,lpend,lppaint) + INTEGER*2 getarcinfo[FAR,C,ALIAS:"__getarcinfo"] + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/lpstart[FAR,REFERENCE] + RECORD/xycoord/lpend[FAR,REFERENCE] + RECORD/xycoord/lppaint[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + clearscreen[FAR,C,ALIAS:"__clearscreen"](area) + INTEGER*2 area + END + + INTERFACE TO FUNCTION displaycursor(toggle) + INTEGER*2 displaycursor[FAR,C,ALIAS:"__displaycursor"],toggle + END + + INTERFACE TO FUNCTION ellipse(control,x1,y1,x2,y2) + INTEGER*2 ellipse[FAR,C,ALIAS:"__ellipse"],control,x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION ellipse_w(control,wx1,wy1,wx2,wy2) + INTEGER*2 ellipse_w[FAR,C,ALIAS:"__ellipse_w"],control + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION floodfill(x,y,boundary) + INTEGER*2 floodfill[FAR,C,ALIAS:"__floodfill"],x,y,boundary + END + + INTERFACE TO FUNCTION floodfill_w(wx1,wy1,boundary) + INTEGER*2 floodfill_w[FAR,C,ALIAS:"__floodfill_w"],boundary + DOUBLE PRECISION wx1,wy1 + END + + INTERFACE TO FUNCTION getactivepage() + INTEGER*2 getactivepage[FAR,C,ALIAS:"__getactivepage"] + END + + INTERFACE TO FUNCTION getbkcolor() + INTEGER*4 getbkcolor[FAR,C,ALIAS:"__getbkcolor"] + END + + INTERFACE TO FUNCTION getcolor() + INTEGER*2 getcolor[FAR,C,ALIAS:"__getcolor"] + END + + INTERFACE TO SUBROUTINE + + getcurrentposition[FAR,C,ALIAS:"__f_getcurrentposition"](s) + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getcurrentposition_w[FAR,C,ALIAS:"__f_getcurrentposition_wxy"](s) + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getfillmask[FAR,C,ALIAS:"__getfillmask"](mask) + INTEGER*1 mask[FAR,REFERENCE](8) + END + + INTERFACE TO SUBROUTINE + + getimage[FAR,C,ALIAS:"__getimage"](x1,y1,x2,y2,image) + INTEGER*2 x1,y1,x2,y2 + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + getimage_w[FAR,C,ALIAS:"__getimage_w"](wx1,wy1,wx2,wy2,image) + DOUBLE PRECISION wx1,wy1,wx2,wy2 + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO FUNCTION getlinestyle() + INTEGER*2 getlinestyle[FAR,C,ALIAS:"__getlinestyle"] + END + + INTERFACE TO SUBROUTINE + + getphyscoord[FAR,C,ALIAS:"__f_getphyscoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getpixel(x,y) + INTEGER*2 getpixel[FAR,C,ALIAS:"__getpixel"],x,y + END + + INTERFACE TO FUNCTION getpixel_w(wx,wy) + INTEGER*2 getpixel_w[FAR,C,ALIAS:"__getpixel_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO FUNCTION gettextcolor() + INTEGER*2 gettextcolor[FAR,C,ALIAS:"__gettextcolor"] + END + + INTERFACE TO FUNCTION gettextcursor() + INTEGER*2 gettextcursor[FAR,C,ALIAS:"__gettextcursor"] + END + + INTERFACE TO SUBROUTINE + + gettextposition[FAR,C,ALIAS:"__f_gettextposition"](s) + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + RECORD/rccoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + gettextwindow[FAR,C,ALIAS:"__gettextwindow"](r1,c1,r2,c2) + INTEGER*2 r1[FAR,REFERENCE],c1[FAR,REFERENCE] + INTEGER*2 r2[FAR,REFERENCE],c2[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getvideoconfig[FAR,C,ALIAS:"__getvideoconfig"](s) + STRUCTURE/videoconfig/ + INTEGER*2 numxpixels ! number of pixels on X axis + INTEGER*2 numypixels ! number of pixels on Y axis + INTEGER*2 numtextcols ! number of text columns available + INTEGER*2 numtextrows ! number of text rows available + INTEGER*2 numcolors ! number of actual colors + INTEGER*2 bitsperpixel ! number of bits per pixel + INTEGER*2 numvideopages ! number of available video pages + INTEGER*2 mode ! current video mode + INTEGER*2 adapter ! active display adapter + INTEGER*2 monitor ! active display monitor + INTEGER*2 memory ! adapter video memory in K bytes + END STRUCTURE + RECORD/videoconfig/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getviewcoord[FAR,C,ALIAS:"__f_getviewcoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getviewcoord_w[FAR,C,ALIAS:"__f_getviewcoord_w"](wx,wy,s) + DOUBLE PRECISION wx,wy + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getvisualpage() + INTEGER*2 getvisualpage[FAR,C,ALIAS:"__getvisualpage"] + END + + INTERFACE TO SUBROUTINE + + getwindowcoord[FAR,C,ALIAS:"__f_getwindowcoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getwritemode() + INTEGER*2 getwritemode[FAR,C,ALIAS:"__getwritemode"] + END + + INTERFACE TO FUNCTION grstatus() + INTEGER*2 grstatus[FAR,C,ALIAS:"__grstatus"] + END + + INTERFACE TO FUNCTION imagesize(x1,y1,x2,y2) + INTEGER*4 imagesize[FAR,C,ALIAS:"__imagesize"] + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION imagesize_w(wx1,wy1,wx2,wy2) + INTEGER*4 imagesize_w[FAR,C,ALIAS:"__imagesize_w"] + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION lineto(x,y) + INTEGER*2 lineto[FAR,C,ALIAS:"__lineto"],x,y + END + + INTERFACE TO FUNCTION lineto_w(wx,wy) + INTEGER*2 lineto_w[FAR,C,ALIAS:"__lineto_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO SUBROUTINE + + moveto[FAR,C,ALIAS:"__f_moveto"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + moveto_w[FAR,C,ALIAS:"__f_moveto_w"](wx,wy,s) + DOUBLE PRECISION wx,wy + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + outtext[FAR,C,ALIAS:"__f_outtext"](text) + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION pie(i,x1,y1,x2,y2,x3,y3,x4,y4) + INTEGER*2 pie[FAR,C,ALIAS:"__pie"],i,x1,y1,x2,y2,x3,y3,x4,y4 + END + + INTERFACE TO FUNCTION pie_w(i,wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4) + INTEGER*2 pie_w[FAR,C,ALIAS:"__pie_w"],i + DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4 + END + + INTERFACE TO FUNCTION polygon(control,lppoints,cpoints) + INTEGER*2 polygon[FAR,C,ALIAS:"__polygon"],control,cpoints + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/lppoints[FAR,REFERENCE](*) + END + + INTERFACE TO FUNCTION polygon_w(control,lppoints,cpoints) + INTEGER*2 polygon_w[FAR,C,ALIAS:"__polygon_w"],control,cpoints + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/lppoints[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + putimage[FAR,C,ALIAS:"__putimage"](x,y,image,action) + INTEGER*2 x,y,action + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + putimage_w[FAR,C,ALIAS:"__putimage_w"](wx,wy,image,action) + DOUBLE PRECISION wx,wy + INTEGER*1 image[FAR,REFERENCE](*) + INTEGER*2 action + END + + INTERFACE TO FUNCTION rectangle(control,x1,y1,x2,y2) + INTEGER*2 rectangle[FAR,C,ALIAS:"__rectangle"] + INTEGER*2 control,x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION rectangle_w(control,wx1,wy1,wx2,wy2) + INTEGER*2 rectangle_w[FAR,C,ALIAS:"__rectangle_w"],control + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION remappalette(index,color) + INTEGER*4 remappalette[FAR,C,ALIAS:"__remappalette"],color + INTEGER*2 index + END + + INTERFACE TO FUNCTION remapallpalette(colors) + INTEGER*2 remapallpalette[FAR,C,ALIAS:"__remapallpalette"] + INTEGER*4 colors[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + scrolltextwindow[FAR,C,ALIAS:"__scrolltextwindow"](rows) + INTEGER*2 rows + END + + INTERFACE TO FUNCTION selectpalette(number) + INTEGER*2 selectpalette[FAR,C,ALIAS:"__selectpalette"],number + END + + INTERFACE TO FUNCTION setactivepage(page) + INTEGER*2 setactivepage[FAR,C,ALIAS:"__setactivepage"],page + END + + INTERFACE TO FUNCTION setbkcolor(color) + INTEGER*4 setbkcolor[FAR,C,ALIAS:"__setbkcolor"],color + END + + INTERFACE TO SUBROUTINE + + setcliprgn[FAR,C,ALIAS:"__setcliprgn"](x1,y1,x2,y2) + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION setcolor(color) + INTEGER*2 setcolor[FAR,C,ALIAS:"__setcolor"] + INTEGER*2 color + END + + INTERFACE TO SUBROUTINE + + setfillmask[FAR,C,ALIAS:"__setfillmask"](mask) + INTEGER*1 mask[FAR,REFERENCE](8) + END + + INTERFACE TO SUBROUTINE + + setlinestyle[FAR,C,ALIAS:"__setlinestyle"](mask) + INTEGER*2 mask + END + + INTERFACE TO FUNCTION setpixel(x,y) + INTEGER*2 setpixel[FAR,C,ALIAS:"__setpixel"],x,y + END + + INTERFACE TO FUNCTION setpixel_w(wx,wy) + INTEGER*2 setpixel_w[FAR,C,ALIAS:"__setpixel_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO FUNCTION settextcolor(index) + INTEGER*2 settextcolor[FAR,C,ALIAS:"__settextcolor"],index + END + + INTERFACE TO FUNCTION settextcursor(attr) + INTEGER*2 settextcursor[FAR,C,ALIAS:"__settextcursor"],attr + END + + INTERFACE TO SUBROUTINE + + settextposition[FAR,C,ALIAS:"__f_settextposition"](row,col,s) + INTEGER*2 row,col + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + RECORD/rccoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION settextrows(rows) + INTEGER*2 settextrows[FAR,C,ALIAS:"__settextrows"],rows + END + + INTERFACE TO SUBROUTINE + + settextwindow[FAR,C,ALIAS:"__settextwindow"](r1,c1,r2,c2) + INTEGER*2 r1,c1,r2,c2 + END + + INTERFACE TO FUNCTION setvideomode(mode) + INTEGER*2 setvideomode[FAR,C,ALIAS:"__setvideomode"],mode + END + + INTERFACE TO FUNCTION setvideomoderows(mode,rows) + INTEGER*2 setvideomoderows[FAR,C,ALIAS:"__setvideomoderows"] + INTEGER*2 mode,rows + END + + INTERFACE TO SUBROUTINE + + setvieworg[FAR,C,ALIAS:"__f_setvieworg"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + setviewport[FAR,C,ALIAS:"__setviewport"](x1,y1,x2,y2) + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION setvisualpage(page) + INTEGER*2 setvisualpage[FAR,C,ALIAS:"__setvisualpage"],page + END + + INTERFACE TO FUNCTION setwindow(finvert,wx1,wy1,wx2,wy2) + INTEGER*2 setwindow[FAR,C,ALIAS:"__setwindow"] + LOGICAL*2 finvert + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION setwritemode(wmode) + INTEGER*2 setwritemode[FAR,C,ALIAS:"__setwritemode"],wmode + END + + INTERFACE TO FUNCTION wrapon(option) + INTEGER*2 wrapon[FAR,C,ALIAS:"__wrapon"],option + END + +C FONTS + + INTERFACE TO FUNCTION getfontinfo(fi) + INTEGER*2 getfontinfo[FAR,C,ALIAS:"__f_getfontinfo"] + STRUCTURE/fontinfo/ + INTEGER*2 type ! b0 set = vector,clear = bit map + INTEGER*2 ascent ! pix dist from top to baseline + INTEGER*2 pixwidth ! character width in pixels, 0=prop + INTEGER*2 pixheight ! character height in pixels + INTEGER*2 avgwidth ! average character width in pixels + CHARACTER*81 filename ! file name including path + CHARACTER*32 facename ! font name + END STRUCTURE + RECORD/fontinfo/fi[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getgtextextent(text) + INTEGER*2 getgtextextent[FAR,C,ALIAS:"__f_getgtextextent"] + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getgtextvector[FAR,C,ALIAS:"__f_getgtextvector"](x,y) + INTEGER*2 x[FAR,REFERENCE],y[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + outgtext[FAR,C,ALIAS:"__f_outgtext"](text) + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION registerfonts(filename) + INTEGER*2 registerfonts[FAR,C,ALIAS:"__f_registerfonts"] + CHARACTER*(*) filename[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION setfont(options) + INTEGER*2 setfont[FAR,C,ALIAS:"__f_setfont"] + CHARACTER*(*) options[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + setgtextvector[FAR,C,ALIAS:"__setgtextvector"](x,y) + INTEGER*2 x,y + END + + INTERFACE TO SUBROUTINE + + unregisterfonts[FAR,C,ALIAS:"__unregisterfonts"]() + END + +C QuickWin Graphics API's + + INTERFACE TO FUNCTION INCHARQQ() + INTEGER*2 INCHARQQ[FAR,C,ALIAS:"__inchar"] + END + + INTERFACE TO FUNCTION WGOPENQQ(name) + INTEGER*2 WGOPENQQ[FAR,C,ALIAS:"__wgopen"] + CHARACTER*(*) name[REFERENCE] + END + + INTERFACE TO FUNCTION WGCLOSEQQ(handle) + INTEGER*2 WGCLOSEQQ[FAR,C,ALIAS:"__wgclose"], handle + END + + INTERFACE TO FUNCTION WGSETACTIVEQQ(handle) + INTEGER*2 WGSETACTIVEQQ[FAR,C,ALIAS:"__wgsetactive"], handle + END + + INTERFACE TO FUNCTION WGGETACTIVEQQ() + INTEGER*2 WGGETACTIVEQQ[FAR,C,ALIAS:"__wggetactive"] + END diff --git a/private/oleauto/tools/win16/hdos/c800/include/float.h b/private/oleauto/tools/win16/hdos/c800/include/float.h new file mode 100644 index 000000000..2658e94e3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/float.h @@ -0,0 +1,213 @@ +/*** +*float.h - constants for floating point values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains defines for a number of implementation dependent +* values which are commonly used by sophisticated numerical (floating +* point) programs. +* [ANSI] +* +****/ + +#ifndef _INC_FLOAT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#define DBL_DIG 15 /* # of decimal digits of precision */ +#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ +#define DBL_MANT_DIG 53 /* # of bits in mantissa */ +#define DBL_MAX 1.7976931348623158e+308 /* max value */ +#define DBL_MAX_10_EXP 308 /* max decimal exponent */ +#define DBL_MAX_EXP 1024 /* max binary exponent */ +#define DBL_MIN 2.2250738585072014e-308 /* min positive value */ +#define DBL_MIN_10_EXP (-307) /* min decimal exponent */ +#define DBL_MIN_EXP (-1021) /* min binary exponent */ +#define _DBL_RADIX 2 /* exponent radix */ +#define _DBL_ROUNDS 1 /* addition rounding: near */ + +#define FLT_DIG 6 /* # of decimal digits of precision */ +#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */ +#define FLT_GUARD 0 +#define FLT_MANT_DIG 24 /* # of bits in mantissa */ +#define FLT_MAX 3.402823466e+38F /* max value */ +#define FLT_MAX_10_EXP 38 /* max decimal exponent */ +#define FLT_MAX_EXP 128 /* max binary exponent */ +#define FLT_MIN 1.175494351e-38F /* min positive value */ +#define FLT_MIN_10_EXP (-37) /* min decimal exponent */ +#define FLT_MIN_EXP (-125) /* min binary exponent */ +#define FLT_NORMALIZE 0 +#define FLT_RADIX 2 /* exponent radix */ +#define FLT_ROUNDS 1 /* addition rounding: near */ + +#define LDBL_DIG 18 /* # of decimal digits of precision */ +#define LDBL_EPSILON 1.084202172485504434e-019L /* smallest such that 1.0+LDBL_EPSILON != 1.0 */ +#define LDBL_MANT_DIG 64 /* # of bits in mantissa */ +#define LDBL_MAX 1.189731495357231765e+4932L /* max value */ +#define LDBL_MAX_10_EXP 4932 /* max decimal exponent */ +#define LDBL_MAX_EXP 16384 /* max binary exponent */ +#define LDBL_MIN 3.3621031431120935063e-4932L /* min positive value */ +#define LDBL_MIN_10_EXP (-4931) /* min decimal exponent */ +#define LDBL_MIN_EXP (-16381) /* min binary exponent */ +#define _LDBL_RADIX 2 /* exponent radix */ +#define _LDBL_ROUNDS 1 /* addition rounding: near */ + + +/* + * 8087/80287 math control information + */ + + +/* User Control Word Mask and bit definitions. + * These definitions match the 8087/80287 + */ + +#define _MCW_EM 0x003f /* interrupt Exception Masks */ +#define _EM_INVALID 0x0001 /* invalid */ +#define _EM_DENORMAL 0x0002 /* denormal */ +#define _EM_ZERODIVIDE 0x0004 /* zero divide */ +#define _EM_OVERFLOW 0x0008 /* overflow */ +#define _EM_UNDERFLOW 0x0010 /* underflow */ +#define _EM_INEXACT 0x0020 /* inexact (precision) */ + +#define _MCW_IC 0x1000 /* Infinity Control */ +#define _IC_AFFINE 0x1000 /* affine */ +#define _IC_PROJECTIVE 0x0000 /* projective */ + +#define _MCW_RC 0x0c00 /* Rounding Control */ +#define _RC_CHOP 0x0c00 /* chop */ +#define _RC_UP 0x0800 /* up */ +#define _RC_DOWN 0x0400 /* down */ +#define _RC_NEAR 0x0000 /* near */ + +#define _MCW_PC 0x0300 /* Precision Control */ +#define _PC_24 0x0000 /* 24 bits */ +#define _PC_53 0x0200 /* 53 bits */ +#define _PC_64 0x0300 /* 64 bits */ + + +/* initial Control Word value */ + +#define _CW_DEFAULT ( _IC_AFFINE + _RC_NEAR + _PC_64 + _EM_DENORMAL + _EM_UNDERFLOW + _EM_INEXACT ) + + +/* user Status Word bit definitions */ + +#define _SW_INVALID 0x0001 /* invalid */ +#define _SW_DENORMAL 0x0002 /* denormal */ +#define _SW_ZERODIVIDE 0x0004 /* zero divide */ +#define _SW_OVERFLOW 0x0008 /* overflow */ +#define _SW_UNDERFLOW 0x0010 /* underflow */ +#define _SW_INEXACT 0x0020 /* inexact (precision) */ + + +/* invalid subconditions (_SW_INVALID also set) */ + +#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ +#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ +#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ +#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ + + +/* Floating point error signals and return codes */ + +#define _FPE_INVALID 0x81 +#define _FPE_DENORMAL 0x82 +#define _FPE_ZERODIVIDE 0x83 +#define _FPE_OVERFLOW 0x84 +#define _FPE_UNDERFLOW 0x85 +#define _FPE_INEXACT 0x86 + +#define _FPE_UNEMULATED 0x87 +#define _FPE_SQRTNEG 0x88 +#define _FPE_STACKOVERFLOW 0x8a +#define _FPE_STACKUNDERFLOW 0x8b + +#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ + + +/* function prototypes */ + +unsigned int __cdecl _clear87(void); +unsigned int __cdecl _control87(unsigned int, unsigned int); +void __cdecl _fpreset(void); +unsigned int __cdecl _status87(void); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DBL_RADIX _DBL_RADIX +#define DBL_ROUNDS _DBL_ROUNDS + +#define LDBL_RADIX _LDBL_RADIX +#define LDBL_ROUNDS _LDBL_ROUNDS + +#define MCW_EM _MCW_EM +#define EM_INVALID _EM_INVALID +#define EM_DENORMAL _EM_DENORMAL +#define EM_ZERODIVIDE _EM_ZERODIVIDE +#define EM_OVERFLOW _EM_OVERFLOW +#define EM_UNDERFLOW _EM_UNDERFLOW +#define EM_INEXACT _EM_INEXACT + +#define MCW_IC _MCW_IC +#define IC_AFFINE _IC_AFFINE +#define IC_PROJECTIVE _IC_PROJECTIVE + +#define MCW_RC _MCW_RC +#define RC_CHOP _RC_CHOP +#define RC_UP _RC_UP +#define RC_DOWN _RC_DOWN +#define RC_NEAR _RC_NEAR + +#define MCW_PC _MCW_PC +#define PC_24 _PC_24 +#define PC_53 _PC_53 +#define PC_64 _PC_64 + +#define CW_DEFAULT _CW_DEFAULT + +#define SW_INVALID _SW_INVALID +#define SW_DENORMAL _SW_DENORMAL +#define SW_ZERODIVIDE _SW_ZERODIVIDE +#define SW_OVERFLOW _SW_OVERFLOW +#define SW_UNDERFLOW _SW_UNDERFLOW +#define SW_INEXACT _SW_INEXACT + +#define SW_UNEMULATED _SW_UNEMULATED +#define SW_SQRTNEG _SW_SQRTNEG +#define SW_STACKOVERFLOW _SW_STACKOVERFLOW +#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW + +#define FPE_INVALID _FPE_INVALID +#define FPE_DENORMAL _FPE_DENORMAL +#define FPE_ZERODIVIDE _FPE_ZERODIVIDE +#define FPE_OVERFLOW _FPE_OVERFLOW +#define FPE_UNDERFLOW _FPE_UNDERFLOW +#define FPE_INEXACT _FPE_INEXACT + +#define FPE_UNEMULATED _FPE_UNEMULATED +#define FPE_SQRTNEG _FPE_SQRTNEG +#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW +#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW + +#define FPE_EXPLICITGEN _FPE_EXPLICITGEN + +#endif + + +#ifdef __cplusplus +} +#endif + +#define _INC_FLOAT +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fstream.h b/private/oleauto/tools/win16/hdos/c800/include/fstream.h new file mode 100644 index 000000000..e7865980b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fstream.h @@ -0,0 +1,141 @@ +/*** +*fstream.h - definitions/declarations for filebuf and fstream classes +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the filebuf and fstream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_FSTREAM +#define _INC_FSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef int filedesc; + +class filebuf : public streambuf { +public: +static const int openprot; // default share/prot mode for open + +// optional share values for 3rd argument (prot) of open or constructor +static const int sh_compat; // compatibility share mode +static const int sh_none; // exclusive mode no sharing +static const int sh_read; // allow read sharing +static const int sh_write; // allow write sharing +// use (sh_read | sh_write) to allow both read and write sharing + +// options for setmode member function +static const int binary; +static const int text; + + filebuf(); + filebuf(filedesc); + filebuf(filedesc, char _HFAR_ *, int); + ~filebuf(); + + filebuf* attach(filedesc); + filedesc fd() const { return (x_fd==-1) ? EOF : x_fd; } + int is_open() const { return (x_fd!=-1); } + filebuf* open(const char _HFAR_ *, int, int = filebuf::openprot); + filebuf* close(); + int setmode(int = filebuf::text); + +virtual int overflow(int=EOF); +virtual int underflow(); + +virtual streambuf* setbuf(char _HFAR_ *, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +// virtual streampos seekpos(streampos, int); +virtual int sync(); + +private: + filedesc x_fd; + int x_fOpened; +}; + +class ifstream : public istream { +public: + ifstream(); + ifstream(const char _HFAR_ *, int =ios::in, int = filebuf::openprot); + ifstream(filedesc); + ifstream(filedesc, char _HFAR_ *, int); + ~ifstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int =ios::in, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class ofstream : public ostream { +public: + ofstream(); + ofstream(const char _HFAR_ *, int =ios::out, int = filebuf::openprot); + ofstream(filedesc); + ofstream(filedesc, char _HFAR_ *, int); + ~ofstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int =ios::out, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class fstream : public iostream { +public: + fstream(); + fstream(const char _HFAR_ *, int, int = filebuf::openprot); + fstream(filedesc); + fstream(filedesc, char _HFAR_ *, int); + ~fstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ostream::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +// manipulators to dynamically change file access mode (filebufs only) +inline ios& binary(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::binary); return _fstrm; } +inline ios& text(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::text); return _fstrm; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/graph.h b/private/oleauto/tools/win16/hdos/c800/include/graph.h new file mode 100644 index 000000000..ee2eeb316 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/graph.h @@ -0,0 +1,485 @@ +/*** +*graph.h - declare constants, functions, and macros for graphics library +* +* Copyright (c) 1987 - 1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the graphics library functions and the +* structures and manifest constants that are used with them. +* +***************************************************************************/ + +#ifndef _WINDOWS +/* Force graphics.lib to be linked in if graph.h used */ +#pragma comment(lib,"graphics.lib") +#endif + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#endif + +/* force word packing to avoid possible -Zp override */ +#pragma pack(2) + + +/* user-visible declarations for Quick-C Graphics Library */ + +#ifndef _VIDEOCONFIG_DEFINED +/* structure for _getvideoconfig() as visible to user */ +struct _videoconfig { + short numxpixels; /* number of pixels on X axis */ + short numypixels; /* number of pixels on Y axis */ + short numtextcols; /* number of text columns available */ + short numtextrows; /* number of text rows available */ + short numcolors; /* number of actual colors */ + short bitsperpixel; /* number of bits per pixel */ + short numvideopages; /* number of available video pages */ + short mode; /* current video mode */ + short adapter; /* active display adapter */ + short monitor; /* active display monitor */ + short memory; /* adapter video memory in K bytes */ +}; +#define _VIDEOCONFIG_DEFINED +#endif + +#ifndef _XYCOORD_DEFINED +/* return value of _setvieworg(), etc. */ +struct _xycoord { + short xcoord; + short ycoord; +}; +#define _XYCOORD_DEFINED +#endif + +/* structure for text position */ +#ifndef _RCCOORD_DEFINED +struct _rccoord { + short row; + short col; +}; +#define _RCCOORD_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define videoconfig _videoconfig +#define xycoord _xycoord +#define rccoord _rccoord +#endif + + +/* ERROR HANDLING */ +short __far __cdecl _grstatus(void); + +/* Error Status Information returned by _grstatus() */ + +/* successful */ +#define _GROK 0 + +/* errors */ +#define _GRERROR (-1) +#define _GRMODENOTSUPPORTED (-2) +#define _GRNOTINPROPERMODE (-3) +#define _GRINVALIDPARAMETER (-4) +#define _GRFONTFILENOTFOUND (-5) +#define _GRINVALIDFONTFILE (-6) +#define _GRCORRUPTEDFONTFILE (-7) +#define _GRINSUFFICIENTMEMORY (-8) +#define _GRINVALIDIMAGEBUFFER (-9) + +/* warnings */ +#define _GRNOOUTPUT 1 +#define _GRCLIPPED 2 +#define _GRPARAMETERALTERED 3 +#define _GRTEXTNOTSUPPORTED 4 + + +/* SETUP AND CONFIGURATION */ + +short __far __cdecl _setvideomode(short); +short __far __cdecl _setvideomoderows(short,short); /* return rows; 0 if error */ + +/* arguments to _setvideomode() */ +#define _MAXRESMODE (-3) /* graphics mode with highest resolution */ +#define _MAXCOLORMODE (-2) /* graphics mode with most colors */ +#define _DEFAULTMODE (-1) /* restore screen to original mode */ +#define _TEXTBW40 0 /* 40-column text, 16 grey */ +#define _TEXTC40 1 /* 40-column text, 16/8 color */ +#define _TEXTBW80 2 /* 80-column text, 16 grey */ +#define _TEXTC80 3 /* 80-column text, 16/8 color */ +#define _MRES4COLOR 4 /* 320 x 200, 4 color */ +#define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */ +#define _HRESBW 6 /* 640 x 200, BW */ +#define _TEXTMONO 7 /* 80-column text, BW */ +#define _HERCMONO 8 /* 720 x 348, BW for HGC */ +#define _MRES16COLOR 13 /* 320 x 200, 16 color */ +#define _HRES16COLOR 14 /* 640 x 200, 16 color */ +#define _ERESNOCOLOR 15 /* 640 x 350, BW */ +#define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */ +#define _VRES2COLOR 17 /* 640 x 480, BW */ +#define _VRES16COLOR 18 /* 640 x 480, 16 color */ +#define _MRES256COLOR 19 /* 320 x 200, 256 color */ +#define _ORESCOLOR 64 /* 640 x 400, 1 of 16 colors (Olivetti only) */ + +/* the following 8 modes require VESA SuperVGA BIOS extensions */ +#define _ORES256COLOR 0x0100 /* 640 x 400, 256 color */ +#define _VRES256COLOR 0x0101 /* 640 x 480, 256 color */ + +/* WARNING: DO NOT attempt to set the following modes without ensuring that + your monitor can safely handle that resolution. Otherwise, you may risk + damaging your display monitor! Consult your owner's manual for details. + Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES modes */ + +/* requires NEC MultiSync 3D or equivalent, or better */ +#define _SRES16COLOR 0x0102 /* 800 x 600, 16 color */ +#define _SRES256COLOR 0x0103 /* 800 x 600, 256 color */ + +/* requires NEC MultiSync 4D or equivalent, or better */ +#define _XRES16COLOR 0x0104 /* 1024 x 768, 16 color */ +#define _XRES256COLOR 0x0105 /* 1024 x 768, 256 color */ + +/* requires NEC MultiSync 5D or equivalent, or better */ +#define _ZRES16COLOR 0x0106 /* 1280 x 1024, 16 color */ +#define _ZRES256COLOR 0x0107 /* 1280 x 1024, 256 color */ + + +short __far __cdecl _setactivepage(short); +short __far __cdecl _setvisualpage(short); +short __far __cdecl _getactivepage(void); +short __far __cdecl _getvisualpage(void); + +/* _videoconfig adapter values */ +/* these manifest constants can be used to determine the type of the active */ +/* adapter, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */ +#define _CGA 0x0002 /* Color Graphics Adapter (CGA) */ +#define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */ +#define _VGA 0x0008 /* Video Graphics Array (VGA) */ +#define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */ +#define _HGC 0x0020 /* Hercules Graphics Card (HGC) */ +#define _OCGA 0x0042 /* Olivetti Color Graphics Adapter (OCGA) */ +#define _OEGA 0x0044 /* Olivetti Enhanced Graphics Adapter (OEGA) */ +#define _OVGA 0x0048 /* Olivetti Video Graphics Array (OVGA) */ +#define _SVGA 0x0088 /* Super VGA with VESA BIOS support (SVGA) */ + +/* _videoconfig monitor values */ +/* these manifest constants can be used to determine the type of monitor in */ +/* use, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MONO 0x0001 /* Monochrome */ +#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */ +#define _ENHCOLOR 0x0004 /* Enhanced Color */ +#define _ANALOGMONO 0x0008 /* Analog Monochrome only */ +#define _ANALOGCOLOR 0x0010 /* Analog Color only */ +#define _ANALOG 0x0018 /* Analog Monochrome and Color modes */ + +struct _videoconfig __far * __far __cdecl _getvideoconfig(struct _videoconfig __far *); + + +/* COORDINATE SYSTEMS */ + +struct _xycoord __far __cdecl _setvieworg(short, short); +#define _setlogorg _setvieworg /* obsolescent */ + +struct _xycoord __far __cdecl _getviewcoord(short, short); +#define _getlogcoord _getviewcoord /* obsolescent */ + +struct _xycoord __far __cdecl _getphyscoord(short, short); + +void __far __cdecl _setcliprgn(short, short, short, short); +void __far __cdecl _setviewport(short, short, short, short); + + +/* OUTPUT ROUTINES */ + +/* control parameters for _ellipse, _rectangle, _pie and _polygon */ +#define _GBORDER 2 /* draw outline only */ +#define _GFILLINTERIOR 3 /* fill using current fill mask */ + +/* parameters for _clearscreen */ +#define _GCLEARSCREEN 0 +#define _GVIEWPORT 1 +#define _GWINDOW 2 + +void __far __cdecl _clearscreen(short); + +struct _xycoord __far __cdecl _moveto(short, short); +struct _xycoord __far __cdecl _getcurrentposition(void); + +short __far __cdecl _lineto(short, short); +short __far __cdecl _rectangle(short, short, short, short, short); +short __far __cdecl _polygon(short, const struct _xycoord __far *, short); +short __far __cdecl _arc(short, short, short, short, short, short, short, short); +short __far __cdecl _ellipse(short, short, short, short, short); +short __far __cdecl _pie(short, short, short, short, short, short, short, short, short); + +short __far __cdecl _getarcinfo(struct _xycoord __far *, struct _xycoord __far *, struct _xycoord __far *); + +short __far __cdecl _setpixel(short, short); +short __far __cdecl _getpixel(short, short); +short __far __cdecl _floodfill(short, short, short); + + +/* PEN COLOR, LINE STYLE, WRITE MODE, FILL PATTERN */ + +short __far __cdecl _setcolor(short); +short __far __cdecl _getcolor(void); + +void __far __cdecl _setlinestyle(unsigned short); +unsigned short __far __cdecl _getlinestyle(void); + +short __far __cdecl _setwritemode(short); +short __far __cdecl _getwritemode(void); + +void __far __cdecl _setfillmask(const unsigned char __far *); +unsigned char __far * __far __cdecl _getfillmask(unsigned char __far *); + + +/* COLOR SELECTION */ + +long __far __cdecl _setbkcolor(long); +long __far __cdecl _getbkcolor(void); + +long __far __cdecl _remappalette(short, long); +short __far __cdecl _remapallpalette(const long __far *); +short __far __cdecl _selectpalette(short); + + +/* TEXT */ +/* parameters for _displaycursor */ +#define _GCURSOROFF 0 +#define _GCURSORON 1 + +/* parameters for _wrapon */ +#define _GWRAPOFF 0 +#define _GWRAPON 1 + + +/* direction parameters for _scrolltextwindow */ +#define _GSCROLLUP 1 +#define _GSCROLLDOWN (-1) + +/* request maximum number of rows in _settextrows and _setvideomoderows */ +#define _MAXTEXTROWS (-1) + +short __far __cdecl _settextrows(short); /* returns # rows set; 0 if error */ +void __far __cdecl _settextwindow(short, short, short, short); +void __far __cdecl _gettextwindow(short __far *, short __far *, short __far *, short __far *); +void __far __cdecl _scrolltextwindow(short); +void __far __cdecl _outmem(const char __far *, short); +void __far __cdecl _outtext(const char __far *); +short __far __cdecl _inchar(void); +short __far __cdecl _wrapon(short); + +short __far __cdecl _displaycursor(short); +short __far __cdecl _settextcursor(short); +short __far __cdecl _gettextcursor(void); + +struct _rccoord __far __cdecl _settextposition(short, short); +struct _rccoord __far __cdecl _gettextposition(void); + +short __far __cdecl _settextcolor(short); +short __far __cdecl _gettextcolor(void); + + +/* SCREEN IMAGES */ + +void __far __cdecl _getimage(short, short, short, short, char __huge *); +void __far __cdecl _putimage(short, short, char __huge *, short); +long __far __cdecl _imagesize(short, short, short, short); + +/* "action verbs" for _putimage() and _setwritemode() */ +#define _GPSET 3 +#define _GPRESET 2 +#define _GAND 1 +#define _GOR 0 +#define _GXOR 4 + + +/* Color values are used with _setbkcolor in graphics modes and also by + _remappalette and _remapallpalette. Also known as palette colors. + Not to be confused with color indices (aka. color attributes). */ + +/* universal color values (all color modes): */ +#define _BLACK 0x000000L +#define _BLUE 0x2a0000L +#define _GREEN 0x002a00L +#define _CYAN 0x2a2a00L +#define _RED 0x00002aL +#define _MAGENTA 0x2a002aL +#define _BROWN 0x00152aL +#define _WHITE 0x2a2a2aL +#define _GRAY 0x151515L +#define _LIGHTBLUE 0x3F1515L +#define _LIGHTGREEN 0x153f15L +#define _LIGHTCYAN 0x3f3f15L +#define _LIGHTRED 0x15153fL +#define _LIGHTMAGENTA 0x3f153fL +#define _YELLOW 0x153f3fL +#define _BRIGHTWHITE 0x3f3f3fL + +/* the following is obsolescent and defined only for backward compatibility */ +#define _LIGHTYELLOW _YELLOW + +/* mono mode F (_ERESNOCOLOR) color values: */ +#define _MODEFOFF 0L +#define _MODEFOFFTOON 1L +#define _MODEFOFFTOHI 2L +#define _MODEFONTOOFF 3L +#define _MODEFON 4L +#define _MODEFONTOHI 5L +#define _MODEFHITOOFF 6L +#define _MODEFHITOON 7L +#define _MODEFHI 8L + +/* mono mode 7 (_TEXTMONO) color values: */ +#define _MODE7OFF 0L +#define _MODE7ON 1L +#define _MODE7HI 2L + + +/* Warning: these '_xy' entrypoints are undocumented. + They may or may not be supported in future versions. */ +struct _xycoord __far __cdecl _moveto_xy(struct _xycoord); +short __far __cdecl _lineto_xy(struct _xycoord); +short __far __cdecl _rectangle_xy(short,struct _xycoord,struct _xycoord); +short __far __cdecl _arc_xy(struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _ellipse_xy(short, struct _xycoord, struct _xycoord); +short __far __cdecl _pie_xy(short, struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _getpixel_xy(struct _xycoord); +short __far __cdecl _setpixel_xy(struct _xycoord); +short __far __cdecl _floodfill_xy(struct _xycoord, short); +void __far __cdecl _getimage_xy(struct _xycoord,struct _xycoord, char __huge *); +long __far __cdecl _imagesize_xy(struct _xycoord,struct _xycoord); +void __far __cdecl _putimage_xy(struct _xycoord, char __huge *, short); + + +/* WINDOW COORDINATE SYSTEM */ + +#ifndef _WXYCOORD_DEFINED +/* structure for window coordinate pair */ +struct _wxycoord { + double wx; /* window x coordinate */ + double wy; /* window y coordinate */ + }; +#define _WXYCOORD_DEFINED +#endif + + +/* define real coordinate window - returns non-zero if successful */ +short __far __cdecl _setwindow(short,double,double,double,double); + +/* convert from view to window coordinates */ +struct _wxycoord __far __cdecl _getwindowcoord(short,short); +struct _wxycoord __far __cdecl _getwindowcoord_xy(struct _xycoord); + +/* convert from window to view coordinates */ +struct _xycoord __far __cdecl _getviewcoord_w(double,double); +struct _xycoord __far __cdecl _getviewcoord_wxy(const struct _wxycoord __far *); + +/* return the window coordinates of the current graphics output + position as an _wxycoord structure. no error return. */ +struct _wxycoord __far __cdecl _getcurrentposition_w(void); + + +/* window coordinate entry points for graphics output routines */ + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _arc_w(double, double, double, double, double, double, double, double); +short __far __cdecl _arc_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _ellipse_w(short, double, double, double, double); +short __far __cdecl _ellipse_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _floodfill_w(double, double, short); + +/* returns pixel value at given point; -1 if unsuccessful. */ +short __far __cdecl _getpixel_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _lineto_w(double, double); + +/* returns the view coordinates of the previous output + position as a _wxycoord structure. no error return */ +struct _wxycoord __far __cdecl _moveto_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _pie_w(short, double, double, double, double, double, double, double, double); +short __far __cdecl _pie_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _rectangle_w(short, double, double, double, double); +short __far __cdecl _rectangle_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _polygon_w(short, const double __far *, short); +short __far __cdecl _polygon_wxy(short, const struct _wxycoord __far *, short); + +/* returns previous color; -1 if unsuccessful */ +short __far __cdecl _setpixel_w(double, double); + + +/* window coordinate image routines */ + +/* no return value */ +void __far __cdecl _getimage_w(double, double, double, double, char __huge *); +void __far __cdecl _getimage_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, char __huge *); + +/* returns the image's storage size in bytes */ +long __far __cdecl _imagesize_w(double, double, double, double); +long __far __cdecl _imagesize_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* no return value */ +void __far __cdecl _putimage_w(double, double ,char __huge * ,short); + + +/* FONTS */ + +#ifndef _FONTINFO_DEFINED +/* structure for _getfontinfo() */ +struct _fontinfo { + int type; /* b0 set = vector,clear = bit map */ + int ascent; /* pix dist from top to baseline */ + int pixwidth; /* character width in pixels, 0=prop */ + int pixheight; /* character height in pixels */ + int avgwidth; /* average character width in pixels */ + char filename[81]; /* file name including path */ + char facename[32]; /* font name */ +}; +#define _FONTINFO_DEFINED +#endif + + +/* font function prototypes */ +short __far __cdecl _registerfonts( const char __far *); +void __far __cdecl _unregisterfonts( void ); +short __far __cdecl _setfont( const char __far * ); +short __far __cdecl _getfontinfo( struct _fontinfo __far * ); +void __far __cdecl _outgtext( const char __far * ); +short __far __cdecl _getgtextextent( const char __far * ); +struct _xycoord __far __cdecl _setgtextvector( short, short ); +struct _xycoord __far __cdecl _getgtextvector(void); + + +#ifdef _WINDOWS +/* QuickWin graphics extension prototypes */ +int __far __cdecl _wgclose( int ); +int __far __cdecl _wggetactive( void ); +int __far __cdecl _wgopen( char __far * ); +int __far __cdecl _wgsetactive( int ); +#endif + + +/* restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/io.h b/private/oleauto/tools/win16/hdos/c800/include/io.h new file mode 100644 index 000000000..d37a8165a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/io.h @@ -0,0 +1,162 @@ +/*** +*io.h - declarations for low-level file handling and I/O functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the low-level +* file handling and I/O functions. +* +****/ + +#ifndef _INC_IO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _QWINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; + +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +int __cdecl _access(const char *, int); +int __cdecl _chmod(const char *, int); +int __cdecl _chsize(int, long); +int __cdecl _close(int); +int __cdecl _commit(int); +int __cdecl _creat(const char *, int); +int __cdecl _dup(int); +int __cdecl _dup2(int, int); +int __cdecl _eof(int); +long __cdecl _filelength(int); +int __cdecl _isatty(int); +int __cdecl _locking(int, int, long); +long __cdecl _lseek(int, long, int); +char * __cdecl _mktemp(char *); +int __cdecl _open(const char *, int, ...); +int __cdecl _read(int, void *, unsigned int); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +int __cdecl _setmode(int, int); +int __cdecl _sopen(const char *, int, int, ...); +long __cdecl _tell(int); +int __cdecl _umask(int); +int __cdecl _unlink(const char *); +int __cdecl _write(int, const void *, unsigned int); +#ifdef _WINDOWS +#ifndef _WINDLL +int __cdecl _wabout(char *); +int __cdecl _wclose(int, int); +int __cdecl _wgetexit(void); +int __cdecl _wgetfocus(void); +long __cdecl _wgetscreenbuf(int); +int __cdecl _wgetsize(int, int, struct _wsizeinfo *); +int __cdecl _wmenuclick(int); +int __cdecl _wopen(struct _wopeninfo *, struct _wsizeinfo *, int); +int __cdecl _wsetexit(int); +int __cdecl _wsetfocus(int); +int __cdecl _wsetscreenbuf(int, long); +int __cdecl _wsetsize(int, struct _wsizeinfo *); +void __cdecl _wyield(void); +#endif +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl access(const char *, int); +int __cdecl chmod(const char *, int); +int __cdecl chsize(int, long); +int __cdecl close(int); +int __cdecl creat(const char *, int); +int __cdecl dup(int); +int __cdecl dup2(int, int); +int __cdecl eof(int); +long __cdecl filelength(int); +int __cdecl isatty(int); +int __cdecl locking(int, int, long); +long __cdecl lseek(int, long, int); +char * __cdecl mktemp(char *); +int __cdecl open(const char *, int, ...); +int __cdecl read(int, void *, unsigned int); +int __cdecl setmode(int, int); +int __cdecl sopen(const char *, int, int, ...); +long __cdecl tell(int); +int __cdecl umask(int); +int __cdecl unlink(const char *); +int __cdecl write(int, const void *, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_IO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/iomanip.h b/private/oleauto/tools/win16/hdos/c800/include/iomanip.h new file mode 100644 index 000000000..8adc814ec --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/iomanip.h @@ -0,0 +1,128 @@ +/*** +*iomanip.h - definitions/declarations for iostream's parameterized manipulators +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes' paramterized manipulators. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOMANIP +#define _INC_IOMANIP +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +// CONSIDER: use macro to define these +// #define __MKMANIP(X) \#define X##(T) __##X##_ \#\# T +// __MKMANIP(SMANIP); +// __MKMANIP(SAPP); +// __MKMANIP(IMANIP); +// __MKMANIP(IAPP); +// __MKMANIP(OMANIP); +// __MKMANIP(OAPP); +// __MKMANIP(IOMANIP); +// __MKMANIP(IOAPP); + +#define SMANIP(T) __SMANIP_##T +#define SAPP(T) __SAPP_##T +#define IMANIP(T) __IMANIP_##T +#define IAPP(T) __IAPP_##T +#define OMANIP(T) __OMANIP_##T +#define OAPP(T) __OAPP_##T +#define IOMANIP(T) __IOMANIP_##T +#define IOAPP(T) __IOAPP_##T + +#define IOMANIPdeclare(T) \ +class SMANIP(T) { \ +public: \ + SMANIP(T)(ios& (*f)(ios&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ + friend ostream& operator<<(ostream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ +private: \ + ios& (* _fp)(ios&,T); \ + T _tp; \ +}; \ +class SAPP(T) { \ +public: \ + SAPP(T)( ios& (*f)(ios&,T)) { _fp = f; } \ + SMANIP(T) operator()(T t) { return SMANIP(T)(_fp,t); } \ +private: \ + ios& (* _fp)(ios&,T); \ +}; \ +class IMANIP(T) { \ +public: \ + IMANIP(T)(istream& (*f)(istream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, IMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + istream& (* _fp)(istream&,T); \ + T _tp; \ +}; \ +class IAPP(T) { \ +public: \ + IAPP(T)( istream& (*f)(istream&,T)) { _fp = f; } \ + IMANIP(T) operator()(T t) { return IMANIP(T)(_fp,t); } \ +private: \ + istream& (* _fp)(istream&,T); \ +}; \ +class OMANIP(T) { \ +public: \ + OMANIP(T)(ostream& (*f)(ostream&,T), T t) { _fp = f; _tp = t; } \ + friend ostream& operator<<(ostream& s, OMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + ostream& (* _fp)(ostream&,T); \ + T _tp; \ +}; \ +class OAPP(T) { \ +public: \ + OAPP(T)(ostream& (*f)(ostream&,T)) { _fp = f; } \ + OMANIP(T) operator()(T t) { return OMANIP(T)(_fp,t); } \ +private: \ + ostream& (* _fp)(ostream&,T); \ +}; \ +\ +class IOMANIP(T) { \ +public: \ + IOMANIP(T)(iostream& (*f)(iostream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ + friend ostream& operator<<(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + iostream& (* _fp)(iostream&,T); \ + T _tp; \ +}; \ +class IOAPP(T) { \ +public: \ + IOAPP(T)( iostream& (*f)(iostream&,T)) { _fp = f; } \ + IOMANIP(T) operator()(T t) { return IOMANIP(T)(_fp,t); } \ +private: \ + iostream& (* _fp)(iostream&,T); \ +}; \ + + +IOMANIPdeclare(int) + +IOMANIPdeclare(long) + +inline ios& __resetiosflags(ios& s, long _flg) { s.setf(0,_flg); return s; } +inline ios& __setfill(ios& s, int _fc) { s.fill((char)_fc); return s; } +inline ios& __setiosflags(ios& s, long _flg) { s.setf(_flg); return s; } +inline ios& __setprecision(ios& s, int _pre) { s.precision(_pre); return s; } +inline ios& __setw(ios& s, int _wid) { s.width(_wid); return s; } + +inline SMANIP(long) resetiosflags(long _l) { return SMANIP(long)(__resetiosflags, _l); } +inline SMANIP(int) setfill(int _m) {return SMANIP(int)(__setfill, _m); } +inline SMANIP(long) setiosflags(long _l) {return SMANIP(long)(__setiosflags, _l); } +inline SMANIP(int) setprecision(int _p) {return SMANIP(int)(__setprecision, _p); } +inline SMANIP(int) setw(int _w) { return SMANIP(int)(__setw, _w); } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ios.h b/private/oleauto/tools/win16/hdos/c800/include/ios.h new file mode 100644 index 000000000..74aa9d1ff --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ios.h @@ -0,0 +1,198 @@ +/*** +*ios.h - definitions/declarations for the ios class. +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ios class. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOS +#define _INC_IOS + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +class streambuf; +class ostream; + +class ios { + +public: + enum io_state { goodbit = 0x00, + eofbit = 0x01, + failbit = 0x02, + badbit = 0x04 }; + + enum open_mode { in = 0x01, + out = 0x02, + ate = 0x04, + app = 0x08, + trunc = 0x10, + nocreate = 0x20, + noreplace = 0x40, + binary = 0x80 }; // CONSIDER: not in latest spec. + + enum seek_dir { beg=0, cur=1, end=2 }; + + enum { skipws = 0x0001, + left = 0x0002, + right = 0x0004, + internal = 0x0008, + dec = 0x0010, + oct = 0x0020, + hex = 0x0040, + showbase = 0x0080, + showpoint = 0x0100, + uppercase = 0x0200, + showpos = 0x0400, + scientific = 0x0800, + fixed = 0x1000, + unitbuf = 0x2000, + stdio = 0x4000 + }; + + static const long basefield; // dec | oct | hex + static const long adjustfield; // left | right | internal + static const long floatfield; // scientific | fixed + + ios(streambuf*); // differs from ANSI + virtual ~ios(); + + inline long flags() const; + inline long flags(long _l); + + inline long setf(long _f,long _m); + inline long setf(long _l); + inline long unsetf(long _l); + + inline int width() const; + inline int width(int _i); + + inline ostream* tie(ostream* _os); + inline ostream* tie() const; + + inline char fill() const; + inline char fill(char _c); + + inline int precision(int _i); + inline int precision() const; + + inline int rdstate() const; + inline void clear(int _i = 0); + +// inline operator void*() const; + operator void *() const { if(state&(badbit|failbit) ) return 0; return (void *)this; } + inline int operator!() const; + + inline int good() const; + inline int eof() const; + inline int fail() const; + inline int bad() const; + + inline streambuf* rdbuf() const; + + inline long _HFAR_ & iword(int) const; + inline void _HFAR_ * _HFAR_ & pword(int) const; + + static long bitalloc(); + static int xalloc(); + static void sync_with_stdio(); + +protected: + ios(); + ios(const ios&); // treat as private + ios& operator=(const ios&); + void init(streambuf*); + + enum { skipping, tied }; + streambuf* bp; + + int state; + int ispecial; // not used + int ospecial; // not used + int isfx_special; // not used + int osfx_special; // not used + int x_delbuf; // if set, rdbuf() deleted by ~ios + + ostream* x_tie; + long x_flags; + int x_precision; + int x_width; + char x_fill; + + static void (*stdioflush)(); // not used +public: + int delbuf() const { return x_delbuf; } + void delbuf(int _i) { x_delbuf = _i; } + +private: + static long x_maxbit; + static long _HFAR_ * x_statebuf; // used by xalloc() + static int x_curindex; +// consider: make interal static to ios::sync_with_stdio() + static int sunk_with_stdio; // make sure sync_with done only once +}; + +inline ios& dec(ios& _strm) { _strm.setf(ios::dec,ios::basefield); return _strm; } +inline ios& hex(ios& _strm) { _strm.setf(ios::hex,ios::basefield); return _strm; } +inline ios& oct(ios& _strm) { _strm.setf(ios::oct,ios::basefield); return _strm; } + +inline long ios::flags() const { return x_flags; } +inline long ios::flags(long _l){ long _lO; _lO = x_flags; x_flags = _l; return _lO; } + +inline long ios::setf(long _l,long _m){ long _lO; _lO = x_flags; x_flags = (_l&_m) | (x_flags&(~_m)); return _lO; } +inline long ios::setf(long _l){ long _lO; _lO = x_flags; x_flags |= _l; return _lO; } +inline long ios::unsetf(long _l){ long _lO; _lO = x_flags; x_flags &= (~_l); return _lO; } + +inline int ios::width() const { return x_width; } +inline int ios::width(int _i){ int _iO; _iO = (int)x_width; x_width = _i; return _iO; } + +inline ostream* ios::tie(ostream* _os){ ostream* _osO; _osO = x_tie; x_tie = _os; return _osO; } +inline ostream* ios::tie() const { return x_tie; } +inline char ios::fill() const { return x_fill; } +inline char ios::fill(char _c){ char _cO; _cO = x_fill; x_fill = _c; return _cO; } +inline int ios::precision(int _i){ int _iO; _iO = (int)x_precision; x_precision = _i; return _iO; } +inline int ios::precision() const { return x_precision; } + +inline int ios::rdstate() const { return state; } + +// inline ios::operator void *() const { if(state&(badbit|failbit) ) return 0; return (void *)this; } +inline int ios::operator!() const { return state&(badbit|failbit); } + +inline int ios::bad() const { return state & badbit; } +inline void ios::clear(int _i){ state = _i; } +inline int ios::eof() const { return state & eofbit; } +inline int ios::fail() const { return state & (badbit | failbit); } +inline int ios::good() const { return state == 0; } + +inline streambuf* ios::rdbuf() const { return bp; } + +inline long _HFAR_ & ios::iword(int _i) const { return x_statebuf[_i] ; } +inline void _HFAR_ * _HFAR_ & ios::pword(int _i) const { return (void _HFAR_ * _HFAR_ &)x_statebuf[_i]; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/iostream.h b/private/oleauto/tools/win16/hdos/c800/include/iostream.h new file mode 100644 index 000000000..345c5ae16 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/iostream.h @@ -0,0 +1,65 @@ +/*** +*iostream.h - definitions/declarations for iostream classes +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOSTREAM +#define _INC_IOSTREAM + +typedef long streamoff, streampos; + +#include <ios.h> // Define ios. + +#include <streamb.h> // Define streambuf. + +#include <istream.h> // Define istream. + +#include <ostream.h> // Define ostream. + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +class iostream : public istream, public ostream { +public: + iostream(streambuf*); + virtual ~iostream(); +protected: +// consider: make private?? + iostream(); + iostream(const iostream&); +inline iostream& operator=(streambuf*); +inline iostream& operator=(iostream&); +private: + iostream(ios&); + iostream(istream&); + iostream(ostream&); +}; + +inline iostream& iostream::operator=(streambuf* _sb) { istream::operator=(_sb); ostream::operator=(_sb); return *this; } + +inline iostream& iostream::operator=(iostream& _strm) { return operator=(_strm.rdbuf()); } + +class Iostream_init { +public: + Iostream_init(); + Iostream_init(ios &, int =0); // treat as private + ~Iostream_init(); +}; + +// used internally +// static Iostream_init __iostreaminit; // initializes cin/cout/cerr/clog + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/istream.h b/private/oleauto/tools/win16/hdos/c800/include/istream.h new file mode 100644 index 000000000..b17e769ca --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/istream.h @@ -0,0 +1,149 @@ +/*** +*istream.h - definitions/declarations for the istream class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the istream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_ISTREAM +#define _INC_ISTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef long streamoff, streampos; + +class istream : virtual public ios { + +public: + istream(streambuf*); + virtual ~istream(); + + int ipfx(int =0); + void isfx() { } + + inline istream& operator>>(istream& (*_f)(istream&)); + inline istream& operator>>(ios& (*_f)(ios&)); + istream& operator>>(char _HFAR_ *); + inline istream& operator>>(unsigned char _HFAR_ *); + inline istream& operator>>(signed char _HFAR_ *); + istream& operator>>(char _HFAR_ &); + inline istream& operator>>(unsigned char _HFAR_ &); + inline istream& operator>>(signed char _HFAR_ &); + istream& operator>>(short _HFAR_ &); + istream& operator>>(unsigned short _HFAR_ &); + istream& operator>>(int _HFAR_ &); + istream& operator>>(unsigned int _HFAR_ &); + istream& operator>>(long _HFAR_ &); + istream& operator>>(unsigned long _HFAR_ &); + istream& operator>>(float _HFAR_ &); + istream& operator>>(double _HFAR_ &); + istream& operator>>(long double _HFAR_ &); + istream& operator>>(streambuf*); + + int get(); + istream& get(char _HFAR_ *,int,char ='\n'); + inline istream& get(unsigned char _HFAR_ *,int,char ='\n'); + inline istream& get(signed char _HFAR_ *,int,char ='\n'); + istream& get(char _HFAR_ &); + inline istream& get(unsigned char _HFAR_ &); + inline istream& get(signed char _HFAR_ &); + istream& get(streambuf&,char ='\n'); + inline istream& getline(char _HFAR_ *,int,char ='\n'); + inline istream& getline(unsigned char _HFAR_ *,int,char ='\n'); + inline istream& getline(signed char _HFAR_ *,int,char ='\n'); + + inline istream& ignore(int =1,int =EOF); + istream& read(char _HFAR_ *,int); + inline istream& read(unsigned char _HFAR_ *,int); + inline istream& read(signed char _HFAR_ *,int); + + int gcount() const { return x_gcount; } + int peek(); + istream& putback(char); + int sync(); + + istream& seekg(streampos); + istream& seekg(streamoff,ios::seek_dir); + streampos tellg(); + + void eatwhite(); // consider: protect and friend with manipulator ws +protected: + istream(); + istream(const istream&); // treat as private + istream& operator=(streambuf* _isb); // treat as private + istream& operator=(const istream& _is) { return operator=(_is.rdbuf()); } + int do_ipfx(int); + +private: + istream(ios&); + int getint(char _HFAR_ *); + int getdouble(char _HFAR_ *, int); + int _fGline; + int x_gcount; +}; + + inline istream& istream::operator>>(istream& (*_f)(istream&)) { (*_f)(*this); return *this; } + inline istream& istream::operator>>(ios& (*_f)(ios&)) { (*_f)(*this); return *this; } + + inline istream& istream::operator>>(unsigned char _HFAR_ * _s) { return operator>>((char _HFAR_ *)_s); } + inline istream& istream::operator>>(signed char _HFAR_ * _s) { return operator>>((char _HFAR_ *)_s); } + + inline istream& istream::operator>>(unsigned char _HFAR_ & _c) { return operator>>((char _HFAR_ &) _c); } + inline istream& istream::operator>>(signed char _HFAR_ & _c) { return operator>>((char _HFAR_ &) _c); } + + inline istream& istream::get(unsigned char _HFAR_ * b, int lim ,char delim) { return get((char _HFAR_ *)b, lim, delim); } + inline istream& istream::get(signed char _HFAR_ * b, int lim, char delim) { return get((char _HFAR_ *)b, lim, delim); } + + inline istream& istream::get(unsigned char _HFAR_ & _c) { return get((char _HFAR_ &)_c); } + inline istream& istream::get(signed char _HFAR_ & _c) { return get((char _HFAR_ &)_c); } + + inline istream& istream::getline(char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get(_b, _lim, _delim); } + inline istream& istream::getline(unsigned char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get((char _HFAR_ *)_b, _lim, _delim); } + inline istream& istream::getline(signed char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get((char _HFAR_ *)_b, _lim, _delim); } + + inline istream& istream::ignore(int _n,int delim) { _fGline++; return get((char _HFAR_ *)0, _n+1, (char)delim); } + + inline istream& istream::read(unsigned char _HFAR_ * _ptr, int _n) { return read((char _HFAR_ *) _ptr, _n); } + inline istream& istream::read(signed char _HFAR_ * _ptr, int _n) { return read((char _HFAR_ *) _ptr, _n); } + +class istream_withassign : public istream { + public: + istream_withassign(); + istream_withassign(streambuf*); + ~istream_withassign(); + istream& operator=(const istream& _is) { return istream::operator=(_is); } + istream& operator=(streambuf* _isb) { return istream::operator=(_isb); } +}; + +#ifndef _WINDLL +extern istream_withassign cin; +#endif + +inline istream& ws(istream& _ins) { _ins.eatwhite(); return _ins; } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/limits.h b/private/oleauto/tools/win16/hdos/c800/include/limits.h new file mode 100644 index 000000000..0a1869e13 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/limits.h @@ -0,0 +1,44 @@ +/*** +*limits.h - implementation dependent values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains defines for a number of implementation dependent values +* which are commonly used in C programs. +* [ANSI] +* +****/ + +#ifndef _INC_LIMITS + +#define CHAR_BIT 8 /* number of bits in a char */ +#define SCHAR_MIN (-127) /* minimum signed char value */ +#define SCHAR_MAX 127 /* maximum signed char value */ +#define UCHAR_MAX 0xff /* maximum unsigned char value */ +#ifndef _CHAR_UNSIGNED +#define CHAR_MIN SCHAR_MIN /* mimimum char value */ +#define CHAR_MAX SCHAR_MAX /* maximum char value */ +#else +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#ifndef __cplusplus +unsigned int _charmax; /* unsigned CHAR_MAX value */ +#else +extern "C" unsigned int _charmax; /* unsigned CHAR_MAX value */ +static unsigned int *_char_max = &_charmax; +#endif +#endif +#define MB_LEN_MAX 2 /* max. # bytes in multibyte char */ +#define SHRT_MIN (-32767) /* minimum (signed) short value */ +#define SHRT_MAX 32767 /* maximum (signed) short value */ +#define USHRT_MAX 0xffff /* maximum unsigned short value */ +#define INT_MIN (-32767) /* minimum (signed) int value */ +#define INT_MAX 32767 /* maximum (signed) int value */ +#define UINT_MAX 0xffff /* maximum unsigned int value */ +#define LONG_MIN (-2147483647) /* minimum (signed) long value */ +#define LONG_MAX 2147483647 /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffff /* maximum unsigned long value */ + +#define _INC_LIMITS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/locale.h b/private/oleauto/tools/win16/hdos/c800/include/locale.h new file mode 100644 index 000000000..e81a92dd4 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/locale.h @@ -0,0 +1,84 @@ +/*** +*locale.h - definitions/declarations for localization routines +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the localization routines. +* [ANSI] +* +****/ + +#ifndef _INC_LOCALE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Locale categories */ + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 + +#define LC_MIN LC_ALL +#define LC_MAX LC_TIME + + +/* Locale convention structure */ + +#ifndef _LCONV_DEFINED +struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + }; +#define _LCONV_DEFINED +#endif + +/* function prototypes */ + +char * __cdecl setlocale(int, const char *); +struct lconv * __cdecl localeconv(void); + +#ifdef __cplusplus +} +#endif + +#define _INC_LOCALE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/lzdos.h b/private/oleauto/tools/win16/hdos/c800/include/lzdos.h new file mode 100644 index 000000000..79b44677d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/lzdos.h @@ -0,0 +1,5 @@ +/* OBSOLETE: Replaced by #define LIB/#include <lzexpand.h> */ +#ifndef LIB +#define LIB +#endif +#include <lzexpand.h> diff --git a/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h b/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h new file mode 100644 index 000000000..29264d387 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h @@ -0,0 +1,95 @@ +/*****************************************************************************\ +* * +* lzexpand.h Public interfaces for LZEXPAND.DLL. * +* * +* Version 3.10 * +* * +* NOTE: windows.h must be included first if LIB is NOT #defined * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +******************************************************************************* +* +* #define LIB - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL) +* NOTE: Not compatible with windows.h if LIB is #defined +* +\*****************************************************************************/ + +#ifndef _INC_LZEXPAND +#define _INC_LZEXPAND + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * If .lib version is being used, declare types used in this file. + */ +#ifdef LIB + +#define LZAPI _pascal + +#ifndef WINAPI /* don't declare if they're already declared */ +#define WINAPI _far _pascal +#define NEAR _near +#define FAR _far +#define PASCAL _pascal +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef signed long LONG; +typedef unsigned long DWORD; +typedef char far* LPSTR; +typedef const char far* LPCSTR; +typedef int HFILE; +#define OFSTRUCT void /* Not used by the .lib version */ +#endif /* WINAPI */ + +#else /* LIB */ + +#define LZAPI _far _pascal + +/* If .dll version is being used and we're being included with + * the 3.0 windows.h, #define compatible type aliases. + * If included with the 3.0 windows.h, #define compatible aliases + */ +#ifndef _INC_WINDOWS +#define UINT WORD +#define LPCSTR LPSTR +#define HFILE int +#endif /* !_INC_WINDOWS */ + +#endif /* !LIB */ + +/****** Error return codes ***************************************************/ + +#define LZERROR_BADINHANDLE (-1) /* invalid input handle */ +#define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */ +#define LZERROR_READ (-3) /* corrupt compressed file format */ +#define LZERROR_WRITE (-4) /* out of space for output file */ +#define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */ +#define LZERROR_GLOBLOCK (-6) /* bad global handle */ +#define LZERROR_BADVALUE (-7) /* input parameter out of range */ +#define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */ + +/****** Public functions *****************************************************/ + +int LZAPI LZStart(void); +void LZAPI LZDone(void); +LONG LZAPI CopyLZFile(HFILE, HFILE); +LONG LZAPI LZCopy(HFILE, HFILE); +HFILE LZAPI LZInit(HFILE); +int LZAPI GetExpandedName(LPCSTR, LPSTR); +HFILE LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT); +LONG LZAPI LZSeek(HFILE, LONG, int); +int LZAPI LZRead(HFILE, void FAR*, int); +void LZAPI LZClose(HFILE); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _INC_LZEXPAND */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/malloc.h b/private/oleauto/tools/win16/hdos/c800/include/malloc.h new file mode 100644 index 000000000..8e28bb5e0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/malloc.h @@ -0,0 +1,155 @@ +/*** +*malloc.h - declarations and definitions for memory allocation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for memory allocation functions; +* also defines manifest constants and types used by the heap routines. +* [System V] +* +****/ + +#ifndef _INC_MALLOC + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __based _based +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#define __near _near +#define __segment _segment +#endif + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* constants for _heapchk/_heapset/_heapwalk routines */ + +#define _HEAPEMPTY (-1) +#define _HEAPOK (-2) +#define _HEAPBADBEGIN (-3) +#define _HEAPBADNODE (-4) +#define _HEAPEND (-5) +#define _HEAPBADPTR (-6) +#define _FREEENTRY 0 +#define _USEDENTRY 1 + +/* maximum heap request that can ever be honored */ + +#ifdef _WINDOWS +#define _HEAP_MAXREQ 0xFFE6 +#else +#define _HEAP_MAXREQ 0xFFE8 +#endif + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _HEAPINFO_DEFINED +typedef struct _heapinfo { + int __far * _pentry; + size_t _size; + int _useflag; + } _HEAPINFO; +#define _HEAPINFO_DEFINED +#endif + + +/* external variable declarations */ + +extern unsigned int __near __cdecl _amblksiz; + + +/* based heap function prototypes */ + +void __based(void) * __cdecl _bcalloc(__segment, size_t, size_t); +void __based(void) * __cdecl _bexpand(__segment, + void __based(void) *, size_t); +void __cdecl _bfree(__segment, void __based(void) *); +int __cdecl _bfreeseg(__segment); +int __cdecl _bheapadd(__segment, void __based(void) *, size_t); +int __cdecl _bheapchk(__segment); +int __cdecl _bheapmin(__segment); +__segment __cdecl _bheapseg(size_t); +int __cdecl _bheapset(__segment, unsigned int); +int __cdecl _bheapwalk(__segment, _HEAPINFO *); +void __based(void) * __cdecl _bmalloc(__segment, size_t); +size_t __cdecl _bmsize(__segment, void __based(void) *); +void __based(void) * __cdecl _brealloc(__segment, + void __based(void) *, size_t); + + +/* function prototypes */ + +void * __cdecl _alloca(size_t); +void * __cdecl calloc(size_t, size_t); +void * __cdecl _expand(void *, size_t); +void __far * __cdecl _fcalloc(size_t, size_t); +void __far * __cdecl _fexpand(void __far *, size_t); +void __cdecl _ffree(void __far *); +int __cdecl _fheapchk(void); +int __cdecl _fheapmin(void); +int __cdecl _fheapset(unsigned int); +int __cdecl _fheapwalk(_HEAPINFO *); +void __far * __cdecl _fmalloc(size_t); +size_t __cdecl _fmsize(void __far *); +void __far * __cdecl _frealloc(void __far *, size_t); +unsigned int __cdecl _freect(size_t); +void __cdecl free(void *); +void __huge * __cdecl _halloc(long, size_t); +void __cdecl _hfree(void __huge *); +#ifndef _WINDOWS +int __cdecl _heapadd(void __far *, size_t); +int __cdecl _heapchk(void); +#endif +int __cdecl _heapmin(void); +#ifndef _WINDOWS +int __cdecl _heapset(unsigned int); +int __cdecl _heapwalk(_HEAPINFO *); +#endif +void * __cdecl malloc(size_t); +size_t __cdecl _memavl(void); +size_t __cdecl _memmax(void); +size_t __cdecl _msize(void *); +void __near * __cdecl _ncalloc(size_t, size_t); +void __near * __cdecl _nexpand(void __near *, size_t); +void __cdecl _nfree(void __near *); +#ifndef _WINDOWS +int __cdecl _nheapchk(void); +#endif +int __cdecl _nheapmin(void); +#ifndef _WINDOWS +int __cdecl _nheapset(unsigned int); +int __cdecl _nheapwalk(_HEAPINFO *); +#endif +void __near * __cdecl _nmalloc(size_t); +size_t __cdecl _nmsize(void __near *); +void __near * __cdecl _nrealloc(void __near *, size_t); +void * __cdecl realloc(void *, size_t); +size_t __cdecl _stackavail(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl alloca(size_t); +void __huge * __cdecl halloc(long, size_t); +void __cdecl hfree(void __huge *); +size_t __cdecl stackavail(void); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_MALLOC +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/math.h b/private/oleauto/tools/win16/hdos/c800/include/math.h new file mode 100644 index 000000000..39a4af3d5 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/math.h @@ -0,0 +1,303 @@ +/*** +*math.h - definitions and declarations for math library +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains constant definitions and external subroutine +* declarations for the math subroutine library. +* [ANSI/System V] +* +****/ + +#ifndef _INC_MATH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* definition of _exception struct - this struct is passed to the _matherr + * routine when a floating point exception is detected + */ + +#ifndef _EXCEPTION_DEFINED +#pragma pack(2) + +struct _exception { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + double arg1; /* first argument to function */ + double arg2; /* second argument (if any) to function */ + double retval; /* value to be returned by function */ + } ; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define exception _exception +#endif + +#pragma pack() +#define _EXCEPTION_DEFINED +#endif + + +/* definition of a _complex struct to be used by those who use cabs and + * want type checking on their argument + */ + +#ifndef _COMPLEX_DEFINED + +struct _complex { + double x,y; /* real and imaginary parts */ + } ; + +#ifndef __cplusplus +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct complex { + double x,y; /* real and imaginary parts */ + } ; +#endif +#endif + +#define _COMPLEX_DEFINED +#endif + + +/* Constant definitions for the exception type passed in the _exception struct + */ + +#define _DOMAIN 1 /* argument domain error */ +#define _SING 2 /* argument singularity */ +#define _OVERFLOW 3 /* overflow range error */ +#define _UNDERFLOW 4 /* underflow range error */ +#define _TLOSS 5 /* total loss of precision */ +#define _PLOSS 6 /* partial loss of precision */ + +#define EDOM 33 +#define ERANGE 34 + + +/* definitions of _HUGE (XENIX) and HUGE_VAL (ANSI) error return values used + * by several floating point math routines + */ + +extern double __near __cdecl _HUGE; +#define HUGE_VAL _HUGE + + +/* function prototypes */ + +#ifdef _MT +int __cdecl abs(int); +double __pascal acos(double); +double __pascal asin(double); +double __pascal atan(double); +double __pascal atan2(double, double); +double __pascal atof(const char *); +double __pascal _cabs(struct _complex); +double __pascal ceil(double); +double __pascal cos(double); +double __pascal cosh(double); +int __cdecl _dieeetomsbin(double *, double *); +int __cdecl _dmsbintoieee(double *, double *); +double __pascal exp(double); +double __pascal fabs(double); +int __cdecl _fieeetomsbin(float *, float *); +double __pascal floor(double); +double __pascal fmod(double, double); +int __cdecl _fmsbintoieee(float *, float *); +double __pascal frexp(double, int *); +double __pascal _hypot(double, double); +double __pascal _j0(double); +double __pascal _j1(double); +double __pascal _jn(int, double); +long __cdecl labs(long); +double __pascal ldexp(double, int); +double __pascal log(double); +double __pascal log10(double); +int __cdecl _matherr(struct _exception *); +double __pascal modf(double, double *); +double __pascal pow(double, double); +double __pascal sin(double); +double __pascal sinh(double); +double __pascal sqrt(double); +double __pascal tan(double); +double __pascal tanh(double); +double __pascal _y0(double); +double __pascal _y1(double); +double __pascal _yn(int, double); + +#else +int __cdecl abs(int); +double __cdecl acos(double); +double __cdecl asin(double); +double __cdecl atan(double); +double __cdecl atan2(double, double); +double __cdecl atof(const char *); +double __cdecl _cabs(struct _complex); +double __cdecl ceil(double); +double __cdecl cos(double); +double __cdecl cosh(double); +int __cdecl _dieeetomsbin(double *, double *); +int __cdecl _dmsbintoieee(double *, double *); +double __cdecl exp(double); +double __cdecl fabs(double); +int __cdecl _fieeetomsbin(float *, float *); +double __cdecl floor(double); +double __cdecl fmod(double, double); +int __cdecl _fmsbintoieee(float *, float *); +double __cdecl frexp(double, int *); +double __cdecl _hypot(double, double); +double __cdecl _j0(double); +double __cdecl _j1(double); +double __cdecl _jn(int, double); +long __cdecl labs(long); +double __cdecl ldexp(double, int); +double __cdecl log(double); +double __cdecl log10(double); +int __cdecl _matherr(struct _exception *); +double __cdecl modf(double, double *); +double __cdecl pow(double, double); +double __cdecl sin(double); +double __cdecl sinh(double); +double __cdecl sqrt(double); +double __cdecl tan(double); +double __cdecl tanh(double); +double __cdecl _y0(double); +double __cdecl _y1(double); +double __cdecl _yn(int, double); +#endif + + +/* definition of _exceptionl struct - this struct is passed to the _matherrl + * routine when a floating point exception is detected in a long double routine + */ + +#ifndef _LD_EXCEPTION_DEFINED +#pragma pack(2) +struct _exceptionl { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + long double arg1; /* first argument to function */ + long double arg2; /* second argument (if any) to function */ + long double retval; /* value to be returned by function */ + } ; +#pragma pack() +#define _LD_EXCEPTION_DEFINED +#endif + + +/* definition of a _complexl struct to be used by those who use _cabsl and + * want type checking on their argument + */ + +#ifndef _LD_COMPLEX_DEFINED +#pragma pack(2) +struct _complexl { + long double x,y; /* real and imaginary parts */ + } ; +#pragma pack() +#define _LD_COMPLEX_DEFINED +#endif + +extern long double __near __cdecl _LHUGE; +#define _LHUGE_VAL _LHUGE + + +long double __cdecl acosl(long double); +long double __cdecl asinl(long double); +long double __cdecl atanl(long double); +long double __cdecl atan2l(long double, long double); +long double __cdecl _atold(const char *); +long double __cdecl _cabsl(struct _complexl); +long double __cdecl ceill(long double); +long double __cdecl cosl(long double); +long double __cdecl coshl(long double); +long double __cdecl expl(long double); +long double __cdecl fabsl(long double); +long double __cdecl floorl(long double); +long double __cdecl fmodl(long double, long double); +long double __cdecl frexpl(long double, int *); +long double __cdecl _hypotl(long double, long double); +long double __cdecl _j0l(long double); +long double __cdecl _j1l(long double); +long double __cdecl _jnl(int, long double); +long double __cdecl ldexpl(long double, int); +long double __cdecl logl(long double); +long double __cdecl log10l(long double); +int __cdecl _matherrl(struct _exceptionl *); +long double __cdecl modfl(long double, long double *); +long double __cdecl powl(long double, long double); +long double __cdecl sinl(long double); +long double __cdecl sinhl(long double); +long double __cdecl sqrtl(long double); +long double __cdecl tanl(long double); +long double __cdecl tanhl(long double); +long double __cdecl _y0l(long double); +long double __cdecl _y1l(long double); +long double __cdecl _ynl(int, long double); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DOMAIN _DOMAIN +#define SING _SING +#define OVERFLOW _OVERFLOW +#define UNDERFLOW _UNDERFLOW +#define TLOSS _TLOSS +#define PLOSS _PLOSS + +#define matherr _matherr + +extern double __near __cdecl HUGE; + +#ifdef _MT +#ifndef __cplusplus +double __pascal cabs(struct complex); +#endif +double __pascal hypot(double, double); +double __pascal j0(double); +double __pascal j1(double); +double __pascal jn(int, double); +double __pascal y0(double); +double __pascal y1(double); +double __pascal yn(int, double); +#else +#ifndef __cplusplus +double __cdecl cabs(struct complex); +#endif +double __cdecl hypot(double, double); +double __cdecl j0(double); +double __cdecl j1(double); +double __cdecl jn(int, double); +double __cdecl y0(double); +double __cdecl y1(double); +double __cdecl yn(int, double); +#endif + +int __cdecl dieeetomsbin(double *, double *); +int __cdecl dmsbintoieee(double *, double *); +int __cdecl fieeetomsbin(float *, float *); +int __cdecl fmsbintoieee(float *, float *); + +long double __cdecl cabsl(struct _complexl); +long double __cdecl hypotl(long double, long double); + +#endif + + +#ifdef __cplusplus +} +#endif + +#define _INC_MATH +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/memory.h b/private/oleauto/tools/win16/hdos/c800/include/memory.h new file mode 100644 index 000000000..5ce2f440f --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/memory.h @@ -0,0 +1,75 @@ +/*** +*memory.h - declarations for buffer (memory) manipulation routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the +* buffer (memory) manipulation routines. +* [System V] +* +****/ + +#ifndef _INC_MEMORY + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +void * __cdecl memcpy(void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_MEMORY +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h new file mode 100644 index 000000000..e3bfa4234 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h @@ -0,0 +1,1917 @@ +/****************************************************************************/ +/* */ +/* MMSYSTEM.H - Include file for Multimedia APIs */ +/* */ +/* Note: You must include WINDOWS.H before including this file. */ +/* */ +/* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. */ +/* */ +/****************************************************************************/ + + + +/* If defined, the following flags inhibit inclusion + * of the indicated items: + * + * MMNODRV - Installable driver support + * MMNOSOUND - Sound support + * MMNOWAVE - Waveform support + * MMNOMIDI - MIDI support + * MMNOAUX - Auxiliary audio support + * MMNOTIMER - Timer support + * MMNOJOY - Joystick support + * MMNOMCI - MCI support + * MMNOMMIO - Multimedia file I/O support + * MMNOMMSYSTEM - General MMSYSTEM functions + */ + +#ifndef _INC_MMSYSTEM +#define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + + +/**************************************************************************** + + General constants and data types + +****************************************************************************/ + +/* general constants */ +#define MAXPNAMELEN 32 /* max product name length (including NULL) */ +#define MAXERRORLENGTH 128 /* max error text length (including NULL) */ + +/* general data types */ +typedef WORD VERSION; /* major (high byte), minor (low byte) */ + +/* MMTIME data structure */ +typedef struct mmtime_tag { + UINT wType; /* indicates the contents of the union */ + union { + DWORD ms; /* milliseconds */ + DWORD sample; /* samples */ + DWORD cb; /* byte count */ + struct { /* SMPTE */ + BYTE hour; /* hours */ + BYTE min; /* minutes */ + BYTE sec; /* seconds */ + BYTE frame; /* frames */ + BYTE fps; /* frames per second */ + BYTE dummy; /* pad */ + } smpte; + struct { /* MIDI */ + DWORD songptrpos; /* song pointer position */ + } midi; + } u; + } MMTIME; +typedef MMTIME *PMMTIME; +typedef MMTIME NEAR *NPMMTIME; +typedef MMTIME FAR *LPMMTIME; + +/* types for wType field in MMTIME struct */ +#define TIME_MS 0x0001 /* time in milliseconds */ +#define TIME_SAMPLES 0x0002 /* number of wave samples */ +#define TIME_BYTES 0x0004 /* current byte offset */ +#define TIME_SMPTE 0x0008 /* SMPTE time */ +#define TIME_MIDI 0x0010 /* MIDI time */ + + +/**************************************************************************** + + Multimedia Extensions Window Messages + +****************************************************************************/ + +#define MM_JOY1MOVE 0x3A0 /* joystick */ +#define MM_JOY2MOVE 0x3A1 +#define MM_JOY1ZMOVE 0x3A2 +#define MM_JOY2ZMOVE 0x3A3 +#define MM_JOY1BUTTONDOWN 0x3B5 +#define MM_JOY2BUTTONDOWN 0x3B6 +#define MM_JOY1BUTTONUP 0x3B7 +#define MM_JOY2BUTTONUP 0x3B8 + +#define MM_MCINOTIFY 0x3B9 /* MCI */ + +#define MM_WOM_OPEN 0x3BB /* waveform output */ +#define MM_WOM_CLOSE 0x3BC +#define MM_WOM_DONE 0x3BD + +#define MM_WIM_OPEN 0x3BE /* waveform input */ +#define MM_WIM_CLOSE 0x3BF +#define MM_WIM_DATA 0x3C0 + +#define MM_MIM_OPEN 0x3C1 /* MIDI input */ +#define MM_MIM_CLOSE 0x3C2 +#define MM_MIM_DATA 0x3C3 +#define MM_MIM_LONGDATA 0x3C4 +#define MM_MIM_ERROR 0x3C5 +#define MM_MIM_LONGERROR 0x3C6 + +#define MM_MOM_OPEN 0x3C7 /* MIDI output */ +#define MM_MOM_CLOSE 0x3C8 +#define MM_MOM_DONE 0x3C9 + + +/**************************************************************************** + + String resource number bases (internal use) + +****************************************************************************/ + +#define MMSYSERR_BASE 0 +#define WAVERR_BASE 32 +#define MIDIERR_BASE 64 +#define TIMERR_BASE 96 +#define JOYERR_BASE 160 +#define MCIERR_BASE 256 + +#define MCI_STRING_OFFSET 512 +#define MCI_VD_OFFSET 1024 +#define MCI_CD_OFFSET 1088 +#define MCI_WAVE_OFFSET 1152 +#define MCI_SEQ_OFFSET 1216 + +/**************************************************************************** + + General error return values + +****************************************************************************/ + +/* general error return values */ +#define MMSYSERR_NOERROR 0 /* no error */ +#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */ +#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */ +#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */ +#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */ +#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */ +#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */ +#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */ +#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */ +#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */ +#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */ +#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */ +#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */ + + +#if (WINVER < 0x030a) +DECLARE_HANDLE(HDRVR); +#endif /* ifdef WINVER < 0x030a */ + +#ifndef MMNODRV +/**************************************************************************** + + Installable driver support + +****************************************************************************/ + +#if (WINVER < 0x030a) + +/* return values from DriverProc() function */ +#define DRV_CANCEL 0x0000 +#define DRV_OK 0x0001 +#define DRV_RESTART 0x0002 + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO { + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO *PDRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR *NPDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR *LPDRVCONFIGINFO; + +/* installable driver function prototypes */ +LRESULT WINAPI DrvClose(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); +HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, + LPARAM lParam2); +LRESULT WINAPI DrvSendMessage(HDRVR hDriver, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hDriver); + +LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, + UINT uMessage, LPARAM lParam1, LPARAM lParam2); + +#define DefDriverProc DrvDefDriverProc + +#endif /* ifdef WINVER < 0x030a */ + +#if (WINVER >= 0x030a) + + +/* return values from DriverProc() function */ +#define DRV_CANCEL DRVCNF_CANCEL +#define DRV_OK DRVCNF_OK +#define DRV_RESTART DRVCNF_RESTART + +#endif /* ifdef WINVER >= 0x030a */ + +#define DRV_MCI_FIRST DRV_RESERVED +#define DRV_MCI_LAST (DRV_RESERVED + 0xFFF) + +#endif /* ifndef MMNODRV */ + + +/**************************************************************************** + + Driver callback support + +****************************************************************************/ + +/* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */ +/* midiOutOpen() to specify the type of the dwCallback parameter. */ + +#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */ +#define CALLBACK_NULL 0x00000000l /* no callback */ +#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */ +#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */ +#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */ + +/* driver callback prototypes */ +typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef DRVCALLBACK FAR *LPDRVCALLBACK; + +/**************************************************************************** + + Manufacturer and product IDs + + Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS, + MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures. + +****************************************************************************/ + +/* manufacturer IDs */ +#define MM_MICROSOFT 1 /* Microsoft Corp. */ + +/* product IDs */ +#define MM_MIDI_MAPPER 1 /* MIDI Mapper */ +#define MM_WAVE_MAPPER 2 /* Wave Mapper */ + +#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */ +#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */ +#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */ +#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */ +#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */ + +#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */ + +#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */ +#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */ + +#define MM_PC_JOYSTICK 12 /* Joystick adapter */ + + +#ifndef MMNOMMSYSTEM +/**************************************************************************** + + General MMSYSTEM support + +****************************************************************************/ + +WORD WINAPI mmsystemGetVersion(void); +void WINAPI OutputDebugStr(LPCSTR); + +#endif /* ifndef MMNOMMSYSTEM */ + + +#ifndef MMNOSOUND +/**************************************************************************** + + Sound support + +****************************************************************************/ + +BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags); + +/* flag values for wFlags parameter */ +#define SND_SYNC 0x0000 /* play synchronously (default) */ +#define SND_ASYNC 0x0001 /* play asynchronously */ +#define SND_NODEFAULT 0x0002 /* don't use default sound */ +#define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */ +#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */ +#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */ + +#endif /* ifndef MMNOSOUND */ + + +#ifndef MMNOWAVE +/**************************************************************************** + + Waveform audio support + +****************************************************************************/ + +/* waveform audio error return values */ +#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */ +#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */ +#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */ +#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */ +#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */ + +/* waveform audio data types */ +DECLARE_HANDLE(HWAVE); +DECLARE_HANDLE(HWAVEIN); +DECLARE_HANDLE(HWAVEOUT); +typedef HWAVEIN FAR *LPHWAVEIN; +typedef HWAVEOUT FAR *LPHWAVEOUT; +typedef DRVCALLBACK WAVECALLBACK; +typedef WAVECALLBACK FAR *LPWAVECALLBACK; + +/* wave callback messages */ +#define WOM_OPEN MM_WOM_OPEN +#define WOM_CLOSE MM_WOM_CLOSE +#define WOM_DONE MM_WOM_DONE +#define WIM_OPEN MM_WIM_OPEN +#define WIM_CLOSE MM_WIM_CLOSE +#define WIM_DATA MM_WIM_DATA + +/* device ID for wave device mapper */ +#define WAVE_MAPPER (-1) + +/* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */ +#define WAVE_FORMAT_QUERY 0x0001 +#define WAVE_ALLOWSYNC 0x0002 + +/* wave data block header */ +typedef struct wavehdr_tag { + LPSTR lpData; /* pointer to locked data buffer */ + DWORD dwBufferLength; /* length of data buffer */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + DWORD dwLoops; /* loop control counter */ + struct wavehdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} WAVEHDR; +typedef WAVEHDR *PWAVEHDR; +typedef WAVEHDR NEAR *NPWAVEHDR; +typedef WAVEHDR FAR *LPWAVEHDR; + +/* flags for dwFlags field of WAVEHDR */ +#define WHDR_DONE 0x00000001 /* done bit */ +#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */ +#define WHDR_BEGINLOOP 0x00000004 /* loop start block */ +#define WHDR_ENDLOOP 0x00000008 /* loop end block */ +#define WHDR_INQUEUE 0x00000010 /* reserved for driver */ + +/* waveform output device capabilities structure */ +typedef struct waveoutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of sources supported */ + DWORD dwSupport; /* functionality supported by driver */ +} WAVEOUTCAPS; +typedef WAVEOUTCAPS *PWAVEOUTCAPS; +typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS; +typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS; + +/* flags for dwSupport field of WAVEOUTCAPS */ +#define WAVECAPS_PITCH 0x0001 /* supports pitch control */ +#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */ +#define WAVECAPS_VOLUME 0x0004 /* supports volume control */ +#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */ +#define WAVECAPS_SYNC 0x0010 + +/* waveform input device capabilities structure */ +typedef struct waveincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of channels supported */ +} WAVEINCAPS; +typedef WAVEINCAPS *PWAVEINCAPS; +typedef WAVEINCAPS NEAR *NPWAVEINCAPS; +typedef WAVEINCAPS FAR *LPWAVEINCAPS; + +/* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */ +#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */ +#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */ + +/* general waveform format structure (information common to all formats) */ +typedef struct waveformat_tag { + WORD wFormatTag; /* format type */ + WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */ + DWORD nSamplesPerSec; /* sample rate */ + DWORD nAvgBytesPerSec; /* for buffer estimation */ + WORD nBlockAlign; /* block size of data */ +} WAVEFORMAT; +typedef WAVEFORMAT *PWAVEFORMAT; +typedef WAVEFORMAT NEAR *NPWAVEFORMAT; +typedef WAVEFORMAT FAR *LPWAVEFORMAT; + +/* flags for wFormatTag field of WAVEFORMAT */ +#define WAVE_FORMAT_PCM 1 + +/* specific waveform format structure for PCM data */ +typedef struct pcmwaveformat_tag { + WAVEFORMAT wf; + WORD wBitsPerSample; +} PCMWAVEFORMAT; +typedef PCMWAVEFORMAT *PPCMWAVEFORMAT; +typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT; +typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT; + +/* waveform audio function prototypes */ +UINT WINAPI waveOutGetNumDevs(void); +UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveOutClose(HWAVEOUT hWaveOut); +UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr, + UINT uSize); +UINT WINAPI waveOutPause(HWAVEOUT hWaveOut); +UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut); +UINT WINAPI waveOutReset(HWAVEOUT hWaveOut); +UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut); +UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch); +UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch); +UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate); +UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate); +UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI waveInGetNumDevs(void); +UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveInClose(HWAVEIN hWaveIn); +UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInStart(HWAVEIN hWaveIn); +UINT WINAPI waveInStop(HWAVEIN hWaveIn); +UINT WINAPI waveInReset(HWAVEIN hWaveIn); +UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOWAVE */ + + +#ifndef MMNOMIDI +/**************************************************************************** + + MIDI audio support + +****************************************************************************/ + +/* MIDI error return values */ +#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */ +#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */ +#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */ +#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */ +#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */ +#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */ +#define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */ + +/* MIDI audio data types */ +DECLARE_HANDLE(HMIDI); +DECLARE_HANDLE(HMIDIIN); +DECLARE_HANDLE(HMIDIOUT); +typedef HMIDIIN FAR *LPHMIDIIN; +typedef HMIDIOUT FAR *LPHMIDIOUT; +typedef DRVCALLBACK MIDICALLBACK; +typedef MIDICALLBACK FAR *LPMIDICALLBACK; +#define MIDIPATCHSIZE 128 +typedef WORD PATCHARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPPATCHARRAY; +typedef WORD KEYARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPKEYARRAY; + +/* MIDI callback messages */ +#define MIM_OPEN MM_MIM_OPEN +#define MIM_CLOSE MM_MIM_CLOSE +#define MIM_DATA MM_MIM_DATA +#define MIM_LONGDATA MM_MIM_LONGDATA +#define MIM_ERROR MM_MIM_ERROR +#define MIM_LONGERROR MM_MIM_LONGERROR +#define MOM_OPEN MM_MOM_OPEN +#define MOM_CLOSE MM_MOM_CLOSE +#define MOM_DONE MM_MOM_DONE + +/* device ID for MIDI mapper */ +#define MIDIMAPPER (-1) +#define MIDI_MAPPER (-1) + +/* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */ +#define MIDI_CACHE_ALL 1 +#define MIDI_CACHE_BESTFIT 2 +#define MIDI_CACHE_QUERY 3 +#define MIDI_UNCACHE 4 + +/* MIDI output device capabilities structure */ +typedef struct midioutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + UINT wVoices; /* # of voices (internal synth only) */ + UINT wNotes; /* max # of notes (internal synth only) */ + UINT wChannelMask; /* channels used (internal synth only) */ + DWORD dwSupport; /* functionality supported by driver */ +} MIDIOUTCAPS; +typedef MIDIOUTCAPS *PMIDIOUTCAPS; +typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS; +typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS; + +/* flags for wTechnology field of MIDIOUTCAPS structure */ +#define MOD_MIDIPORT 1 /* output port */ +#define MOD_SYNTH 2 /* generic internal synth */ +#define MOD_SQSYNTH 3 /* square wave internal synth */ +#define MOD_FMSYNTH 4 /* FM internal synth */ +#define MOD_MAPPER 5 /* MIDI mapper */ + +/* flags for dwSupport field of MIDIOUTCAPS structure */ +#define MIDICAPS_VOLUME 0x0001 /* supports volume control */ +#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */ +#define MIDICAPS_CACHE 0x0004 + +/* MIDI output device capabilities structure */ +typedef struct midiincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ +} MIDIINCAPS; +typedef MIDIINCAPS *PMIDIINCAPS; +typedef MIDIINCAPS NEAR *NPMIDIINCAPS; +typedef MIDIINCAPS FAR *LPMIDIINCAPS; + +/* MIDI data block header */ +typedef struct midihdr_tag { + LPSTR lpData; /* pointer to locked data block */ + DWORD dwBufferLength; /* length of data in data block */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + struct midihdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} MIDIHDR; +typedef MIDIHDR *PMIDIHDR; +typedef MIDIHDR NEAR *NPMIDIHDR; +typedef MIDIHDR FAR *LPMIDIHDR; + +/* flags for dwFlags field of MIDIHDR structure */ +#define MHDR_DONE 0x00000001 /* done bit */ +#define MHDR_PREPARED 0x00000002 /* set if header prepared */ +#define MHDR_INQUEUE 0x00000004 /* reserved for driver */ + +/* MIDI function prototypes */ +UINT WINAPI midiOutGetNumDevs(void); +UINT WINAPI midiOutGetDevCaps(UINT uDeviceID, + MIDIOUTCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiOutClose(HMIDIOUT hMidiOut); +UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg); +UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutReset(HMIDIOUT hMidiOut); +UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut, + UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags); +UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut, + UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags); +UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI midiInGetNumDevs(void); +UINT WINAPI midiInGetDevCaps(UINT uDeviceID, + LPMIDIINCAPS lpCaps, UINT uSize); +UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiInClose(HMIDIIN hMidiIn); +UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInStart(HMIDIIN hMidiIn); +UINT WINAPI midiInStop(HMIDIIN hMidiIn); +UINT WINAPI midiInReset(HMIDIIN hMidiIn); +UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOMIDI */ + + +#ifndef MMNOAUX +/**************************************************************************** + + Auxiliary audio support + +****************************************************************************/ + +/* device ID for aux device mapper */ +#define AUX_MAPPER (-1) + +/* Auxiliary audio device capabilities structure */ +typedef struct auxcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + DWORD dwSupport; /* functionality supported by driver */ +} AUXCAPS; +typedef AUXCAPS *PAUXCAPS; +typedef AUXCAPS NEAR *NPAUXCAPS; +typedef AUXCAPS FAR *LPAUXCAPS; + +/* flags for wTechnology field in AUXCAPS structure */ +#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */ +#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */ + +/* flags for dwSupport field in AUXCAPS structure */ +#define AUXCAPS_VOLUME 0x0001 /* supports volume control */ +#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */ + +/* auxiliary audio function prototypes */ +UINT WINAPI auxGetNumDevs(void); +UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); + +#if (WINVER >= 0x030a) +DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOAUX */ + + +#ifndef MMNOTIMER +/**************************************************************************** + + Timer support + +****************************************************************************/ + +/* timer error return values */ +#define TIMERR_NOERROR (0) /* no error */ +#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */ +#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */ + +/* timer data types */ +typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef TIMECALLBACK FAR *LPTIMECALLBACK; + +/* flags for wFlags parameter of timeSetEvent() function */ +#define TIME_ONESHOT 0 /* program timer for single event */ +#define TIME_PERIODIC 1 /* program for continuous periodic event */ + +/* timer device capabilities data structure */ +typedef struct timecaps_tag { + UINT wPeriodMin; /* minimum period supported */ + UINT wPeriodMax; /* maximum period supported */ + } TIMECAPS; +typedef TIMECAPS *PTIMECAPS; +typedef TIMECAPS NEAR *NPTIMECAPS; +typedef TIMECAPS FAR *LPTIMECAPS; + +/* timer function prototypes */ +UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize); +DWORD WINAPI timeGetTime(void); +UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution, + LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags); +UINT WINAPI timeKillEvent(UINT uTimerID); +UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize); +UINT WINAPI timeBeginPeriod(UINT uPeriod); +UINT WINAPI timeEndPeriod(UINT uPeriod); + +#endif /* ifndef MMNOTIMER */ + + +#ifndef MMNOJOY +/**************************************************************************** + + Joystick support + +****************************************************************************/ + +/* joystick error return values */ +#define JOYERR_NOERROR (0) /* no error */ +#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */ +#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */ +#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */ + +/* constants used with JOYINFO structure and MM_JOY* messages */ +#define JOY_BUTTON1 0x0001 +#define JOY_BUTTON2 0x0002 +#define JOY_BUTTON3 0x0004 +#define JOY_BUTTON4 0x0008 +#define JOY_BUTTON1CHG 0x0100 +#define JOY_BUTTON2CHG 0x0200 +#define JOY_BUTTON3CHG 0x0400 +#define JOY_BUTTON4CHG 0x0800 + +/* joystick ID constants */ +#define JOYSTICKID1 0 +#define JOYSTICKID2 1 + +/* joystick device capabilities data structure */ +typedef struct joycaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wXmin; /* minimum x position value */ + UINT wXmax; /* maximum x position value */ + UINT wYmin; /* minimum y position value */ + UINT wYmax; /* maximum y position value */ + UINT wZmin; /* minimum z position value */ + UINT wZmax; /* maximum z position value */ + UINT wNumButtons; /* number of buttons */ + UINT wPeriodMin; /* minimum message period when captured */ + UINT wPeriodMax; /* maximum message period when captured */ + } JOYCAPS; +typedef JOYCAPS *PJOYCAPS; +typedef JOYCAPS NEAR *NPJOYCAPS; +typedef JOYCAPS FAR *LPJOYCAPS; + +/* joystick information data structure */ +typedef struct joyinfo_tag { + UINT wXpos; /* x position */ + UINT wYpos; /* y position */ + UINT wZpos; /* z position */ + UINT wButtons; /* button states */ + } JOYINFO; +typedef JOYINFO *PJOYINFO; +typedef JOYINFO NEAR *NPJOYINFO; +typedef JOYINFO FAR *LPJOYINFO; + +/* joystick function prototypes */ +UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI joyGetNumDevs(void); +UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo); +UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold); +UINT WINAPI joyReleaseCapture(UINT uJoyID); +UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod, + BOOL bChanged); +UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold); + +#endif /* ifndef MMNOJOY */ + + +#ifndef MMNOMMIO +/**************************************************************************** + + Multimedia File I/O support + +****************************************************************************/ + +/* MMIO error return values */ +#define MMIOERR_BASE 256 +#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */ +#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */ +#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */ +#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */ +#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */ +#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */ +#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */ +#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */ +#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */ +#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */ + +/* MMIO constants */ +#define CFSEPCHAR '+' /* compound file name separator char. */ + +/* MMIO data types */ +typedef DWORD FOURCC; /* a four character code */ +typedef char _huge * HPSTR; /* a huge version of LPSTR */ +DECLARE_HANDLE(HMMIO); /* a handle to an open file */ +typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +typedef MMIOPROC FAR *LPMMIOPROC; + +/* general MMIO information data structure */ +typedef struct _MMIOINFO +{ + /* general fields */ + DWORD dwFlags; /* general status flags */ + FOURCC fccIOProc; /* pointer to I/O procedure */ + LPMMIOPROC pIOProc; /* pointer to I/O procedure */ + UINT wErrorRet; /* place for error to be returned */ + HTASK htask; /* alternate local task */ + + /* fields maintained by MMIO functions during buffered I/O */ + LONG cchBuffer; /* size of I/O buffer (or 0L) */ + HPSTR pchBuffer; /* start of I/O buffer (or NULL) */ + HPSTR pchNext; /* pointer to next byte to read/write */ + HPSTR pchEndRead; /* pointer to last valid byte to read */ + HPSTR pchEndWrite; /* pointer to last byte to write */ + LONG lBufOffset; /* disk offset of start of buffer */ + + /* fields maintained by I/O procedure */ + LONG lDiskOffset; /* disk offset of next read or write */ + DWORD adwInfo[3]; /* data specific to type of MMIOPROC */ + + /* other fields maintained by MMIO */ + DWORD dwReserved1; /* reserved for MMIO use */ + DWORD dwReserved2; /* reserved for MMIO use */ + HMMIO hmmio; /* handle to open file */ +} MMIOINFO; +typedef MMIOINFO *PMMIOINFO; +typedef MMIOINFO NEAR *NPMMIOINFO; +typedef MMIOINFO FAR *LPMMIOINFO; + +/* RIFF chunk information data structure */ +typedef struct _MMCKINFO +{ + FOURCC ckid; /* chunk ID */ + DWORD cksize; /* chunk size */ + FOURCC fccType; /* form type or list type */ + DWORD dwDataOffset; /* offset of data portion of chunk */ + DWORD dwFlags; /* flags used by MMIO functions */ +} MMCKINFO; +typedef MMCKINFO *PMMCKINFO; +typedef MMCKINFO NEAR *NPMMCKINFO; +typedef MMCKINFO FAR *LPMMCKINFO; + +/* bit field masks */ +#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */ +#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */ + +/* constants for dwFlags field of MMIOINFO */ +#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */ +#define MMIO_PARSE 0x00000100 /* parse new file returning path */ +#define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */ +#define MMIO_EXIST 0x00004000 /* checks for existence of file */ +#define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */ +#define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */ + +#define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */ + + +/* read/write mode numbers (bit field MMIO_RWMODE) */ +#define MMIO_READ 0x00000000 /* open file for reading only */ +#define MMIO_WRITE 0x00000001 /* open file for writing only */ +#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */ + +/* share mode numbers (bit field MMIO_SHAREMODE) */ +#define MMIO_COMPAT 0x00000000 /* compatibility mode */ +#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */ +#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */ +#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */ +#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */ + +/* various MMIO flags */ +#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */ +#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */ +#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */ +#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */ +#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */ +#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */ +#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */ +#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */ +#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */ +#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */ +#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */ +#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */ + + +/* message numbers for MMIOPROC I/O procedure functions */ +#define MMIOM_READ MMIO_READ /* read */ +#define MMIOM_WRITE MMIO_WRITE /* write */ +#define MMIOM_SEEK 2 /* seek to a new position in file */ +#define MMIOM_OPEN 3 /* open file */ +#define MMIOM_CLOSE 4 /* close file */ +#define MMIOM_WRITEFLUSH 5 /* write and flush */ + +#if (WINVER >= 0x030a) +#define MMIOM_RENAME 6 /* rename specified file */ +#endif /* ifdef WINVER >= 0x030a */ + +#define MMIOM_USER 0x8000 /* beginning of user-defined messages */ + +/* standard four character codes */ +#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F') +#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T') + +/* four character codes used to identify standard built-in I/O procedures */ +#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ') +#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ') + +/* flags for mmioSeek() */ +#ifndef SEEK_SET +#define SEEK_SET 0 /* seek to an absolute position */ +#define SEEK_CUR 1 /* seek relative to current position */ +#define SEEK_END 2 /* seek relative to end of file */ +#endif /* ifndef SEEK_SET */ + +/* other constants */ +#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */ + +/* MMIO macros */ +#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ + ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \ + ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) ) + +/* MMIO function prototypes */ +FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags); +LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, + DWORD dwFlags); +HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo, + DWORD dwOpenFlags); + +#if (WINVER >= 0x030a) +UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName, + MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags); +LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch); +LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch); +LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin); +UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, + UINT uFlags); +UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags); +UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck, + const MMCKINFO FAR* lpckParent, UINT uFlags); +UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); +UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); + +#endif /* ifndef MMNOMMIO */ + + +#ifndef MMNOMCI +/**************************************************************************** + + MCI support + +****************************************************************************/ + +typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData); + +/* MCI function prototypes */ +DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage, + DWORD dwParam1, DWORD dwParam2); +DWORD WINAPI mciSendString (LPCSTR lpstrCommand, + LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback); +UINT WINAPI mciGetDeviceID (LPCSTR lpstrName); +UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID, + LPCSTR lpstrType); +BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer, + UINT uLength); +BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc, + DWORD dwYieldData); + +#if (WINVER >= 0x030a) +HTASK WINAPI mciGetCreatorTask(UINT uDeviceID); +YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData); +#endif /* ifdef WINVER >= 0x030a */ + +#if (WINVER < 0x030a) +BOOL WINAPI mciExecute (LPCSTR lpstrCommand); +#endif /* ifdef WINVER < 0x030a */ + +/* MCI error return values */ +#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1) +#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3) +#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5) +#define MCIERR_HARDWARE (MCIERR_BASE + 6) +#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7) +#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8) +#define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9) +#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10) +#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11) +#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12) +#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13) +#define MCIERR_BAD_INTEGER (MCIERR_BASE + 14) +#define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15) +#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16) +#define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17) +#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18) +#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19) +#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20) +#define MCIERR_INTERNAL (MCIERR_BASE + 21) +#define MCIERR_DRIVER (MCIERR_BASE + 22) +#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23) +#define MCIERR_MULTIPLE (MCIERR_BASE + 24) +#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25) +#define MCIERR_OUTOFRANGE (MCIERR_BASE + 26) +#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28) +#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30) +#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31) +#define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32) +#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33) +#define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34) +#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35) +#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36) +#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37) +#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38) +#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39) +#define MCIERR_INVALID_FILE (MCIERR_BASE + 40) +#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41) +#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42) +#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43) +#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44) +#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45) +#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46) +#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47) +#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48) +#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49) +#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50) +#define MCIERR_GET_CD (MCIERR_BASE + 51) +#define MCIERR_SET_CD (MCIERR_BASE + 52) +#define MCIERR_SET_DRIVE (MCIERR_BASE + 53) +#define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54) +#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55) +#define MCIERR_NO_INTEGER (MCIERR_BASE + 56) + +#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64) +#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65) +#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66) +#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67) +#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68) +#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69) +#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70) +#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71) +#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72) +#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73) + +#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80) +#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81) +#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82) +#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83) +#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84) +#define MCIERR_SEQ_TIMER (MCIERR_BASE + 85) +#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86) +#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87) + +#define MCIERR_NO_WINDOW (MCIERR_BASE + 90) +#define MCIERR_CREATEWINDOW (MCIERR_BASE + 91) +#define MCIERR_FILE_READ (MCIERR_BASE + 92) +#define MCIERR_FILE_WRITE (MCIERR_BASE + 93) + +/* all custom device driver errors must be >= than this value */ +#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256) + +/* MCI command message identifiers */ +#define MCI_OPEN 0x0803 +#define MCI_CLOSE 0x0804 +#define MCI_ESCAPE 0x0805 +#define MCI_PLAY 0x0806 +#define MCI_SEEK 0x0807 +#define MCI_STOP 0x0808 +#define MCI_PAUSE 0x0809 +#define MCI_INFO 0x080A +#define MCI_GETDEVCAPS 0x080B +#define MCI_SPIN 0x080C +#define MCI_SET 0x080D +#define MCI_STEP 0x080E +#define MCI_RECORD 0x080F +#define MCI_SYSINFO 0x0810 +#define MCI_BREAK 0x0811 +#define MCI_SOUND 0x0812 +#define MCI_SAVE 0x0813 +#define MCI_STATUS 0x0814 +#define MCI_CUE 0x0830 +#define MCI_REALIZE 0x0840 +#define MCI_WINDOW 0x0841 +#define MCI_PUT 0x0842 +#define MCI_WHERE 0x0843 +#define MCI_FREEZE 0x0844 +#define MCI_UNFREEZE 0x0845 +#define MCI_LOAD 0x0850 +#define MCI_CUT 0x0851 +#define MCI_COPY 0x0852 +#define MCI_PASTE 0x0853 +#define MCI_UPDATE 0x0854 +#define MCI_RESUME 0x0855 +#define MCI_DELETE 0x0856 + +/* all custom MCI command messages must be >= than this value */ +#define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST) + + +/* device ID for "all devices" */ +#define MCI_ALL_DEVICE_ID 0xFFFF + +/* constants for predefined MCI device types */ +#define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1) +#define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2) +#define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3) +#define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4) +#define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5) +#define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6) +#define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7) +#define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8) +#define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9) +#define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10) +#define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11) + +#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR +#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER + +/* return values for 'status mode' command */ +#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12) +#define MCI_MODE_STOP (MCI_STRING_OFFSET + 13) +#define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14) +#define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15) +#define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16) +#define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17) +#define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18) + +/* constants used in 'set time format' and 'status time format' commands */ +#define MCI_FORMAT_MILLISECONDS 0 +#define MCI_FORMAT_HMS 1 +#define MCI_FORMAT_MSF 2 +#define MCI_FORMAT_FRAMES 3 +#define MCI_FORMAT_SMPTE_24 4 +#define MCI_FORMAT_SMPTE_25 5 +#define MCI_FORMAT_SMPTE_30 6 +#define MCI_FORMAT_SMPTE_30DROP 7 +#define MCI_FORMAT_BYTES 8 +#define MCI_FORMAT_SAMPLES 9 +#define MCI_FORMAT_TMSF 10 + +/* MCI time format conversion macros */ +#define MCI_MSF_MINUTE(msf) ((BYTE)(msf)) +#define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8)) +#define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16)) + +#define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \ + ((WORD)(s)<<8)) | \ + (((DWORD)(BYTE)(f))<<16))) + +#define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf)) +#define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8)) +#define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16)) +#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24)) + +#define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s) | \ + ((WORD)(f)<<8))<<16))) + +#define MCI_HMS_HOUR(hms) ((BYTE)(hms)) +#define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8)) +#define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16)) + +#define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s))<<16))) + + +/* flags for wParam of MM_MCINOTIFY message */ +#define MCI_NOTIFY_SUCCESSFUL 0x0001 +#define MCI_NOTIFY_SUPERSEDED 0x0002 +#define MCI_NOTIFY_ABORTED 0x0004 +#define MCI_NOTIFY_FAILURE 0x0008 + + +/* common flags for dwFlags parameter of MCI command messages */ +#define MCI_NOTIFY 0x00000001L +#define MCI_WAIT 0x00000002L +#define MCI_FROM 0x00000004L +#define MCI_TO 0x00000008L +#define MCI_TRACK 0x00000010L + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OPEN_SHAREABLE 0x00000100L +#define MCI_OPEN_ELEMENT 0x00000200L +#define MCI_OPEN_ALIAS 0x00000400L +#define MCI_OPEN_ELEMENT_ID 0x00000800L +#define MCI_OPEN_TYPE_ID 0x00001000L +#define MCI_OPEN_TYPE 0x00002000L + +/* flags for dwFlags parameter of MCI_SEEK command message */ +#define MCI_SEEK_TO_START 0x00000100L +#define MCI_SEEK_TO_END 0x00000200L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_STATUS_ITEM 0x00000100L +#define MCI_STATUS_START 0x00000200L + +/* flags for dwItem field of the MCI_STATUS_PARMS parameter block */ +#define MCI_STATUS_LENGTH 0x00000001L +#define MCI_STATUS_POSITION 0x00000002L +#define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L +#define MCI_STATUS_MODE 0x00000004L +#define MCI_STATUS_MEDIA_PRESENT 0x00000005L +#define MCI_STATUS_TIME_FORMAT 0x00000006L +#define MCI_STATUS_READY 0x00000007L +#define MCI_STATUS_CURRENT_TRACK 0x00000008L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_INFO_PRODUCT 0x00000100L +#define MCI_INFO_FILE 0x00000200L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_GETDEVCAPS_ITEM 0x00000100L + +/* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L +#define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L +#define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L +#define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L +#define MCI_GETDEVCAPS_USES_FILES 0x00000005L +#define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L +#define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L +#define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L +#define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L + +/* flags for dwFlags parameter of MCI_SYSINFO command message */ +#define MCI_SYSINFO_QUANTITY 0x00000100L +#define MCI_SYSINFO_OPEN 0x00000200L +#define MCI_SYSINFO_NAME 0x00000400L +#define MCI_SYSINFO_INSTALLNAME 0x00000800L + +/* flags for dwFlags parameter of MCI_SET command message */ +#define MCI_SET_DOOR_OPEN 0x00000100L +#define MCI_SET_DOOR_CLOSED 0x00000200L +#define MCI_SET_TIME_FORMAT 0x00000400L +#define MCI_SET_AUDIO 0x00000800L +#define MCI_SET_VIDEO 0x00001000L +#define MCI_SET_ON 0x00002000L +#define MCI_SET_OFF 0x00004000L + +/* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */ +#define MCI_SET_AUDIO_ALL 0x00000000L +#define MCI_SET_AUDIO_LEFT 0x00000001L +#define MCI_SET_AUDIO_RIGHT 0x00000002L + +/* flags for dwFlags parameter of MCI_BREAK command message */ +#define MCI_BREAK_KEY 0x00000100L +#define MCI_BREAK_HWND 0x00000200L +#define MCI_BREAK_OFF 0x00000400L + +/* flags for dwFlags parameter of MCI_RECORD command message */ +#define MCI_RECORD_INSERT 0x00000100L +#define MCI_RECORD_OVERWRITE 0x00000200L + +/* flags for dwFlags parameter of MCI_SOUND command message */ +#define MCI_SOUND_NAME 0x00000100L + +/* flags for dwFlags parameter of MCI_SAVE command message */ +#define MCI_SAVE_FILE 0x00000100L + +/* flags for dwFlags parameter of MCI_LOAD command message */ +#define MCI_LOAD_FILE 0x00000100L + +/* generic parameter block for MCI command messages with no special parameters */ +typedef struct tagMCI_GENERIC_PARMS { + DWORD dwCallback; +} MCI_GENERIC_PARMS; +typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS; + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; +} MCI_OPEN_PARMS; +typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_PLAY_PARMS; +typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS; + +/* parameter block for MCI_SEEK command message */ +typedef struct tagMCI_SEEK_PARMS { + DWORD dwCallback; + DWORD dwTo; +} MCI_SEEK_PARMS; +typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS; + +/* parameter block for MCI_STATUS command message */ +typedef struct tagMCI_STATUS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; + DWORD dwTrack; +} MCI_STATUS_PARMS; +typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS; + +/* parameter block for MCI_INFO command message */ +typedef struct tagMCI_INFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; +} MCI_INFO_PARMS; +typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS; + +/* parameter block for MCI_GETDEVCAPS command message */ +typedef struct tagMCI_GETDEVCAPS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; +} MCI_GETDEVCAPS_PARMS; +typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS; + +/* parameter block for MCI_SYSINFO command message */ +typedef struct tagMCI_SYSINFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; + DWORD dwNumber; + UINT wDeviceType; + UINT wReserved0; +} MCI_SYSINFO_PARMS; +typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; +} MCI_SET_PARMS; +typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS; + +/* parameter block for MCI_BREAK command message */ +typedef struct tagMCI_BREAK_PARMS { + DWORD dwCallback; + int nVirtKey; + UINT wReserved0; + HWND hwndBreak; + UINT wReserved1; +} MCI_BREAK_PARMS; +typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS; + +/* parameter block for MCI_SOUND command message */ +typedef struct tagMCI_SOUND_PARMS { + DWORD dwCallback; + LPCSTR lpstrSoundName; +} MCI_SOUND_PARMS; +typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_SAVE_PARMS; +typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_LOAD_PARMS; +typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS; + +/* parameter block for MCI_RECORD command message */ +typedef struct tagMCI_RECORD_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_RECORD_PARMS; +typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS; + + +/* MCI extensions for videodisc devices */ + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */ +#define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1) + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */ +#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2) +#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3) +#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4) + +#define MCI_VD_FORMAT_TRACK 0x4001 + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_VD_PLAY_REVERSE 0x00010000L +#define MCI_VD_PLAY_FAST 0x00020000L +#define MCI_VD_PLAY_SPEED 0x00040000L +#define MCI_VD_PLAY_SCAN 0x00080000L +#define MCI_VD_PLAY_SLOW 0x00100000L + +/* flag for dwFlags parameter of MCI_SEEK command message */ +#define MCI_VD_SEEK_REVERSE 0x00010000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_VD_STATUS_SPEED 0x00004002L +#define MCI_VD_STATUS_FORWARD 0x00004003L +#define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L +#define MCI_VD_STATUS_SIDE 0x00004005L +#define MCI_VD_STATUS_DISC_SIZE 0x00004006L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_VD_GETDEVCAPS_CLV 0x00010000L +#define MCI_VD_GETDEVCAPS_CAV 0x00020000L + +#define MCI_VD_SPIN_UP 0x00010000L +#define MCI_VD_SPIN_DOWN 0x00020000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L +#define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L +#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L +#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L + +/* flags for the dwFlags parameter of MCI_STEP command message */ +#define MCI_VD_STEP_FRAMES 0x00010000L +#define MCI_VD_STEP_REVERSE 0x00020000L + +/* flag for the MCI_ESCAPE command message */ +#define MCI_VD_ESCAPE_STRING 0x00000100L + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_VD_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; + } MCI_VD_PLAY_PARMS; +typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_VD_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_VD_STEP_PARMS; +typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS; + +/* parameter block for MCI_ESCAPE command message */ +typedef struct tagMCI_VD_ESCAPE_PARMS { + DWORD dwCallback; + LPCSTR lpstrCommand; +} MCI_VD_ESCAPE_PARMS; +typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS; + + +/* MCI extensions for waveform audio devices */ + +/* flags for the dwFlags parameter of MCI_OPEN command message */ +#define MCI_WAVE_OPEN_BUFFER 0x00010000L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_FORMATTAG 0x00010000L +#define MCI_WAVE_SET_CHANNELS 0x00020000L +#define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L +#define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L +#define MCI_WAVE_SET_BLOCKALIGN 0x00100000L +#define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L + +/* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */ +#define MCI_WAVE_INPUT 0x00400000L +#define MCI_WAVE_OUTPUT 0x00800000L + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_WAVE_STATUS_FORMATTAG 0x00004001L +#define MCI_WAVE_STATUS_CHANNELS 0x00004002L +#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L +#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L +#define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L +#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L +#define MCI_WAVE_STATUS_LEVEL 0x00004007L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_ANYINPUT 0x04000000L +#define MCI_WAVE_SET_ANYOUTPUT 0x08000000L + +/* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L +#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_WAVE_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwBufferSeconds; +} MCI_WAVE_OPEN_PARMS; +typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS; + +/* parameter block for MCI_DELETE command message */ +typedef struct tagMCI_WAVE_DELETE_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_WAVE_DELETE_PARMS; +typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_WAVE_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + UINT wInput; + UINT wReserved0; + UINT wOutput; + UINT wReserved1; + UINT wFormatTag; + UINT wReserved2; + UINT nChannels; + UINT wReserved3; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + UINT nBlockAlign; + UINT wReserved4; + UINT wBitsPerSample; + UINT wReserved5; +} MCI_WAVE_SET_PARMS; +typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS; + + +/* MCI extensions for MIDI sequencer devices */ + +/* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */ +/* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */ +#define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET) + +/* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */ +/* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */ +#define MCI_SEQ_FORMAT_SONGPTR 0x4001 +#define MCI_SEQ_FILE 0x4002 +#define MCI_SEQ_MIDI 0x4003 +#define MCI_SEQ_SMPTE 0x4004 +#define MCI_SEQ_NONE 65533 + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_SEQ_STATUS_TEMPO 0x00004002L +#define MCI_SEQ_STATUS_PORT 0x00004003L +#define MCI_SEQ_STATUS_SLAVE 0x00004007L +#define MCI_SEQ_STATUS_MASTER 0x00004008L +#define MCI_SEQ_STATUS_OFFSET 0x00004009L +#define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_SEQ_SET_TEMPO 0x00010000L +#define MCI_SEQ_SET_PORT 0x00020000L +#define MCI_SEQ_SET_SLAVE 0x00040000L +#define MCI_SEQ_SET_MASTER 0x00080000L +#define MCI_SEQ_SET_OFFSET 0x01000000L + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SEQ_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + DWORD dwTempo; + DWORD dwPort; + DWORD dwSlave; + DWORD dwMaster; + DWORD dwOffset; +} MCI_SEQ_SET_PARMS; +typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS; + + +/* MCI extensions for animation devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_ANIM_OPEN_WS 0x00010000L +#define MCI_ANIM_OPEN_PARENT 0x00020000L +#define MCI_ANIM_OPEN_NOSTATIC 0x00040000L + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_ANIM_PLAY_SPEED 0x00010000L +#define MCI_ANIM_PLAY_REVERSE 0x00020000L +#define MCI_ANIM_PLAY_FAST 0x00040000L +#define MCI_ANIM_PLAY_SLOW 0x00080000L +#define MCI_ANIM_PLAY_SCAN 0x00100000L + +/* flags for dwFlags parameter of MCI_STEP command message */ +#define MCI_ANIM_STEP_REVERSE 0x00010000L +#define MCI_ANIM_STEP_FRAMES 0x00020000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_ANIM_STATUS_SPEED 0x00004001L +#define MCI_ANIM_STATUS_FORWARD 0x00004002L +#define MCI_ANIM_STATUS_HWND 0x00004003L +#define MCI_ANIM_STATUS_HPAL 0x00004004L +#define MCI_ANIM_STATUS_STRETCH 0x00004005L + +/* flags for the dwFlags parameter of MCI_INFO command message */ +#define MCI_ANIM_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L +#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L +#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L +#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L +#define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L +#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L +#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L + +/* flags for the MCI_REALIZE command message */ +#define MCI_ANIM_REALIZE_NORM 0x00010000L +#define MCI_ANIM_REALIZE_BKGD 0x00020000L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_ANIM_WINDOW_HWND 0x00010000L +#define MCI_ANIM_WINDOW_STATE 0x00040000L +#define MCI_ANIM_WINDOW_TEXT 0x00080000L +#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */ +/* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */ +#define MCI_ANIM_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_ANIM_RECT 0x00010000L +#define MCI_ANIM_PUT_SOURCE 0x00020000L +#define MCI_ANIM_PUT_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_ANIM_WHERE_SOURCE 0x00020000L +#define MCI_ANIM_WHERE_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_UPDATE command message */ +#define MCI_ANIM_UPDATE_HDC 0x00020000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_ANIM_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; +} MCI_ANIM_OPEN_PARMS; +typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_ANIM_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; +} MCI_ANIM_PLAY_PARMS; +typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_ANIM_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_ANIM_STEP_PARMS; +typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_ANIM_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_ANIM_WINDOW_PARMS; +typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */ +typedef struct tagMCI_ANIM_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_ANIM_RECT_PARMS; +typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS; + +/* parameter block for MCI_UPDATE PARMS */ +typedef struct tagMCI_ANIM_UPDATE_PARMS { + DWORD dwCallback; + RECT rc; + HDC hDC; +} MCI_ANIM_UPDATE_PARMS; +typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS; + + +/* MCI extensions for video overlay devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OVLY_OPEN_WS 0x00010000L +#define MCI_OVLY_OPEN_PARENT 0x00020000L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_OVLY_STATUS_HWND 0x00004001L +#define MCI_OVLY_STATUS_STRETCH 0x00004002L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_OVLY_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L +#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L +#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_OVLY_WINDOW_HWND 0x00010000L +#define MCI_OVLY_WINDOW_STATE 0x00040000L +#define MCI_OVLY_WINDOW_TEXT 0x00080000L +#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */ +#define MCI_OVLY_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_OVLY_RECT 0x00010000L +#define MCI_OVLY_PUT_SOURCE 0x00020000L +#define MCI_OVLY_PUT_DESTINATION 0x00040000L +#define MCI_OVLY_PUT_FRAME 0x00080000L +#define MCI_OVLY_PUT_VIDEO 0x00100000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_OVLY_WHERE_SOURCE 0x00020000L +#define MCI_OVLY_WHERE_DESTINATION 0x00040000L +#define MCI_OVLY_WHERE_FRAME 0x00080000L +#define MCI_OVLY_WHERE_VIDEO 0x00100000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OVLY_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; + } MCI_OVLY_OPEN_PARMS; +typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_OVLY_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_OVLY_WINDOW_PARMS; +typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */ +typedef struct tagMCI_OVLY_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_OVLY_RECT_PARMS; +typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_OVLY_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_SAVE_PARMS; +typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_OVLY_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_LOAD_PARMS; +typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS; + +#endif /* ifndef MMNOMCI */ + +/**************************************************************************** + + DISPLAY Driver extensions + +****************************************************************************/ + +#ifndef C1_TRANSPARENT + #define CAPS1 94 /* other caps */ + #define C1_TRANSPARENT 0x0001 /* new raster cap */ + #define NEWTRANSPARENT 3 /* use with SetBkMode() */ + + #define QUERYROPSUPPORT 40 /* use to determine ROP support */ +#endif /* ifndef C1_TRANSPARENT */ + +/**************************************************************************** + + DIB Driver extensions + +****************************************************************************/ + +#define SELECTDIB 41 /* DIB.DRV select dib escape */ +#define DIBINDEX(n) MAKELONG((n),0x10FF) + + +/**************************************************************************** + + ScreenSaver support + + The current application will receive a syscommand of SC_SCREENSAVE just + before the screen saver is invoked. If the app wishes to prevent a + screen save, return non-zero value, otherwise call DefWindowProc(). + +****************************************************************************/ + +#ifndef SC_SCREENSAVE + + #define SC_SCREENSAVE 0xF140 + +#endif /* ifndef SC_SCREENSAVE */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif + +#endif /* _INC_MMSYSTEM */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc new file mode 100644 index 000000000..7bef08693 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc @@ -0,0 +1,1484 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MMSYSTEM.INC - Multimedia assembly language structures & constants +; +; Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +; If defined, the following flags inhibit inclusion +; of the indicated items: +; +; MMNODRV - Installable driver support +; MMNOSOUND - Sound support +; MMNOWAVE - Waveform support +; MMNOMIDI - MIDI support +; MMNOAUX - Auxiliary audio support +; MMNOTIMER - Timer support +; MMNOJOY - Joystick support +; MMNOMCI - MCI support +; MMNOMMIO - Multimedia file I/O support +; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; General constants and data types +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; general constants +MAXPNAMELEN equ 32 ; max product name length (including NULL) +MAXERRORLENGTH equ 128 ; max error text length (including NULL) + +; MMTIME data structure +MMTIME struc + mmt_wType dw ? ; indicates the contents of the union + mmt_TimeUnion dd ? ; union +MMTIME ends + +SMPTE struc + smpte_hour db ? ; hours + smpte_min db ? ; minutes + smpte_sec db ? ; seconds + smpte_frame db ? ; frames + smpte_fps db ? ; frames per second + smpte_reserved db ? ; pad +SMPTE ends + +; types for wType field in MMTIME struct +TIME_MS equ 0001h ; time in milliseconds +TIME_SAMPLES equ 0002h ; number of wave samples +TIME_BYTES equ 0004h ; current byte offset +TIME_SMPTE equ 0008h ; SMPTE time +TIME_MIDI equ 0010h ; MIDI time + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Multimedia Extensions Window Messages +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +MM_JOY1MOVE equ 3A0h ; joystick +MM_JOY2MOVE equ 3A1h +MM_JOY1ZMOVE equ 3A2h +MM_JOY2ZMOVE equ 3A3h +MM_JOY1BUTTONDOWN equ 3B5h +MM_JOY2BUTTONDOWN equ 3B6h +MM_JOY1BUTTONUP equ 3B7h +MM_JOY2BUTTONUP equ 3B8h + +MM_MCINOTIFY equ 3B9h ; MCI +MM_MCISYSTEM_STRING equ 3CAh + +MM_WOM_OPEN equ 3BBh ; waveform output +MM_WOM_CLOSE equ 3BCh +MM_WOM_DONE equ 3BDh + +MM_WIM_OPEN equ 3BEh ; waveform input +MM_WIM_CLOSE equ 3BFh +MM_WIM_DATA equ 3C0h + +MM_MIM_OPEN equ 3C1h ; MIDI input +MM_MIM_CLOSE equ 3C2h +MM_MIM_DATA equ 3C3h +MM_MIM_LONGDATA equ 3C4h +MM_MIM_ERROR equ 3C5h +MM_MIM_LONGERROR equ 3C6h + +MM_MOM_OPEN equ 3C7h ; MIDI output +MM_MOM_CLOSE equ 3C8h +MM_MOM_DONE equ 3C9h + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; String resource number bases (internal use) +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +MMSYSERR_BASE equ 0 +WAVERR_BASE equ 32 +MIDIERR_BASE equ 64 +TIMERR_BASE equ 96 +JOYERR_BASE equ 160 +MCIERR_BASE equ 256 + +MCI_STRING_OFFSET equ 512 +MCI_VD_OFFSET equ 1024 +MCI_CD_OFFSET equ 1088 +MCI_WAVE_OFFSET equ 1152 +MCI_SEQ_OFFSET equ 1216 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; General error return values +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; general error return values +MMSYSERR_NOERROR equ 0 ; no error +MMSYSERR_ERROR equ (MMSYSERR_BASE + 1) ; unspecified error +MMSYSERR_BADDEVICEID equ (MMSYSERR_BASE + 2) ; device ID out of range +MMSYSERR_NOTENABLED equ (MMSYSERR_BASE + 3) ; driver failed enable +MMSYSERR_ALLOCATED equ (MMSYSERR_BASE + 4) ; device already allocated +MMSYSERR_INVALHANDLE equ (MMSYSERR_BASE + 5) ; device handle is invalid +MMSYSERR_NODRIVER equ (MMSYSERR_BASE + 6) ; no device driver present +MMSYSERR_NOMEM equ (MMSYSERR_BASE + 7) ; memory allocation error +MMSYSERR_NOTSUPPORTED equ (MMSYSERR_BASE + 8) ; function isn't supported +MMSYSERR_BADERRNUM equ (MMSYSERR_BASE + 9) ; error value out of range +MMSYSERR_INVALFLAG equ (MMSYSERR_BASE + 10) ; invalid flags passed +MMSYSERR_INVALPARAM equ (MMSYSERR_BASE + 11) ; invalid parameter passed +MMSYSERR_LASTERROR equ (MMSYSERR_BASE + 11) ; last error in range + + +ifndef MMNODRV +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Installable driver support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +DRV_MCI_FIRST equ DRV_RESERVED +DRV_MCI_LAST equ (DRV_RESERVED + 0FFFh) + +endif ;ifndef MMNODRV + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Driver callback support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and +; midiOutOpen() to specify the type of the dwCallback parameter. +CALLBACK_TYPEMASK equ 00070000h ; callback type mask +CALLBACK_NULL equ 00000000h ; no callback +CALLBACK_WINDOW equ 00010000h ; dwCallback is a HWND +CALLBACK_TASK equ 00020000h ; dwCallback is a HTASK +CALLBACK_FUNCTION equ 00030000h ; dwCallback is a FARPROC + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Manufacturer and product IDs +; +; Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS, +; MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures. +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; manufacturer IDs +MM_MICROSOFT equ 1 ; Microsoft Corp. + +; product IDs +MM_MIDI_MAPPER equ 1 ; MIDI Mapper +MM_WAVE_MAPPER equ 2 ; Wave Mapper + +MM_SNDBLST_MIDIOUT equ 3 ; Sound Blaster MIDI output port +MM_SNDBLST_MIDIIN equ 4 ; Sound Blaster MIDI input port +MM_SNDBLST_SYNTH equ 5 ; Sound Blaster internal synthesizer +MM_SNDBLST_WAVEOUT equ 6 ; Sound Blaster waveform output +MM_SNDBLST_WAVEIN equ 7 ; Sound Blaster waveform input + +MM_ADLIB equ 9 ; Ad Lib-compatible synthesizer + +MM_MPU401_MIDIOUT equ 10 ; MPU401-compatible MIDI output port +MM_MPU401_MIDIIN equ 11 ; MPU401-compatible MIDI input port + +MM_PC_JOYSTICK equ 12 ; Joystick adapter + + +ifndef MMNOSOUND +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Sound support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; flag values for wFlags parameter +SND_SYNC equ 0000h ; play synchronously (default) +SND_ASYNC equ 0001h ; play asynchronously +SND_NODEFAULT equ 0002h ; don't use default sound +SND_MEMORY equ 0004h ; lpszSoundName points to a memory file +SND_LOOP equ 0008h ; loop the sound until next sndPlaySound +SND_NOSTOP equ 0010h ; don't stop any currently playing sound + +endif ;ifndef MMNOSOUND + + +ifndef MMNOWAVE +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Waveform audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; waveform audio error return values +WAVERR_BADFORMAT equ (WAVERR_BASE + 0) ; unsupported wave format +WAVERR_STILLPLAYING equ (WAVERR_BASE + 1) ; still something playing +WAVERR_UNPREPARED equ (WAVERR_BASE + 2) ; header not prepared +WAVERR_SYNC equ (WAVERR_BASE + 3) ; device is synchronous +WAVERR_LASTERROR equ (WAVERR_BASE + 3) ; last error in range + +; wave callback messages +WOM_OPEN equ MM_WOM_OPEN +WOM_CLOSE equ MM_WOM_CLOSE +WOM_DONE equ MM_WOM_DONE +WIM_OPEN equ MM_WIM_OPEN +WIM_CLOSE equ MM_WIM_CLOSE +WIM_DATA equ MM_WIM_DATA + +; device ID for wave device mapper +WAVE_MAPPER equ (-1) + +; flags for dwFlags parameter in waveOutOpen() and waveInOpen() +WAVE_FORMAT_QUERY equ 0001h +WAVE_ALLOWSYNC equ 0002h + +; wave data block header +WAVEHDR struc + lpWaveData dd ? ; pointer to locked data buffer + dwWaveBufferLength dd ? ; length of data buffer + dwWaveBytesRecorded dd ? ; used for input only + dwWaveUser dd ? ; for client's use + dwWaveFlags dd ? ; assorted flags (see defines) + dwWaveLoops dd ? ; loop control counter + lpWaveNext dd ? ; reserved for driver + Wavereserved dd ? ; reserved for driver +WAVEHDR ends + +; flags for dwFlags field of WAVEHDR +WHDR_DONE equ 00000001h ; done bit +WHDR_PREPARED equ 00000002h ; set if this header has been prepared +WHDR_BEGINLOOP equ 00000004h ; loop start block +WHDR_ENDLOOP equ 00000008h ; loop end block +WHDR_INQUEUE equ 00000010h ; reserved for driver + +; waveform output device capabilities structure +WAVEOUTCAPS struc + woc_wMid dw ? ; manufacturer ID + woc_wPid dw ? ; product ID + woc_vDriverVersion dw ? ; version of the driver + woc_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + woc_dwFormats dd ? ; formats supported + woc_wChannels dw ? ; number of sources supported + woc_dwSupport dd ? ; functionality supported by driver +WAVEOUTCAPS ends + +; flags for dwSupport field of WAVEOUTCAPS +WAVECAPS_PITCH equ 0001h ; supports pitch control +WAVECAPS_PLAYBACKRATE equ 0002h ; supports playback rate control +WAVECAPS_VOLUME equ 0004h ; supports volume control +WAVECAPS_LRVOLUME equ 0008h ; separate left-right volume control +WAVECAPS_SYNC equ 0010h + +; waveform input device capabilities structure +WAVEINCAPS struc + wic_wMid dw ? ; manufacturer ID + wic_wPid dw ? ; product ID + wic_vDriverVersion dw ? ; version of the driver + wic_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + wic_dwFormats dd ? ; formats supported + wic_wChannels dw ? ; number of channels supported +WAVEINCAPS ends + +; defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS +WAVE_INVALIDFORMAT equ 00000000h ; invalid format +WAVE_FORMAT_1M08 equ 00000001h ; 11.025 kHz, Mono, 8-bit +WAVE_FORMAT_1S08 equ 00000002h ; 11.025 kHz, Stereo, 8-bit +WAVE_FORMAT_1M16 equ 00000004h ; 11.025 kHz, Mono, 16-bit +WAVE_FORMAT_1S16 equ 00000008h ; 11.025 kHz, Stereo, 16-bit +WAVE_FORMAT_2M08 equ 00000010h ; 22.05 kHz, Mono, 8-bit +WAVE_FORMAT_2S08 equ 00000020h ; 22.05 kHz, Stereo, 8-bit +WAVE_FORMAT_2M16 equ 00000040h ; 22.05 kHz, Mono, 16-bit +WAVE_FORMAT_2S16 equ 00000080h ; 22.05 kHz, Stereo, 16-bit +WAVE_FORMAT_4M08 equ 00000100h ; 44.1 kHz, Mono, 8-bit +WAVE_FORMAT_4S08 equ 00000200h ; 44.1 kHz, Stereo, 8-bit +WAVE_FORMAT_4M16 equ 00000400h ; 44.1 kHz, Mono, 16-bit +WAVE_FORMAT_4S16 equ 00000800h ; 44.1 kHz, Stereo, 16-bit + +; general waveform format structure (information common to all formats) +WAVEFORMAT struc + wfmt_wFormatTag dw ? ; format type + wfmt_nChannels dw ? ; number of channels (i.e. mono, stereo, etc.) + wfmt_nSamplesPerSec dd ? ; sample rate + wfmt_nAvgBytesPerSec dd ? ; for buffer estimation + wfmt_nBlockAlign dw ? ; block size of data +WAVEFORMAT ends + +; flags for wFormatTag field of WAVEFORMAT +WAVE_FORMAT_PCM equ 1 + +; specific waveform format structure for PCM data +PCMWAVEFORMAT struc + pcm_wf db (SIZE WAVEFORMAT) dup (?) + pcm_wBitsPerSample dw ? +PCMWAVEFORMAT ends + +endif ;ifndef MMNOWAVE + + +ifndef MMNOMIDI +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MIDI audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MIDI error return values +MIDIERR_UNPREPARED equ (MIDIERR_BASE + 0) ; header not prepared +MIDIERR_STILLPLAYING equ (MIDIERR_BASE + 1) ; still something playing +MIDIERR_NOMAP equ (MIDIERR_BASE + 2) ; no current map +MIDIERR_NOTREADY equ (MIDIERR_BASE + 3) ; hardware is still busy +MIDIERR_NODEVICE equ (MIDIERR_BASE + 4) ; port no longer connected +MIDIERR_INVALIDSETUP equ (MIDIERR_BASE + 5) ; invalid setup +MIDIERR_LASTERROR equ (MIDIERR_BASE + 5) ; last error in range + +; MIDI audio data types +MIDIPATCHSIZE equ 128 + +; MIDI callback messages +MIM_OPEN equ MM_MIM_OPEN +MIM_CLOSE equ MM_MIM_CLOSE +MIM_DATA equ MM_MIM_DATA +MIM_LONGDATA equ MM_MIM_LONGDATA +MIM_ERROR equ MM_MIM_ERROR +MIM_LONGERROR equ MM_MIM_LONGERROR +MOM_OPEN equ MM_MOM_OPEN +MOM_CLOSE equ MM_MOM_CLOSE +MOM_DONE equ MM_MOM_DONE + +; device ID for MIDI mapper +MIDIMAPPER equ (-1) +MIDI_MAPPER equ (-1) + +; flags for wFlags parm of midiOutCachePatches(), +; midiOutCacheDrumPatches() +MIDI_CACHE_ALL equ 1 +MIDI_CACHE_BESTFIT equ 2 +MIDI_CACHE_QUERY equ 3 +MIDI_UNCACHE equ 4 + +; MIDI output device capabilities structure +MIDIOUTCAPS struc + moc_wMid dw ? ; manufacturer ID + moc_wPid dw ? ; product ID + moc_vDriverVersion dw ? ; version of the driver + moc_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + moc_wTechnology dw ? ; type of device + moc_wVoices dw ? ; # of voices (internal synth only) + moc_wNotes dw ? ; max # of notes (internal synth only) + moc_wChannelMask dw ? ; channels used (internal synth only) + moc_dwSupport dd ? ; functionality supported by driver +MIDIOUTCAPS ends + +; flags for wTechnology field of MIDIOUTCAPS structure +MOD_MIDIPORT equ 1 ; output port +MOD_SYNTH equ 2 ; generic internal synth +MOD_SQSYNTH equ 3 ; square wave internal synth +MOD_FMSYNTH equ 4 ; FM internal synth +MOD_MAPPER equ 5 ; MIDI mapper + +; flags for dwSupport field of MIDIOUTCAPS structure +MIDICAPS_VOLUME equ 0001h ; supports volume control +MIDICAPS_LRVOLUME equ 0002h ; separate left-right volume control +MIDICAPS_CACHE equ 0004h + +; MIDI output device capabilities structure +MIDIINCAPS struc + mic_wMid dw ? ; manufacturer ID + mic_wPid dw ? ; product ID + mic_vDriverVersion dw ? ; version of the driver + mic_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) +MIDIINCAPS ends + +; MIDI data block header +MIDIHDR struc + lpMidiData dd ? ; pointer to locked data block + dwMidiBufferLength dd ? ; length of data in data block + dwMidiBytesRecorded dd ? ; used for input only + dwMidiUser dd ? ; for client's use + dwMidiFlags dd ? ; assorted flags (see defines) + lpMidiNext dd ? ; reserved for driver + Midireserved dd ? ; reserved for driver +MIDIHDR ends + +; flags for dwFlags field of MIDIHDR structure +MHDR_DONE equ 00000001h ; done bit +MHDR_PREPARED equ 00000002h ; set if header prepared +MHDR_INQUEUE equ 00000004h ; reserved for driver + +endif ;ifndef MMNOMIDI + + +ifndef MMNOAUX +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Auxiliary audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; device ID for aux device mapper +AUX_MAPPER equ (-1) + +; Auxiliary audio device capabilities structure +AUXCAPS struc + acaps_wMid dw ? ; manufacturer ID + acaps_wPid dw ? ; product ID + acaps_vDriverVersion dw ? ; version of the driver + acaps_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + acaps_wTechnology dw ? ; type of device + acaps_dwSupport dd ? ; functionality supported by driver +AUXCAPS ends + +; flags for wTechnology field in AUXCAPS structure +AUXCAPS_CDAUDIO equ 1 ; audio from internal CD-ROM drive +AUXCAPS_AUXIN equ 2 ; audio from auxiliary input jacks + +; flags for dwSupport field in AUXCAPS structure +AUXCAPS_VOLUME equ 0001h ; supports volume control +AUXCAPS_LRVOLUME equ 0002h ; separate left-right volume control + +endif ;ifndef MMNOAUX + + +ifndef MMNOTIMER +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Timer support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; timer error return values +TIMERR_NOERROR equ (0) ; no error +TIMERR_NOCANDO equ (TIMERR_BASE+1) ; request not completed +TIMERR_STRUCT equ (TIMERR_BASE+33) ; time struct size + +; flags for wFlags parameter of timeSetEvent() function +TIME_ONESHOT equ 0 ; program timer for single event +TIME_PERIODIC equ 1 ; program for continuous periodic event + +; timer device capabilities data structure +TIMECAPS struc + tc_wPeriodMin dw ? ; minimum period supported + tc_wPeriodMax dw ? ; maximum period supported +TIMECAPS ends + +endif ;ifndef MMNOTIMER + + +ifndef MMNOJOY +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Joystick support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; joystick error return values +JOYERR_NOERROR equ (0) ; no error +JOYERR_PARMS equ (JOYERR_BASE+5) ; bad parameters +JOYERR_NOCANDO equ (JOYERR_BASE+6) ; request not completed +JOYERR_UNPLUGGED equ (JOYERR_BASE+7) ; joystick is unplugged + +; constants used with JOYINFO structure and MM_JOY* messages +JOY_BUTTON1 equ 0001h +JOY_BUTTON2 equ 0002h +JOY_BUTTON3 equ 0004h +JOY_BUTTON4 equ 0008h +JOY_BUTTON1CHG equ 0100h +JOY_BUTTON2CHG equ 0200h +JOY_BUTTON3CHG equ 0400h +JOY_BUTTON4CHG equ 0800h + +; joystick ID constants +JOYSTICKID1 equ 0 +JOYSTICKID2 equ 1 + +; joystick device capabilities data structure +JOYCAPS struc + jcaps_wMid dw ? ; manufacturer ID + jcaps_wPid dw ? ; product ID + jcaps_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + jcaps_wXmin dw ? ; minimum x position value + jcaps_wXmax dw ? ; maximum x position value + jcaps_wYmin dw ? ; minimum y position value + jcaps_wYmax dw ? ; maximum y position value + jcaps_wZmin dw ? ; minimum z position value + jcaps_wZmax dw ? ; maximum z position value + jcaps_wNumButtons dw ? ; number of buttons + jcaps_wPeriodMin dw ? ; minimum message period when captured + jcaps_wPeriodMax dw ? ; maximum message period when captured +JOYCAPS ends + +; joystick information data structure +JOYINFO struc + jinfo_wXpos dw ? ; x position + jinfo_wYpos dw ? ; y position + jinfo_wZpos dw ? ; z position + jinfo_wButtons dw ? ; button states +JOYINFO ends + +endif ;ifndef MMNOJOY + +ifndef MMNOMMIO +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Multimedia File I/O support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MMIO error return values +MMIOERR_BASE equ 256 +MMIOERR_FILENOTFOUND equ (MMIOERR_BASE + 1) ; file not found +MMIOERR_OUTOFMEMORY equ (MMIOERR_BASE + 2) ; out of memory +MMIOERR_CANNOTOPEN equ (MMIOERR_BASE + 3) ; cannot open +MMIOERR_CANNOTCLOSE equ (MMIOERR_BASE + 4) ; cannot close +MMIOERR_CANNOTREAD equ (MMIOERR_BASE + 5) ; cannot read +MMIOERR_CANNOTWRITE equ (MMIOERR_BASE + 6) ; cannot write +MMIOERR_CANNOTSEEK equ (MMIOERR_BASE + 7) ; cannot seek +MMIOERR_CANNOTEXPAND equ (MMIOERR_BASE + 8) ; cannot expand file +MMIOERR_CHUNKNOTFOUND equ (MMIOERR_BASE + 9) ; chunk not found +MMIOERR_UNBUFFERED equ (MMIOERR_BASE + 10) ; file is unbuffered + +; MMIO constants +CFSEPCHAR equ '+' ; compound file name separator char. + +; general MMIO information data structure +MMIOINFO struc + ; general fields + mmio_dwFlags dd ? ; general status flags + mmio_fccIOProc dd ? ; pointer to I/O procedure + mmio_pIOProc dd ? ; pointer to I/O procedure + mmio_wErrorRet dw ? ; place for error to be returned + mmio_htask dw ? ; alternate local task + + ; fields maintained by MMIO functions during buffered I/O + mmio_cchBuffer dd ? ; size of I/O buffer (or 0L) + mmio_pchBuffer dd ? ; start of I/O buffer (or NULL) + mmio_pchNext dd ? ; pointer to next byte to read/write + mmio_pchEndRead dd ? ; pointer to last valid byte to read + mmio_pchEndWrite dd ? ; pointer to last byte to write + mmio_lBufOffset dd ? ; disk offset of start of buffer + + ; fields maintained by I/O procedure + mmio_lDiskOffset dd ? ; disk offset of next read or write + mmio_adwInfo dd 3 dup (?) ; data specific to type of MMIOPROC + + ; other fields maintained by MMIO + mmio_dwReserved1 dd ? ; reserved for MMIO use + mmio_dwReserved2 dd ? ; reserved for MMIO use + mmio_hmmio dw ? ; handle to open file +MMIOINFO ends + +; RIFF chunk information data structure +MMCKINFO struc + mmck_ckid dd ? ; chunk ID + mmck_cksize dd ? ; chunk size + mmck_fccType dd ? ; form type or list type + mmck_dwDataOffset dd ? ; offset of data portion of chunk + mmck_dwFlags dd ? ; flags used by MMIO functions +MMCKINFO ends + +; bit field masks +MMIO_RWMODE equ 00000003h ; open file for reading/writing/both +MMIO_SHAREMODE equ 00000070h ; file sharing mode number + +; constants for dwFlags field of MMIOINFO +MMIO_CREATE equ 00001000h ; create new file (or truncate file) +MMIO_PARSE equ 00000100h ; parse new file returning path +MMIO_DELETE equ 00000200h ; create new file (or truncate file) +MMIO_EXIST equ 00004000h ; checks for existence of file +MMIO_ALLOCBUF equ 00010000h ; mmioOpen() should allocate a buffer +MMIO_GETTEMP equ 00020000h ; mmioOpen() should retrieve temp name + +MMIO_DIRTY equ 10000000h ; I/O buffer is dirty + + +; read/write mode numbers (bit field MMIO_RWMODE) +MMIO_READ equ 00000000h ; open file for reading only +MMIO_WRITE equ 00000001h ; open file for writing only +MMIO_READWRITE equ 00000002h ; open file for reading and writing + +; share mode numbers (bit field MMIO_SHAREMODE) +MMIO_COMPAT equ 00000000h ; compatibility mode +MMIO_EXCLUSIVE equ 00000010h ; exclusive-access mode +MMIO_DENYWRITE equ 00000020h ; deny writing to other processes +MMIO_DENYREAD equ 00000030h ; deny reading to other processes +MMIO_DENYNONE equ 00000040h ; deny nothing to other processes + +; various MMIO flags +MMIO_FHOPEN equ 0010h ; mmioClose: keep file handle open +MMIO_EMPTYBUF equ 0010h ; mmioFlush: empty the I/O buffer +MMIO_TOUPPER equ 0010h ; mmioStringToFOURCC: to u-case +MMIO_INSTALLPROC equ 00010000h ; mmioInstallIOProc: install MMIOProc +MMIO_GLOBALPROC equ 10000000h ; mmioInstallIOProc: install globally +MMIO_REMOVEPROC equ 00020000h ; mmioInstallIOProc: remove MMIOProc +MMIO_FINDPROC equ 00040000h ; mmioInstallIOProc: find an MMIOProc +MMIO_FINDCHUNK equ 0010h ; mmioDescend: find a chunk by ID +MMIO_FINDRIFF equ 0020h ; mmioDescend: find a LIST chunk +MMIO_FINDLIST equ 0040h ; mmioDescend: find a RIFF chunk +MMIO_CREATERIFF equ 0020h ; mmioCreateChunk: make a LIST chunk +MMIO_CREATELIST equ 0040h ; mmioCreateChunk: make a RIFF chunk + + +; message numbers for MMIOPROC I/O procedure functions +MMIOM_READ equ MMIO_READ ; read +MMIOM_WRITE equ MMIO_WRITE ; write +MMIOM_SEEK equ 2 ; seek to a new position in file +MMIOM_OPEN equ 3 ; open file +MMIOM_CLOSE equ 4 ; close file +MMIOM_WRITEFLUSH equ 5 ; write and flush +MMIOM_RENAME equ 6 ; rename specified file +MMIOM_USER equ 8000h ; beginning of user-defined messages + +mmioFOURCC MACRO ch0,ch1,ch2,ch3 + mov al,ch0 + mov ah,ch1 + mov dl,ch2 + mov dh,ch3 + ENDM + +; standard four character codes +FOURCC_RIFF equ mmioFOURCC('R', 'I', 'F', 'F') +FOURCC_LIST equ mmioFOURCC('L', 'I', 'S', 'T') + +; four character codes used to identify standard built-in I/O procedures +FOURCC_DOS equ mmioFOURCC('D', 'O', 'S', ' ') +FOURCC_MEM equ mmioFOURCC('M', 'E', 'M', ' ') + +; flags for mmioSeek() +ifndef SEEK_SET +SEEK_SET equ 0 ; seek to an absolute position +SEEK_CUR equ 1 ; seek relative to current position +SEEK_END equ 2 ; seek relative to end of file +endif ;ifndef SEEK_SET + +; other constants +MMIO_DEFAULTBUFFER equ 8192 ; default buffer size + +endif ;ifndef MMNOMMIO + +ifndef MMNOMCI +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MCI support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MCI error return values +MCIERR_INVALID_DEVICE_ID equ (MCIERR_BASE + 1) +MCIERR_UNRECOGNIZED_KEYWORD equ (MCIERR_BASE + 3) +MCIERR_UNRECOGNIZED_COMMAND equ (MCIERR_BASE + 5) +MCIERR_HARDWARE equ (MCIERR_BASE + 6) +MCIERR_INVALID_DEVICE_NAME equ (MCIERR_BASE + 7) +MCIERR_OUT_OF_MEMORY equ (MCIERR_BASE + 8) +MCIERR_DEVICE_OPEN equ (MCIERR_BASE + 9) +MCIERR_CANNOT_LOAD_DRIVER equ (MCIERR_BASE + 10) +MCIERR_MISSING_COMMAND_STRING equ (MCIERR_BASE + 11) +MCIERR_PARAM_OVERFLOW equ (MCIERR_BASE + 12) +MCIERR_MISSING_STRING_ARGUMENT equ (MCIERR_BASE + 13) +MCIERR_BAD_INTEGER equ (MCIERR_BASE + 14) +MCIERR_PARSER_INTERNAL equ (MCIERR_BASE + 15) +MCIERR_DRIVER_INTERNAL equ (MCIERR_BASE + 16) +MCIERR_MISSING_PARAMETER equ (MCIERR_BASE + 17) +MCIERR_UNSUPPORTED_FUNCTION equ (MCIERR_BASE + 18) +MCIERR_FILE_NOT_FOUND equ (MCIERR_BASE + 19) +MCIERR_DEVICE_NOT_READY equ (MCIERR_BASE + 20) +MCIERR_INTERNAL equ (MCIERR_BASE + 21) +MCIERR_DRIVER equ (MCIERR_BASE + 22) +MCIERR_CANNOT_USE_ALL equ (MCIERR_BASE + 23) +MCIERR_MULTIPLE equ (MCIERR_BASE + 24) +MCIERR_EXTENSION_NOT_FOUND equ (MCIERR_BASE + 25) +MCIERR_OUTOFRANGE equ (MCIERR_BASE + 26) +MCIERR_FLAGS_NOT_COMPATIBLE equ (MCIERR_BASE + 28) +MCIERR_FILE_NOT_SAVED equ (MCIERR_BASE + 30) +MCIERR_DEVICE_TYPE_REQUIRED equ (MCIERR_BASE + 31) +MCIERR_DEVICE_LOCKED equ (MCIERR_BASE + 32) +MCIERR_DUPLICATE_ALIAS equ (MCIERR_BASE + 33) +MCIERR_BAD_CONSTANT equ (MCIERR_BASE + 34) +MCIERR_MUST_USE_SHAREABLE equ (MCIERR_BASE + 35) +MCIERR_MISSING_DEVICE_NAME equ (MCIERR_BASE + 36) +MCIERR_BAD_TIME_FORMAT equ (MCIERR_BASE + 37) +MCIERR_NO_CLOSING_QUOTE equ (MCIERR_BASE + 38) +MCIERR_DUPLICATE_FLAGS equ (MCIERR_BASE + 39) +MCIERR_INVALID_FILE equ (MCIERR_BASE + 40) +MCIERR_NULL_PARAMETER_BLOCK equ (MCIERR_BASE + 41) +MCIERR_UNNAMED_RESOURCE equ (MCIERR_BASE + 42) +MCIERR_NEW_REQUIRES_ALIAS equ (MCIERR_BASE + 43) +MCIERR_NOTIFY_ON_AUTO_OPEN equ (MCIERR_BASE + 44) +MCIERR_NO_ELEMENT_ALLOWED equ (MCIERR_BASE + 45) +MCIERR_NONAPPLICABLE_FUNCTION equ (MCIERR_BASE + 46) +MCIERR_ILLEGAL_FOR_AUTO_OPEN equ (MCIERR_BASE + 47) +MCIERR_FILENAME_REQUIRED equ (MCIERR_BASE + 48) +MCIERR_EXTRA_CHARACTERS equ (MCIERR_BASE + 49) +MCIERR_DEVICE_NOT_INSTALLED equ (MCIERR_BASE + 50) +MCIERR_GET_CD equ (MCIERR_BASE + 51) +MCIERR_SET_CD equ (MCIERR_BASE + 52) +MCIERR_SET_DRIVE equ (MCIERR_BASE + 53) +MCIERR_DEVICE_LENGTH equ (MCIERR_BASE + 54) +MCIERR_DEVICE_ORD_LENGTH equ (MCIERR_BASE + 55) +MCIERR_NO_INTEGER equ (MCIERR_BASE + 56) + +MCIERR_WAVE_OUTPUTSINUSE equ (MCIERR_BASE + 64) +MCIERR_WAVE_SETOUTPUTINUSE equ (MCIERR_BASE + 65) +MCIERR_WAVE_INPUTSINUSE equ (MCIERR_BASE + 66) +MCIERR_WAVE_SETINPUTINUSE equ (MCIERR_BASE + 67) +MCIERR_WAVE_OUTPUTUNSPECIFIED equ (MCIERR_BASE + 68) +MCIERR_WAVE_INPUTUNSPECIFIED equ (MCIERR_BASE + 69) +MCIERR_WAVE_OUTPUTSUNSUITABLE equ (MCIERR_BASE + 70) +MCIERR_WAVE_SETOUTPUTUNSUITABLE equ (MCIERR_BASE + 71) +MCIERR_WAVE_INPUTSUNSUITABLE equ (MCIERR_BASE + 72) +MCIERR_WAVE_SETINPUTUNSUITABLE equ (MCIERR_BASE + 73) + +MCIERR_SEQ_DIV_INCOMPATIBLE equ (MCIERR_BASE + 80) +MCIERR_SEQ_PORT_INUSE equ (MCIERR_BASE + 81) +MCIERR_SEQ_PORT_NONEXISTENT equ (MCIERR_BASE + 82) +MCIERR_SEQ_PORT_MAPNODEVICE equ (MCIERR_BASE + 83) +MCIERR_SEQ_PORT_MISCERROR equ (MCIERR_BASE + 84) +MCIERR_SEQ_TIMER equ (MCIERR_BASE + 85) +MCIERR_SEQ_PORTUNSPECIFIED equ (MCIERR_BASE + 86) +MCIERR_SEQ_NOMIDIPRESENT equ (MCIERR_BASE + 87) + +MCIERR_NO_WINDOW equ (MCIERR_BASE + 90) +MCIERR_CREATEWINDOW equ (MCIERR_BASE + 91) +MCIERR_FILE_READ equ (MCIERR_BASE + 92) +MCIERR_FILE_WRITE equ (MCIERR_BASE + 93) + +; all custom device driver errors must be >= than this value +MCIERR_CUSTOM_DRIVER_BASE equ (MCIERR_BASE + 256) + +; MCI command message identifiers +MCI_OPEN equ 0803h +MCI_CLOSE equ 0804h +MCI_ESCAPE equ 0805h +MCI_PLAY equ 0806h +MCI_SEEK equ 0807h +MCI_STOP equ 0808h +MCI_PAUSE equ 0809h +MCI_INFO equ 080Ah +MCI_GETDEVCAPS equ 080Bh +MCI_SPIN equ 080Ch +MCI_SET equ 080Dh +MCI_STEP equ 080Eh +MCI_RECORD equ 080Fh +MCI_SYSINFO equ 0810h +MCI_BREAK equ 0811h +MCI_SOUND equ 0812h +MCI_SAVE equ 0813h +MCI_STATUS equ 0814h +MCI_CUE equ 0830h +MCI_REALIZE equ 0840h +MCI_WINDOW equ 0841h +MCI_PUT equ 0842h +MCI_WHERE equ 0843h +MCI_FREEZE equ 0844h +MCI_UNFREEZE equ 0845h +MCI_LOAD equ 0850h +MCI_CUT equ 0851h +MCI_COPY equ 0852h +MCI_PASTE equ 0853h +MCI_UPDATE equ 0854h +MCI_RESUME equ 0855h +MCI_DELETE equ 0856h + +; all custom MCI command messages must be >= than this value +MCI_USER_MESSAGES equ (400h + DRV_MCI_FIRST) + + +; device ID for "all devices" +MCI_ALL_DEVICE_ID equ 0FFFFh + +; constants for predefined MCI device types +MCI_DEVTYPE_VCR equ (MCI_STRING_OFFSET + 1) +MCI_DEVTYPE_VIDEODISC equ (MCI_STRING_OFFSET + 2) +MCI_DEVTYPE_OVERLAY equ (MCI_STRING_OFFSET + 3) +MCI_DEVTYPE_CD_AUDIO equ (MCI_STRING_OFFSET + 4) +MCI_DEVTYPE_DAT equ (MCI_STRING_OFFSET + 5) +MCI_DEVTYPE_SCANNER equ (MCI_STRING_OFFSET + 6) +MCI_DEVTYPE_ANIMATION equ (MCI_STRING_OFFSET + 7) +MCI_DEVTYPE_DIGITAL_VIDEO equ (MCI_STRING_OFFSET + 8) +MCI_DEVTYPE_OTHER equ (MCI_STRING_OFFSET + 9) +MCI_DEVTYPE_WAVEFORM_AUDIO equ (MCI_STRING_OFFSET + 10) +MCI_DEVTYPE_SEQUENCER equ (MCI_STRING_OFFSET + 11) + +MCI_DEVTYPE_FIRST equ MCI_DEVTYPE_VCR +MCI_DEVTYPE_LAST equ MCI_DEVTYPE_SEQUENCER + +; return values for 'status mode' command +MCI_MODE_NOT_READY equ (MCI_STRING_OFFSET + 12) +MCI_MODE_STOP equ (MCI_STRING_OFFSET + 13) +MCI_MODE_PLAY equ (MCI_STRING_OFFSET + 14) +MCI_MODE_RECORD equ (MCI_STRING_OFFSET + 15) +MCI_MODE_SEEK equ (MCI_STRING_OFFSET + 16) +MCI_MODE_PAUSE equ (MCI_STRING_OFFSET + 17) +MCI_MODE_OPEN equ (MCI_STRING_OFFSET + 18) + +; constants used in 'set time format' and 'status time format' commands +MCI_FORMAT_MILLISECONDS equ 0 +MCI_FORMAT_HMS equ 1 +MCI_FORMAT_MSF equ 2 +MCI_FORMAT_FRAMES equ 3 +MCI_FORMAT_SMPTE_24 equ 4 +MCI_FORMAT_SMPTE_25 equ 5 +MCI_FORMAT_SMPTE_30 equ 6 +MCI_FORMAT_SMPTE_30DROP equ 7 +MCI_FORMAT_BYTES equ 8 +MCI_FORMAT_SAMPLES equ 9 +MCI_FORMAT_TMSF equ 10 + +; flags for wParam of MM_MCINOTIFY message +MCI_NOTIFY_SUCCESSFUL equ 0001h +MCI_NOTIFY_SUPERSEDED equ 0002h +MCI_NOTIFY_ABORTED equ 0004h +MCI_NOTIFY_FAILURE equ 0008h + + +; common flags for dwFlags parameter of MCI command messages +MCI_NOTIFY equ 00000001h +MCI_WAIT equ 00000002h +MCI_FROM equ 00000004h +MCI_TO equ 00000008h +MCI_TRACK equ 00000010h + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_OPEN_SHAREABLE equ 00000100h +MCI_OPEN_ELEMENT equ 00000200h +MCI_OPEN_ALIAS equ 00000400h +MCI_OPEN_ELEMENT_ID equ 00000800h +MCI_OPEN_TYPE_ID equ 00001000h +MCI_OPEN_TYPE equ 00002000h + +; flags for dwFlags parameter of MCI_SEEK command message +MCI_SEEK_TO_START equ 00000100h +MCI_SEEK_TO_END equ 00000200h + +; flags for dwFlags parameter of MCI_STATUS command message +MCI_STATUS_ITEM equ 00000100h +MCI_STATUS_START equ 00000200h + +; flags for dwItem field of the MCI_STATUS_PARMS parameter block +MCI_STATUS_LENGTH equ 00000001h +MCI_STATUS_POSITION equ 00000002h +MCI_STATUS_NUMBER_OF_TRACKS equ 00000003h +MCI_STATUS_MODE equ 00000004h +MCI_STATUS_MEDIA_PRESENT equ 00000005h +MCI_STATUS_TIME_FORMAT equ 00000006h +MCI_STATUS_READY equ 00000007h +MCI_STATUS_CURRENT_TRACK equ 00000008h + +; flags for dwFlags parameter of MCI_INFO command message +MCI_INFO_PRODUCT equ 00000100h +MCI_INFO_FILE equ 00000200h + +; flags for dwFlags parameter of MCI_GETDEVCAPS command message +MCI_GETDEVCAPS_ITEM equ 00000100h + +; flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block +MCI_GETDEVCAPS_CAN_RECORD equ 00000001h +MCI_GETDEVCAPS_HAS_AUDIO equ 00000002h +MCI_GETDEVCAPS_HAS_VIDEO equ 00000003h +MCI_GETDEVCAPS_DEVICE_TYPE equ 00000004h +MCI_GETDEVCAPS_USES_FILES equ 00000005h +MCI_GETDEVCAPS_COMPOUND_DEVICE equ 00000006h +MCI_GETDEVCAPS_CAN_EJECT equ 00000007h +MCI_GETDEVCAPS_CAN_PLAY equ 00000008h +MCI_GETDEVCAPS_CAN_SAVE equ 00000009h + +; flags for dwFlags parameter of MCI_SYSINFO command message +MCI_SYSINFO_QUANTITY equ 00000100h +MCI_SYSINFO_OPEN equ 00000200h +MCI_SYSINFO_NAME equ 00000400h +MCI_SYSINFO_INSTALLNAME equ 00000800h + +; flags for dwFlags parameter of MCI_SET command message +MCI_SET_DOOR_OPEN equ 00000100h +MCI_SET_DOOR_CLOSED equ 00000200h +MCI_SET_TIME_FORMAT equ 00000400h +MCI_SET_AUDIO equ 00000800h +MCI_SET_VIDEO equ 00001000h +MCI_SET_ON equ 00002000h +MCI_SET_OFF equ 00004000h + +; flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS +MCI_SET_AUDIO_ALL equ 00000000h +MCI_SET_AUDIO_LEFT equ 00000001h +MCI_SET_AUDIO_RIGHT equ 00000002h + +; flags for dwFlags parameter of MCI_BREAK command message +MCI_BREAK_KEY equ 00000100h +MCI_BREAK_HWND equ 00000200h +MCI_BREAK_OFF equ 00000400h + +; flags for dwFlags parameter of MCI_RECORD command message +MCI_RECORD_INSERT equ 00000100h +MCI_RECORD_OVERWRITE equ 00000200h + +; flags for dwFlags parameter of MCI_SOUND command message +MCI_SOUND_NAME equ 00000100h + +; flags for dwFlags parameter of MCI_SAVE command message +MCI_SAVE_FILE equ 00000100h + +; flags for dwFlags parameter of MCI_LOAD command message +MCI_LOAD_FILE equ 00000100h + +; generic parameter block for MCI command messages with no special parameters +MCI_GENERIC_PARMS struc + mcigen_dwCallback dd ? +MCI_GENERIC_PARMS ends + +; parameter block for MCI_OPEN command message +MCI_OPEN_PARMS struc + mciopen_dwCallback dd ? + mciopen_wDeviceID dw ? + mciopen_wReserved0 dw ? + mciopen_lpstrDeviceType dd ? + mciopen_lpstrElementName dd ? + mciopen_lpstrAlias dd ? +MCI_OPEN_PARMS ends + +; parameter block for MCI_PLAY command message +MCI_PLAY_PARMS struc + mciplay_dwCallback dd ? + mciplay_dwFrom dd ? + mciplay_dwTo dd ? +MCI_PLAY_PARMS ends + +; parameter block for MCI_SEEK command message +MCI_SEEK_PARMS struc + mciseek_dwCallback dd ? + mciseek_dwTo dd ? +MCI_SEEK_PARMS ends + +; parameter block for MCI_STATUS command message +MCI_STATUS_PARMS struc + mcistat_dwCallback dd ? + mcistat_dwReturn dd ? + mcistat_dwItem dd ? + mcistat_dwTrack dd ? +MCI_STATUS_PARMS ends + +; parameter block for MCI_INFO command message +MCI_INFO_PARMS struc + mciinfo_dwCallback dd ? + mciinfo_lpstrReturn dd ? + mciinfo_dwRetSize dd ? +MCI_INFO_PARMS ends + +; parameter block for MCI_GETDEVCAPS command message +MCI_GETDEVCAPS_PARMS struc + mcigdc_dwCallback dd ? + mcigdc_dwReturn dd ? + mcigdc_dwItem dd ? +MCI_GETDEVCAPS_PARMS ends + +; parameter block for MCI_SYSINFO command message +MCI_SYSINFO_PARMS struc + mcisi_dwCallback dd ? + mcisi_lpstrReturn dd ? + mcisi_dwRetSize dd ? + mcisi_dwNumber dd ? + mcisi_wDeviceType dw ? + mcisi_wReserved0 dw ? +MCI_SYSINFO_PARMS ends + +; parameter block for MCI_SET command message +MCI_SET_PARMS struc + mciset_dwCallback dd ? + mciset_dwTimeFormat dd ? + mciset_dwAudio dd ? +MCI_SET_PARMS ends + +; parameter block for MCI_BREAK command message +MCI_BREAK_PARMS struc + mcibreak_dwCallback dd ? + mcibreak_nVirtKey dw ? + mcibreak_wReserved0 dw ? + mcibreak_hwndBreak dw ? + mcibreak_wReserved1 dw ? +MCI_BREAK_PARMS ends + +; parameter block for MCI_SOUND command message +MCI_SOUND_PARMS struc + mcisnd_dwCallback dd ? + mcisnd_lpstrSoundName dd ? +MCI_SOUND_PARMS ends + +; parameter block for MCI_SAVE command message +MCI_SAVE_PARMS struc + mcisave_dwCallback dd ? + mcisave_lpfilename dd ? +MCI_SAVE_PARMS ends + +; parameter block for MCI_LOAD command message +MCI_LOAD_PARMS struc + mciload_dwCallback dd ? + mciload_lpfilename dd ? +MCI_LOAD_PARMS ends + +; parameter block for MCI_RECORD command message +MCI_RECORD_PARMS struc + mcirec_dwCallback dd ? + mcirec_dwFrom dd ? + mcirec_dwTo dd ? +MCI_RECORD_PARMS ends + + +; +; MCI extensions for videodisc devices +; + +; flag for dwReturn field of MCI_STATUS_PARMS +; MCI_STATUS command, (dwItem == MCI_STATUS_MODE) +MCI_VD_MODE_PARK equ (MCI_VD_OFFSET + 1) + +; flag for dwReturn field of MCI_STATUS_PARMS +; MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) +MCI_VD_MEDIA_CLV equ (MCI_VD_OFFSET + 2) +MCI_VD_MEDIA_CAV equ (MCI_VD_OFFSET + 3) +MCI_VD_MEDIA_OTHER equ (MCI_VD_OFFSET + 4) + +MCI_VD_FORMAT_TRACK equ 4001h + +; flags for dwFlags parameter of MCI_PLAY command message +MCI_VD_PLAY_REVERSE equ 00010000h +MCI_VD_PLAY_FAST equ 00020000h +MCI_VD_PLAY_SPEED equ 00040000h +MCI_VD_PLAY_SCAN equ 00080000h +MCI_VD_PLAY_SLOW equ 00100000h + +; flag for dwFlags parameter of MCI_SEEK command message +MCI_VD_SEEK_REVERSE equ 00010000h + +; flags for dwItem field of MCI_STATUS_PARMS parameter block +MCI_VD_STATUS_SPEED equ 00004002h +MCI_VD_STATUS_FORWARD equ 00004003h +MCI_VD_STATUS_MEDIA_TYPE equ 00004004h +MCI_VD_STATUS_SIDE equ 00004005h +MCI_VD_STATUS_DISC_SIZE equ 00004006h + +; flags for dwFlags parameter of MCI_GETDEVCAPS command message +MCI_VD_GETDEVCAPS_CLV equ 00010000h +MCI_VD_GETDEVCAPS_CAV equ 00020000h + +MCI_VD_SPIN_UP equ 0001h +MCI_VD_SPIN_DOWN equ 0002h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_VD_GETDEVCAPS_CAN_REVERSE equ 00004002h +MCI_VD_GETDEVCAPS_FAST_RATE equ 00004003h +MCI_VD_GETDEVCAPS_SLOW_RATE equ 00004004h +MCI_VD_GETDEVCAPS_NORMAL_RATE equ 00004005h + +; flags for the dwFlags parameter of MCI_STEP command message +MCI_VD_STEP_FRAMES equ 00010000h +MCI_VD_STEP_REVERSE equ 00020000h + +; flag for the MCI_ESCAPE command message +MCI_VD_ESCAPE_STRING equ 00000100h + +; parameter block for MCI_PLAY command message +MCI_VD_PLAY_PARMS struc + mcivdplay_dwCallback dd ? + mcivdplay_dwFrom dd ? + mcivdplay_dwTo dd ? + mcivdplay_dwSpeed dd ? +MCI_VD_PLAY_PARMS ends + +; parameter block for MCI_STEP command message +MCI_VD_STEP_PARMS struc + mcivdstep_dwCallback dd ? + mcivdstep_dwFrames dd ? +MCI_VD_STEP_PARMS ends + +; parameter block for MCI_ESCAPE command message +MCI_VD_ESCAPE_PARMS struc + mcivcesc_dwCallback dd ? + mcivcesc_lpstrCommand dd ? +MCI_VD_ESCAPE_PARMS ends + + +; +; MCI extensions for waveform audio devices +; + +; flags for the dwFlags parameter of MCI_OPEN command message +MCI_WAVE_OPEN_BUFFER equ 00010000h + +; flags for the dwFlags parameter of MCI_SET command message +MCI_WAVE_SET_FORMATTAG equ 00010000h +MCI_WAVE_SET_CHANNELS equ 00020000h +MCI_WAVE_SET_SAMPLESPERSEC equ 00040000h +MCI_WAVE_SET_AVGBYTESPERSEC equ 00080000h +MCI_WAVE_SET_BLOCKALIGN equ 00100000h +MCI_WAVE_SET_BITSPERSAMPLE equ 00200000h + +; flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages +MCI_WAVE_INPUT equ 00400000h +MCI_WAVE_OUTPUT equ 00800000h + +; flags for the dwItem field of MCI_STATUS_PARMS parameter block +MCI_WAVE_STATUS_FORMATTAG equ 00004001h +MCI_WAVE_STATUS_CHANNELS equ 00004002h +MCI_WAVE_STATUS_SAMPLESPERSEC equ 00004003h +MCI_WAVE_STATUS_AVGBYTESPERSEC equ 00004004h +MCI_WAVE_STATUS_BLOCKALIGN equ 00004005h +MCI_WAVE_STATUS_BITSPERSAMPLE equ 00004006h +MCI_WAVE_STATUS_LEVEL equ 00004007h + +; flags for the dwFlags parameter of MCI_SET command message +MCI_WAVE_SET_ANYINPUT equ 04000000h +MCI_WAVE_SET_ANYOUTPUT equ 08000000h + +; flags for the dwFlags parameter of MCI_GETDEVCAPS command message +MCI_WAVE_GETDEVCAPS_INPUTS equ 00004001h +MCI_WAVE_GETDEVCAPS_OUTPUTS equ 00004002h + +; parameter block for MCI_OPEN command message +MCI_WAVE_OPEN_PARMS struc + mciwopen_dwCallback dd ? + mciwopen_wDeviceID dw ? + mciwopen_wReserved0 dw ? + mciwopen_lpstrDeviceType dd ? + mciwopen_lpstrElementName dd ? + mciwopen_lpstrAlias dd ? + mciwopen_dwBufferSeconds dd ? +MCI_WAVE_OPEN_PARMS ends + +; parameter block for MCI_DELETE command message +MCI_WAVE_DELETE_PARMS struc + mciwdel_dwCallback dd ? + mciwdel_dwFrom dd ? + mciwdel_dwTo dd ? +MCI_WAVE_DELETE_PARMS ends + +; parameter block for MCI_SET command message +MCI_WAVE_SET_PARMS struc + mciwset_dwCallback dd ? + mciwset_dwTimeFormat dd ? + mciwset_dwAudio dd ? + mciwset_wInput dw ? + mciwset_wReserved0 dw ? + mciwset_wOutput dw ? + mciwset_wReserved1 dw ? + mciwset_wFormatTag dw ? + mciwset_wReserved2 dw ? + mciwset_nChannels dw ? + mciwset_wReserved3 dw ? + mciwset_nSamplesPerSec dw ? + mciwset_nAvgBytesPerSec dw ? + mciwset_nBlockAlign dw ? + mciwset_wReserved4 dw ? + mciwset_wBitsPerSample dw ? + mciwset_wReserved5 dw ? +MCI_WAVE_SET_PARMS ends + + +; +; MCI extensions for MIDI sequencer devices +; + +; flags for the dwReturn field of MCI_STATUS_PARMS parameter block +; MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) +MCI_SEQ_DIV_PPQN equ (0 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_24 equ (1 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_25 equ (2 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_30DROP equ (3 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_30 equ (4 + MCI_SEQ_OFFSET) + +; flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block +; MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) +MCI_SEQ_FORMAT_SONGPTR equ 4001h +MCI_SEQ_FILE equ 4002h +MCI_SEQ_MIDI equ 4003h +MCI_SEQ_SMPTE equ 4004h +MCI_SEQ_NONE equ 65533 + +; flags for the dwItem field of MCI_STATUS_PARMS parameter block +MCI_SEQ_STATUS_TEMPO equ 00004002h +MCI_SEQ_STATUS_PORT equ 00004003h +MCI_SEQ_STATUS_SLAVE equ 00004007h +MCI_SEQ_STATUS_MASTER equ 00004008h +MCI_SEQ_STATUS_OFFSET equ 00004009h +MCI_SEQ_STATUS_DIVTYPE equ 0000400Ah + +; flags for the dwFlags parameter of MCI_SET command message +MCI_SEQ_SET_TEMPO equ 00010000h +MCI_SEQ_SET_PORT equ 00020000h +MCI_SEQ_SET_SLAVE equ 00040000h +MCI_SEQ_SET_MASTER equ 00080000h +MCI_SEQ_SET_OFFSET equ 01000000h + +; parameter block for MCI_SET command message +MCI_SEQ_SET_PARMS struc + mcisset_dwCallback dd ? + mcisset_dwTimeFormat dd ? + mcisset_dwAudio dd ? + mcisset_dwTempo dd ? + mcisset_dwPort dd ? + mcisset_dwSlave dd ? + mcisset_dwMaster dd ? + mcisset_dwOffset dd ? +MCI_SEQ_SET_PARMS ends + + +; +; MCI extensions for animation devices +; + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_ANIM_OPEN_WS equ 00010000h +MCI_ANIM_OPEN_PARENT equ 00020000h +MCI_ANIM_OPEN_NOSTATIC equ 00040000h + +; flags for dwFlags parameter of MCI_PLAY command message +MCI_ANIM_PLAY_SPEED equ 00010000h +MCI_ANIM_PLAY_REVERSE equ 00020000h +MCI_ANIM_PLAY_FAST equ 00040000h +MCI_ANIM_PLAY_SLOW equ 00080000h +MCI_ANIM_PLAY_SCAN equ 00100000h + +; flags for dwFlags parameter of MCI_STEP command message +MCI_ANIM_STEP_REVERSE equ 00010000h +MCI_ANIM_STEP_FRAMES equ 00020000h + +; flags for dwItem field of MCI_STATUS_PARMS parameter block +MCI_ANIM_STATUS_SPEED equ 00004001h +MCI_ANIM_STATUS_FORWARD equ 00004002h +MCI_ANIM_STATUS_HWND equ 00004003h +MCI_ANIM_STATUS_HPAL equ 00004004h +MCI_ANIM_STATUS_STRETCH equ 00004005h + +; flags for the dwFlags parameter of MCI_INFO command message +MCI_ANIM_INFO_TEXT equ 00010000h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_ANIM_GETDEVCAPS_CAN_REVERSE equ 00004001h +MCI_ANIM_GETDEVCAPS_FAST_RATE equ 00004002h +MCI_ANIM_GETDEVCAPS_SLOW_RATE equ 00004003h +MCI_ANIM_GETDEVCAPS_NORMAL_RATE equ 00004004h +MCI_ANIM_GETDEVCAPS_PALETTES equ 00004006h +MCI_ANIM_GETDEVCAPS_CAN_STRETCH equ 00004007h +MCI_ANIM_GETDEVCAPS_MAX_WINDOWS equ 00004008h + +; flags for the MCI_REALIZE command message +MCI_ANIM_REALIZE_NORM equ 00010000h +MCI_ANIM_REALIZE_BKGD equ 00020000h + +; flags for dwFlags parameter of MCI_WINDOW command message +MCI_ANIM_WINDOW_HWND equ 00010000h +MCI_ANIM_WINDOW_STATE equ 00040000h +MCI_ANIM_WINDOW_TEXT equ 00080000h +MCI_ANIM_WINDOW_ENABLE_STRETCH equ 00100000h +MCI_ANIM_WINDOW_DISABLE_STRETCH equ 00200000h + +; flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block +; MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) +MCI_ANIM_WINDOW_DEFAULT equ 00000000h + +; flags for dwFlags parameter of MCI_PUT command message +MCI_ANIM_RECT equ 00010000h +MCI_ANIM_PUT_SOURCE equ 00020000h +MCI_ANIM_PUT_DESTINATION equ 00040000h + +; flags for dwFlags parameter of MCI_WHERE command message +MCI_ANIM_WHERE_SOURCE equ 00020000h +MCI_ANIM_WHERE_DESTINATION equ 00040000h + +; flags for dwFlags parameter of MCI_UPDATE command message +MCI_ANIM_UPDATE_HDC equ 00020000h + +; parameter block for MCI_OPEN command message +MCI_ANIM_OPEN_PARMS struc + mciaopen_dwCallback dd ? + mciaopen_wDeviceID dw ? + mciaopen_wReserved0 dw ? + mciaopen_lpstrDeviceType dd ? + mciaopen_lpstrElementName dd ? + mciaopen_lpstrAlias dd ? + mciaopen_dwStyle dd ? + mciaopen_hWndParent dw ? + mciaopen_wReserved1 dw ? +MCI_ANIM_OPEN_PARMS ends + +; parameter block for MCI_PLAY command message +MCI_ANIM_PLAY_PARMS struc + mciaplay_dwCallback dd ? + mciaplay_dwFrom dd ? + mciaplay_dwTo dd ? + mciaplay_dwSpeed dd ? +MCI_ANIM_PLAY_PARMS ends + +; parameter block for MCI_STEP command message +MCI_ANIM_STEP_PARMS struc + mciastep_dwCallback dd ? + mciastep_dwFrames dd ? +MCI_ANIM_STEP_PARMS ends + +; parameter block for MCI_WINDOW command message +MCI_ANIM_WINDOW_PARMS struc + mciawin_dwCallback dd ? + mciawin_hWnd dw ? + mciawin_wReserved1 dw ? + mciawin_nCmdShow dw ? + mciawin_wReserved2 dw ? + mciawin_lpstrText dd ? +MCI_ANIM_WINDOW_PARMS ends + +; parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages +MCI_ANIM_RECT_PARMS struc + mciarect_dwCallback dd ? +ifdef MCI_USE_OFFEXT + mciarect_ptOffset db (SIZE POINT) dup (?) + mciarect_ptExtent db (SIZE POINT) dup (?) +else ;ifdef MCI_USE_OFFEXT + mciarect_rc db (SIZE RECT) dup (?) +endif ;ifdef MCI_USE_OFFEXT +MCI_ANIM_RECT_PARMS ends + +; parameter block for MCI_UPDATE PARMS +MCI_ANIM_UPDATE_PARMS struc + mciaupd_dwCallback dd ? + mciaupd_rc db (SIZE RECT) dup (?) + mciaupd_hDC dw ? +MCI_ANIM_UPDATE_PARMS ends + + +; +; MCI extensions for video overlay devices +; + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_OVLY_OPEN_WS equ 00010000h +MCI_OVLY_OPEN_PARENT equ 00020000h + +; flags for dwFlags parameter of MCI_STATUS command message +MCI_OVLY_STATUS_HWND equ 00004001h +MCI_OVLY_STATUS_STRETCH equ 00004002h + +; flags for dwFlags parameter of MCI_INFO command message +MCI_OVLY_INFO_TEXT equ 00010000h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_OVLY_GETDEVCAPS_CAN_STRETCH equ 00004001h +MCI_OVLY_GETDEVCAPS_CAN_FREEZE equ 00004002h +MCI_OVLY_GETDEVCAPS_MAX_WINDOWS equ 00004003h + +; flags for dwFlags parameter of MCI_WINDOW command message +MCI_OVLY_WINDOW_HWND equ 00010000h +MCI_OVLY_WINDOW_STATE equ 00040000h +MCI_OVLY_WINDOW_TEXT equ 00080000h +MCI_OVLY_WINDOW_ENABLE_STRETCH equ 00100000h +MCI_OVLY_WINDOW_DISABLE_STRETCH equ 00200000h + +; flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block +MCI_OVLY_WINDOW_DEFAULT equ 00000000h + +; flags for dwFlags parameter of MCI_PUT command message +MCI_OVLY_RECT equ 00010000h +MCI_OVLY_PUT_SOURCE equ 00020000h +MCI_OVLY_PUT_DESTINATION equ 00040000h +MCI_OVLY_PUT_FRAME equ 00080000h +MCI_OVLY_PUT_VIDEO equ 00100000h + +; flags for dwFlags parameter of MCI_WHERE command message +MCI_OVLY_WHERE_SOURCE equ 00020000h +MCI_OVLY_WHERE_DESTINATION equ 00040000h +MCI_OVLY_WHERE_FRAME equ 00080000h +MCI_OVLY_WHERE_VIDEO equ 00100000h + +; parameter block for MCI_OPEN command message +MCI_OVLY_OPEN_PARMS struc + mcioopen_dwCallback dd ? + mcioopen_wDeviceID dw ? + mcioopen_wReserved0 dw ? + mcioopen_lpstrDeviceType dd ? + mcioopen_lpstrElementName dd ? + mcioopen_lpstrAlias dd ? + mcioopen_dwStyle dd ? + mcioopen_hWndParent dw ? + mcioopen_wReserved1 dw ? +MCI_OVLY_OPEN_PARMS ends + +; parameter block for MCI_WINDOW command message +MCI_OVLY_WINDOW_PARMS struc + mciowin_dwCallback dd ? + mciowin_hWnd dw ? + mciowin_wReserved1 dw ? + mciowin_nCmdShow dw ? + mciowin_wReserved2 dw ? + mciowin_lpstrText dd ? +MCI_OVLY_WINDOW_PARMS ends + +; parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages +MCI_OVLY_RECT_PARMS struc + mciorect_dwCallback dd ? +ifdef MCI_USE_OFFEXT + mciorect_ptOffset db (SIZE POINT) dup (?) + mciorect_ptExtent db (SIZE POINT) dup (?) +else ;ifdef MCI_USE_OFFEXT + mciorect_rc db (SIZE RECT) dup (?) +endif ;ifdef MCI_USE_OFFEXT +MCI_OVLY_RECT_PARMS ends + +; parameter block for MCI_SAVE command message +MCI_OVLY_SAVE_PARMS struc + mciosave_dwCallback dd ? + mciosave_lpfilename dd ? + mciosave_rc db (SIZE RECT) dup (?) +MCI_OVLY_SAVE_PARMS ends + +; parameter block for MCI_LOAD command message +MCI_OVLY_LOAD_PARMS struc + mcioload_dwCallback dd ? + mcioload_lpfilename dd ? + mcioload_rc db (SIZE RECT) dup (?) +MCI_OVLY_LOAD_PARMS ends + +endif ;ifndef MMNOMCI + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; DISPLAY Driver extensions +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +ifndef C1_TRANSPARENT + CAPS1 equ 94 ; other caps + C1_TRANSPARENT equ 0001h ; new raster cap + NEWTRANSPARENT equ 3 ; use with SetBkMode() + + QUERYROPSUPPORT equ 40 ; use to determine ROP support +endif ;ifndef C1_TRANSPARENT + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; DIB Driver extensions +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +SELECTDIB equ 41 ; DIB.DRV select dib escape +DIBINDEX MACRO a + mov ax,a + mov dx,10ffh + ENDM + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; ScreenSaver support +; +; The current application will receive a syscommand of SC_SCREENSAVE just +; before the screen saver is invoked. If the app wishes to prevent a +; screen save, return non-zero value, otherwise call DefWindowProc(). +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +ifndef SC_SCREENSAVE + + SC_SCREENSAVE equ 0F140h + +endif ;ifndef SC_SCREENSAVE diff --git a/private/oleauto/tools/win16/hdos/c800/include/new.h b/private/oleauto/tools/win16/hdos/c800/include/new.h new file mode 100644 index 000000000..408e34a0b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/new.h @@ -0,0 +1,48 @@ +/*** +*new.h - declarations and definitions for C++ memory allocation functions +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for C++ memory allocation functions. +* +****/ + +#ifndef _INC_NEW + +#ifdef __cplusplus + + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +typedef int (__cdecl * _PNH)( size_t ); +typedef int (__cdecl * _PNHH)( unsigned long, size_t ); +typedef int (__cdecl * _PNHB)( __segment, size_t ); + +/* function prototypes */ + +_PNH __cdecl _set_new_handler( _PNH ); +_PNH __cdecl _set_nnew_handler( _PNH ); +_PNH __cdecl _set_fnew_handler( _PNH ); +_PNHH __cdecl _set_hnew_handler( _PNHH ); +_PNHB __cdecl _set_bnew_handler( _PNHB ); + +#else + +/* handler functions only supported in C++, emit appropriate error */ +#error Functions declared in new.h can only be used in C++ source + +#endif + +#define _INC_NEW +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ole.h b/private/oleauto/tools/win16/hdos/c800/include/ole.h new file mode 100644 index 000000000..37bcf9cad --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ole.h @@ -0,0 +1,504 @@ +/*****************************************************************************\ +* * +* ole.h - Object Linking and Embedding functions, types, and definitions* +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved.* +* * +\*****************************************************************************/ + +#ifndef _INC_OLE +#define _INC_OLE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef WINAPI /* If not included with 3.1 headers... */ +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +#ifdef STRICT +#define OLE_LPCSTR LPCSTR +#define OLE_CONST const +#else /* STRICT */ +#define OLE_LPCSTR LPSTR +#define OLE_CONST +#endif /* !STRICT */ + + +/* Object types */ +#define OT_LINK 1L +#define OT_EMBEDDED 2L +#define OT_STATIC 3L + +/* activate verbs */ +#define OLEVERB_PRIMARY 0 + +/* target device info structure */ +typedef struct _OLETARGETDEVICE +{ + UINT otdDeviceNameOffset; + UINT otdDriverNameOffset; + UINT otdPortNameOffset; + UINT otdExtDevmodeOffset; + UINT otdExtDevmodeSize; + UINT otdEnvironmentOffset; + UINT otdEnvironmentSize; + BYTE otdData[1]; +} OLETARGETDEVICE; +typedef OLETARGETDEVICE FAR* LPOLETARGETDEVICE; + +/* flags used in some methods */ +#define OF_SET 0x0001 +#define OF_GET 0x0002 +#define OF_HANDLER 0x0004 + +/* return codes for OLE functions */ +typedef enum +{ + OLE_OK, /* 0 Function operated correctly */ + + OLE_WAIT_FOR_RELEASE, /* 1 Command has been initiated, client */ + /* must wait for release. keep dispatching */ + /* messages till OLE_RELESE in callback */ + + OLE_BUSY, /* 2 Tried to execute a method while another */ + /* method is in progress. */ + + OLE_ERROR_PROTECT_ONLY, /* 3 Ole APIs are called in real mode */ + OLE_ERROR_MEMORY, /* 4 Could not alloc or lock memory */ + OLE_ERROR_STREAM, /* 5 (OLESTREAM) stream error */ + OLE_ERROR_STATIC, /* 6 Non static object expected */ + OLE_ERROR_BLANK, /* 7 Critical data missing */ + OLE_ERROR_DRAW, /* 8 Error while drawing */ + OLE_ERROR_METAFILE, /* 9 Invalid metafile */ + OLE_ERROR_ABORT, /* 10 Client chose to abort metafile drawing */ + OLE_ERROR_CLIPBOARD, /* 11 Failed to get/set clipboard data */ + OLE_ERROR_FORMAT, /* 12 Requested format is not available */ + OLE_ERROR_OBJECT, /* 13 Not a valid object */ + OLE_ERROR_OPTION, /* 14 Invalid option(link update / render) */ + OLE_ERROR_PROTOCOL, /* 15 Invalid protocol */ + OLE_ERROR_ADDRESS, /* 16 One of the pointers is invalid */ + OLE_ERROR_NOT_EQUAL, /* 17 Objects are not equal */ + OLE_ERROR_HANDLE, /* 18 Invalid handle encountered */ + OLE_ERROR_GENERIC, /* 19 Some general error */ + OLE_ERROR_CLASS, /* 20 Invalid class */ + OLE_ERROR_SYNTAX, /* 21 Command syntax is invalid */ + OLE_ERROR_DATATYPE, /* 22 Data format is not supported */ + OLE_ERROR_PALETTE, /* 23 Invalid color palette */ + OLE_ERROR_NOT_LINK, /* 24 Not a linked object */ + OLE_ERROR_NOT_EMPTY, /* 25 Client doc contains objects. */ + OLE_ERROR_SIZE, /* 26 Incorrect buffer size passed to the api */ + /* that places some string in caller's */ + /* buffer */ + + OLE_ERROR_DRIVE, /* 27 Drive letter in doc name is invalid */ + OLE_ERROR_NETWORK, /* 28 Failed to establish connection to a */ + /* network share on which the document */ + /* is located */ + + OLE_ERROR_NAME, /* 29 Invalid name(doc name, object name), */ + /* etc.. passed to the APIs */ + + OLE_ERROR_TEMPLATE, /* 30 Server failed to load template */ + OLE_ERROR_NEW, /* 31 Server failed to create new doc */ + OLE_ERROR_EDIT, /* 32 Server failed to create embedded */ + /* instance */ + OLE_ERROR_OPEN, /* 33 Server failed to open document, */ + /* possible invalid link */ + + OLE_ERROR_NOT_OPEN, /* 34 Object is not open for editing */ + OLE_ERROR_LAUNCH, /* 35 Failed to launch server */ + OLE_ERROR_COMM, /* 36 Failed to communicate with server */ + OLE_ERROR_TERMINATE, /* 37 Error in termination */ + OLE_ERROR_COMMAND, /* 38 Error in execute */ + OLE_ERROR_SHOW, /* 39 Error in show */ + OLE_ERROR_DOVERB, /* 40 Error in sending do verb, or invalid */ + /* verb */ + OLE_ERROR_ADVISE_NATIVE, /* 41 Item could be missing */ + OLE_ERROR_ADVISE_PICT, /* 42 Item could be missing or server doesn't */ + /* this format. */ + + OLE_ERROR_ADVISE_RENAME, /* 43 Server doesn't support rename */ + OLE_ERROR_POKE_NATIVE, /* 44 Failure of poking native data to server */ + OLE_ERROR_REQUEST_NATIVE, /* 45 Server failed to render native data */ + OLE_ERROR_REQUEST_PICT, /* 46 Server failed to render presentation */ + /* data */ + OLE_ERROR_SERVER_BLOCKED, /* 47 Trying to block a blocked server or */ + /* trying to revoke a blocked server */ + /* or document */ + + OLE_ERROR_REGISTRATION, /* 48 Server is not registered in regestation */ + /* data base */ + OLE_ERROR_ALREADY_REGISTERED,/*49 Trying to register same doc multiple */ + /* times */ + OLE_ERROR_TASK, /* 50 Server or client task is invalid */ + OLE_ERROR_OUTOFDATE, /* 51 Object is out of date */ + OLE_ERROR_CANT_UPDATE_CLIENT,/* 52 Embed doc's client doesn't accept */ + /* updates */ + OLE_ERROR_UPDATE, /* 53 erorr while trying to update */ + OLE_ERROR_SETDATA_FORMAT, /* 54 Server app doesn't understand the */ + /* format given to its SetData method */ + OLE_ERROR_STATIC_FROM_OTHER_OS,/* 55 trying to load a static object created */ + /* on another Operating System */ + + /* Following are warnings */ + OLE_WARN_DELETE_DATA = 1000 /* Caller must delete the data when he is */ + /* done with it. */ +} OLESTATUS; + + + +/* Codes for CallBack events */ +typedef enum +{ + OLE_CHANGED, /* 0 */ + OLE_SAVED, /* 1 */ + OLE_CLOSED, /* 2 */ + OLE_RENAMED, /* 3 */ + OLE_QUERY_PAINT, /* 4 Interruptible paint support */ + OLE_RELEASE, /* 5 Object is released(asynchronous operation */ + /* is completed) */ + OLE_QUERY_RETRY /* 6 Query for retry when server sends busy ACK */ +} OLE_NOTIFICATION; + +typedef enum +{ + OLE_NONE, /* 0 no method active */ + OLE_DELETE, /* 1 object delete */ + OLE_LNKPASTE, /* 2 PasteLink(auto reconnect) */ + OLE_EMBPASTE, /* 3 paste(and update) */ + OLE_SHOW, /* 4 Show */ + OLE_RUN, /* 5 Run */ + OLE_ACTIVATE, /* 6 Activate */ + OLE_UPDATE, /* 7 Update */ + OLE_CLOSE, /* 8 Close */ + OLE_RECONNECT, /* 9 Reconnect */ + OLE_SETUPDATEOPTIONS, /* 10 setting update options */ + OLE_SERVERUNLAUNCH, /* 11 server is being unlaunched */ + OLE_LOADFROMSTREAM, /* 12 LoadFromStream(auto reconnect) */ + OLE_SETDATA, /* 13 OleSetData */ + OLE_REQUESTDATA, /* 14 OleRequestData */ + OLE_OTHER, /* 15 other misc async operations */ + OLE_CREATE, /* 16 create */ + OLE_CREATEFROMTEMPLATE, /* 17 CreatefromTemplate */ + OLE_CREATELINKFROMFILE, /* 18 CreateLinkFromFile */ + OLE_COPYFROMLNK, /* 19 CopyFromLink(auto reconnect) */ + OLE_CREATEFROMFILE, /* 20 CreateFromFile */ + OLE_CREATEINVISIBLE /* 21 CreateInvisible */ +} OLE_RELEASE_METHOD; + +/* rendering options */ +typedef enum +{ + olerender_none, + olerender_draw, + olerender_format +} OLEOPT_RENDER; + +/* standard clipboard format type */ +typedef WORD OLECLIPFORMAT; + +/* Link update options */ +typedef enum +{ + oleupdate_always, + oleupdate_onsave, +#ifndef OLE_INTERNAL + oleupdate_oncall +#else + oleupdate_oncall, + oleupdate_onclose +#endif /* OLE_INTERNAL */ +} OLEOPT_UPDATE; + +typedef HANDLE HOBJECT; +typedef LONG LHSERVER; +typedef LONG LHCLIENTDOC; +typedef LONG LHSERVERDOC; + +typedef struct _OLEOBJECT FAR* LPOLEOBJECT; +typedef struct _OLESTREAM FAR* LPOLESTREAM; +typedef struct _OLECLIENT FAR* LPOLECLIENT; + + +#ifndef OLE_INTERNAL +/* object method table definitions. */ +typedef struct _OLEOBJECTVTBL +{ + void FAR* (CALLBACK* QueryProtocol) (LPOLEOBJECT, OLE_LPCSTR); + OLESTATUS (CALLBACK* Release) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Show) (LPOLEOBJECT, BOOL); + OLESTATUS (CALLBACK* DoVerb) (LPOLEOBJECT, UINT, BOOL, BOOL); + OLESTATUS (CALLBACK* GetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*); + OLESTATUS (CALLBACK* SetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE); + OLESTATUS (CALLBACK* SetTargetDevice) (LPOLEOBJECT, HGLOBAL); + OLESTATUS (CALLBACK* SetBounds) (LPOLEOBJECT, OLE_CONST RECT FAR*); + OLECLIPFORMAT (CALLBACK* EnumFormats) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (CALLBACK* SetColorScheme) (LPOLEOBJECT, OLE_CONST LOGPALETTE FAR*); + /* Server has to implement only the above methods. */ + +#ifndef SERVERONLY + /* Extra methods required for client. */ + OLESTATUS (CALLBACK* Delete) (LPOLEOBJECT); + OLESTATUS (CALLBACK* SetHostNames) (LPOLEOBJECT, OLE_LPCSTR, OLE_LPCSTR); + OLESTATUS (CALLBACK* SaveToStream) (LPOLEOBJECT, LPOLESTREAM); + OLESTATUS (CALLBACK* Clone) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* CopyFromLink) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* Equal) (LPOLEOBJECT, LPOLEOBJECT); + OLESTATUS (CALLBACK* CopyToClipboard) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Draw) (LPOLEOBJECT, HDC, OLE_CONST RECT FAR*, OLE_CONST RECT FAR*, HDC); + OLESTATUS (CALLBACK* Activate) (LPOLEOBJECT, UINT, BOOL, BOOL, HWND, OLE_CONST RECT FAR*); + OLESTATUS (CALLBACK* Execute) (LPOLEOBJECT, HGLOBAL, UINT); + OLESTATUS (CALLBACK* Close) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Update) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Reconnect) (LPOLEOBJECT); + + OLESTATUS (CALLBACK* ObjectConvert) (LPOLEOBJECT, OLE_LPCSTR, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* GetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE FAR*); + OLESTATUS (CALLBACK* SetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE); + + OLESTATUS (CALLBACK* Rename) (LPOLEOBJECT, OLE_LPCSTR); + OLESTATUS (CALLBACK* QueryName) (LPOLEOBJECT, LPSTR, UINT FAR*); + + OLESTATUS (CALLBACK* QueryType) (LPOLEOBJECT, LONG FAR*); + OLESTATUS (CALLBACK* QueryBounds) (LPOLEOBJECT, RECT FAR*); + OLESTATUS (CALLBACK* QuerySize) (LPOLEOBJECT, DWORD FAR*); + OLESTATUS (CALLBACK* QueryOpen) (LPOLEOBJECT); + OLESTATUS (CALLBACK* QueryOutOfDate) (LPOLEOBJECT); + + OLESTATUS (CALLBACK* QueryReleaseStatus) (LPOLEOBJECT); + OLESTATUS (CALLBACK* QueryReleaseError) (LPOLEOBJECT); + OLE_RELEASE_METHOD (CALLBACK* QueryReleaseMethod)(LPOLEOBJECT); + + OLESTATUS (CALLBACK* RequestData) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (CALLBACK* ObjectLong) (LPOLEOBJECT, UINT, LONG FAR*); + +/* This method is internal only */ + OLESTATUS (CALLBACK* ChangeData) (LPOLEOBJECT, HANDLE, LPOLECLIENT, BOOL); +#endif /* !SERVERONLY */ +} OLEOBJECTVTBL; +typedef OLEOBJECTVTBL FAR* LPOLEOBJECTVTBL; + +typedef struct _OLEOBJECT +{ + LPOLEOBJECTVTBL lpvtbl; +} OLEOBJECT; +#endif /* !OLE_NTERNAL */ + +/* ole client definitions */ +typedef struct _OLECLIENTVTBL +{ + int (CALLBACK* CallBack)(LPOLECLIENT, OLE_NOTIFICATION, LPOLEOBJECT); +} OLECLIENTVTBL; + +typedef OLECLIENTVTBL FAR* LPOLECLIENTVTBL; + +typedef struct _OLECLIENT +{ + LPOLECLIENTVTBL lpvtbl; +} OLECLIENT; + +/* Stream definitions */ +typedef struct _OLESTREAMVTBL +{ + DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD); + DWORD (CALLBACK* Put)(LPOLESTREAM, OLE_CONST void FAR*, DWORD); +} OLESTREAMVTBL; +typedef OLESTREAMVTBL FAR* LPOLESTREAMVTBL; + +typedef struct _OLESTREAM +{ + LPOLESTREAMVTBL lpstbl; +} OLESTREAM; + +/* Public Function Prototypes */ +OLESTATUS WINAPI OleDelete(LPOLEOBJECT); +OLESTATUS WINAPI OleRelease(LPOLEOBJECT); +OLESTATUS WINAPI OleSaveToStream(LPOLEOBJECT, LPOLESTREAM); +OLESTATUS WINAPI OleEqual(LPOLEOBJECT, LPOLEOBJECT ); +OLESTATUS WINAPI OleCopyToClipboard(LPOLEOBJECT); +OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT, LPCSTR, LPCSTR); +OLESTATUS WINAPI OleSetTargetDevice(LPOLEOBJECT, HGLOBAL); +OLESTATUS WINAPI OleSetBounds(LPOLEOBJECT, const RECT FAR*); +OLESTATUS WINAPI OleSetColorScheme(LPOLEOBJECT, const LOGPALETTE FAR*); +OLESTATUS WINAPI OleQueryBounds(LPOLEOBJECT, RECT FAR*); +OLESTATUS WINAPI OleQuerySize(LPOLEOBJECT, DWORD FAR*); +OLESTATUS WINAPI OleDraw(LPOLEOBJECT, HDC, const RECT FAR*, const RECT FAR*, HDC); +OLESTATUS WINAPI OleQueryOpen(LPOLEOBJECT); +OLESTATUS WINAPI OleActivate(LPOLEOBJECT, UINT, BOOL, BOOL, HWND, const RECT FAR*); +OLESTATUS WINAPI OleExecute(LPOLEOBJECT, HGLOBAL, UINT); +OLESTATUS WINAPI OleClose(LPOLEOBJECT); +OLESTATUS WINAPI OleUpdate(LPOLEOBJECT); +OLESTATUS WINAPI OleReconnect(LPOLEOBJECT); +OLESTATUS WINAPI OleGetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE FAR*); +OLESTATUS WINAPI OleSetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE); +void FAR* WINAPI OleQueryProtocol(LPOLEOBJECT, LPCSTR); + +/* Routines related to asynchronous operations. */ +OLESTATUS WINAPI OleQueryReleaseStatus(LPOLEOBJECT); +OLESTATUS WINAPI OleQueryReleaseError(LPOLEOBJECT); +OLE_RELEASE_METHOD WINAPI OleQueryReleaseMethod(LPOLEOBJECT); + +OLESTATUS WINAPI OleQueryType(LPOLEOBJECT, LONG FAR*); + +/* LOWORD is major version, HIWORD is minor version */ +DWORD WINAPI OleQueryClientVersion(void); +DWORD WINAPI OleQueryServerVersion(void); + +/* Converting to format (as in clipboard): */ +OLECLIPFORMAT WINAPI OleEnumFormats(LPOLEOBJECT, OLECLIPFORMAT); +OLESTATUS WINAPI OleGetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*); +OLESTATUS WINAPI OleSetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE); +OLESTATUS WINAPI OleQueryOutOfDate(LPOLEOBJECT); +OLESTATUS WINAPI OleRequestData(LPOLEOBJECT, OLECLIPFORMAT); + +/* Query apis for creation from clipboard */ +OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT); + +/* Object creation functions */ +OLESTATUS WINAPI OleCreateFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateLinkFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateLinkFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleLoadFromStream(LPOLESTREAM, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleCreate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateInvisible(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT, BOOL); +OLESTATUS WINAPI OleCreateFromTemplate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleClone(LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleCopyFromLink(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleObjectConvert(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleRename(LPOLEOBJECT, LPCSTR); +OLESTATUS WINAPI OleQueryName(LPOLEOBJECT, LPSTR, UINT FAR*); +OLESTATUS WINAPI OleRevokeObject(LPOLECLIENT); +BOOL WINAPI OleIsDcMeta(HDC); + +/* client document API */ +OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR, LPCSTR, LONG, LHCLIENTDOC FAR*); +OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC, LPCSTR); +OLESTATUS WINAPI OleRevertClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleEnumObjects(LHCLIENTDOC, LPOLEOBJECT FAR*); + +/* server usage definitions */ +typedef enum { + OLE_SERVER_MULTI, /* multiple instances */ + OLE_SERVER_SINGLE /* single instance(multiple document) */ +} OLE_SERVER_USE; + +/* Server API */ +typedef struct _OLESERVER FAR* LPOLESERVER; + +OLESTATUS WINAPI OleRegisterServer(LPCSTR, LPOLESERVER, LHSERVER FAR*, HINSTANCE, OLE_SERVER_USE); +OLESTATUS WINAPI OleRevokeServer(LHSERVER); +OLESTATUS WINAPI OleBlockServer(LHSERVER); +OLESTATUS WINAPI OleUnblockServer(LHSERVER, BOOL FAR*); + +/* APIs to keep server open */ +OLESTATUS WINAPI OleLockServer(LPOLEOBJECT, LHSERVER FAR*); +OLESTATUS WINAPI OleUnlockServer(LHSERVER); + +/* Server document API */ + +typedef struct _OLESERVERDOC FAR* LPOLESERVERDOC; + +OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER, LPCSTR, LPOLESERVERDOC, LHSERVERDOC FAR*); +OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC); +OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC, LPCSTR); +OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC); +OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC); + +typedef struct _OLESERVERVTBL +{ + OLESTATUS (CALLBACK* Open) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* document name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Create)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* CreateFromTemplate)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* lp template name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Edit) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Exit) (LPOLESERVER); + /* lp OLESERVER */ + + OLESTATUS (CALLBACK* Release) (LPOLESERVER); + /* lp OLESERVER */ + + OLESTATUS (CALLBACK* Execute)(LPOLESERVER, HGLOBAL); + /* lp OLESERVER */ + /* handle to command strings */ +} OLESERVERVTBL; +typedef OLESERVERVTBL FAR* LPOLESERVERVTBL; + +typedef struct _OLESERVER +{ + LPOLESERVERVTBL lpvtbl; +} OLESERVER; + +typedef struct _OLESERVERDOCVTBL +{ + OLESTATUS (CALLBACK* Save) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* Close) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* SetHostNames)(LPOLESERVERDOC, OLE_LPCSTR, OLE_LPCSTR); + OLESTATUS (CALLBACK* SetDocDimensions)(LPOLESERVERDOC, OLE_CONST RECT FAR*); + OLESTATUS (CALLBACK* GetObject) (LPOLESERVERDOC, OLE_LPCSTR, LPOLEOBJECT FAR*, LPOLECLIENT); + OLESTATUS (CALLBACK* Release) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* SetColorScheme)(LPOLESERVERDOC, OLE_CONST LOGPALETTE FAR*); + OLESTATUS (CALLBACK* Execute) (LPOLESERVERDOC, HGLOBAL); +} OLESERVERDOCVTBL; +typedef OLESERVERDOCVTBL FAR* LPOLESERVERDOCVTBL; + +typedef struct _OLESERVERDOC +{ + LPOLESERVERDOCVTBL lpvtbl; +} OLESERVERDOC; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_OLE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ostream.h b/private/oleauto/tools/win16/hdos/c800/include/ostream.h new file mode 100644 index 000000000..799885115 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ostream.h @@ -0,0 +1,129 @@ +/*** +*ostream.h - definitions/declarations for the ostream class +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ostream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_OSTREAM +#define _INC_OSTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef long streamoff, streampos; + +class ostream : virtual public ios { + +public: + ostream(streambuf*); + virtual ~ostream(); + + ostream& flush(); + int opfx(); + void osfx(); + +inline ostream& operator<<(ostream& (*f)(ostream&)); +inline ostream& operator<<(ios& (*f)(ios&)); + ostream& operator<<(const char _HFAR_ *); +inline ostream& operator<<(const unsigned char _HFAR_ *); +inline ostream& operator<<(const signed char _HFAR_ *); +inline ostream& operator<<(char); + ostream& operator<<(unsigned char); +inline ostream& operator<<(signed char); + ostream& operator<<(short); + ostream& operator<<(unsigned short); + ostream& operator<<(int); + ostream& operator<<(unsigned int); + ostream& operator<<(long); + ostream& operator<<(unsigned long); +inline ostream& operator<<(float); + ostream& operator<<(double); + ostream& operator<<(long double); + ostream& operator<<(const void _HFAR_ *); + ostream& operator<<(streambuf*); +inline ostream& put(char); + ostream& put(unsigned char); +inline ostream& put(signed char); + ostream& write(const char _HFAR_ *,int); +inline ostream& write(const unsigned char _HFAR_ *,int); +inline ostream& write(const signed char _HFAR_ *,int); + ostream& seekp(streampos); + ostream& seekp(streamoff,ios::seek_dir); + streampos tellp(); + +protected: + ostream(); + ostream(const ostream&); // treat as private + ostream& operator=(streambuf*); // treat as private + ostream& operator=(const ostream& _os) {return operator=(_os.rdbuf()); } + int do_opfx(int); // not used + void do_osfx(); // not used + +private: + ostream(ios&); + ostream& writepad(const char _HFAR_ *, const char _HFAR_ *); + int x_floatused; +}; + +inline ostream& ostream::operator<<(ostream& (*f)(ostream&)) { (*f)(*this); return *this; } +inline ostream& ostream::operator<<(ios& (*f)(ios& )) { (*f)(*this); return *this; } + +inline ostream& ostream::operator<<(char c) { return operator<<((unsigned char) c); } +inline ostream& ostream::operator<<(signed char c) { return operator<<((unsigned char) c); } + +inline ostream& ostream::operator<<(const unsigned char _HFAR_ * s) { return operator<<((const char _HFAR_ *) s); } +inline ostream& ostream::operator<<(const signed char _HFAR_ * s) { return operator<<((const char _HFAR_ *) s); } + +inline ostream& ostream::operator<<(float f) { x_floatused = 1; return operator<<((double) f); } + +inline ostream& ostream::put(char c) { return put((unsigned char) c); } +inline ostream& ostream::put(signed char c) { return put((unsigned char) c); } + +inline ostream& ostream::write(const unsigned char _HFAR_ * s, int n) { return write((char _HFAR_ *) s, n); } +inline ostream& ostream::write(const signed char _HFAR_ * s, int n) { return write((char _HFAR_ *) s, n); } + + +class ostream_withassign : public ostream { + public: + ostream_withassign(); + ostream_withassign(streambuf* _is); + ~ostream_withassign(); + ostream& operator=(const ostream& _os) { return ostream::operator=(_os.rdbuf()); } + ostream& operator=(streambuf* _sb) { return ostream::operator=(_sb); } +}; + +#ifndef _WINDLL +extern ostream_withassign cout; +extern ostream_withassign cerr; +extern ostream_withassign clog; +#endif + +inline ostream& flush(ostream& _outs) { return _outs.flush(); } +inline ostream& endl(ostream& _outs) { return _outs << '\n' << flush; } +inline ostream& ends(ostream& _outs) { return _outs << char('\0'); } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/penwin.h b/private/oleauto/tools/win16/hdos/c800/include/penwin.h new file mode 100644 index 000000000..fbe2d112e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/penwin.h @@ -0,0 +1,818 @@ +/*****************************************************************************\ +* * +* penwin.h - Pen Windows functions, types, and definitions * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWS +#include <windows.h> /* <windows.h> must be pre-included */ +#endif /* _INC_WINDOWS */ + +#ifndef _INC_PENWIN /* prevent multiple includes */ +#define _INC_PENWIN + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/****** General Pen Windows Definitions *************************************/ + +typedef int REC; +typedef LONG SYV; +typedef SYV FAR *LPSYV; +typedef HANDLE HREC; +typedef int CL; +typedef LONG ALC; +typedef UINT HKP; +typedef int (CALLBACK * LPDF)(int, LPVOID, LPVOID, int, DWORD, DWORD); + +#define BITPENUP 0x8000 +#define FPenUpX(x) (((x) & BITPENUP)!=0) + +/* Default pen cursor to indicate writing, points northwest */ +#define IDC_PEN MAKEINTRESOURCE(32631) + +/* alternate select cursor: upsidedown standard arrow, points southeast */ +#define IDC_ALTSELECT MAKEINTRESOURCE(32501) + +#define RC_WDEFAULT (0xFFFF) +#define RC_LDEFAULT (0xFFFFFFFFL) +#define RC_WDEFAULTFLAGS (0x8000) +#define RC_LDEFAULTFLAGS (0x80000000L) + +/* HIWORD(SYV) defines and detection macros */ + +#define SYVHI_SPECIAL 0 +#define FIsSpecial(syv) (HIWORD((syv))==SYVHI_SPECIAL) +#define SYVHI_ANSI 1 +#define FIsAnsi(syv) (HIWORD((syv))==SYVHI_ANSI) +#define SYVHI_GESTURE 2 +#define FIsGesture(syv) (HIWORD((syv))==SYVHI_GESTURE) +#define SYVHI_KANJI 3 +#define FIsKanji(syv) (HIWORD((syv))==SYVHI_KANJI) +#define SYVHI_SHAPE 4 +#define FIsShape(syv) (HIWORD((syv))==SYVHI_SHAPE) +#define SYVHI_UNICODE 5 +#define FIsUniCode(syv) (HIWORD((syv))==SYVHI_UNICODE) +#define SYVHI_VKEY 6 +#define FIsVKey(syv) (HIWORD((syv))==SYVHI_VKEY) + +/* Macros to convert between SYV and ANSI */ + +#define ChSyvToAnsi(syv) ((BYTE) (LOBYTE(LOWORD((syv))))) +#define SyvCharacterToSymbol(c) ((LONG)(unsigned char)(c) | 0x00010000) +#define SyvKanjiToSymbol(c) ((LONG)(WORD)(c) | 0x00030000) + +/* SYV values with special meanings to Pen Windows */ + +#define SYV_NULL 0x00000000L +#define SYV_UNKNOWN 0x00000001L +#define SYV_EMPTY 0x00000003L +#define SYV_BEGINOR 0x00000010L +#define SYV_ENDOR 0x00000011L +#define SYV_OR 0x00000012L +#define SYV_SOFTNEWLINE 0x00000020L +#define SYV_SPACENULL SyvCharacterToSymbol('\0') + +/* SYV values for gestures (map into UNICODE space) */ + +#define SYV_KKCONVERT 0x0002FFD4L +#define SYV_CLEAR 0x0002FFD5L +#define SYV_EXTENDSELECT 0x0002FFD8L +#define SYV_UNDO 0x0002FFD9L +#define SYV_COPY 0x0002FFDAL +#define SYV_CUT 0x0002FFDBL +#define SYV_PASTE 0x0002FFDCL +#define SYV_CLEARWORD 0x0002FFDDL +#define SYV_USER 0x0002FFDEL /* ;Reserved */ +#define SYV_CORRECT 0x0002FFDFL + +#define SYV_BACKSPACE 0x00020008L +#define SYV_TAB 0x00020009L +#define SYV_RETURN 0x0002000DL +#define SYV_SPACE 0x00020020L + +#define FIsStdGesture(syv) \ + ((syv) == SYV_CLEAR \ + || (syv) == SYV_EXTENDSELECT\ + || (syv) == SYV_UNDO \ + || (syv) == SYV_COPY \ + || (syv) == SYV_CUT \ + || (syv) == SYV_PASTE \ + || (syv) == SYV_CLEARWORD \ + || (syv) == SYV_KKCONVERT \ + || (syv) == SYV_USER \ + || (syv) == SYV_CORRECT) + +#define FIsAnsiGesture(syv) \ + ((syv) == SYV_BACKSPACE \ + || (syv) == SYV_TAB \ + || (syv) == SYV_RETURN \ + || (syv) == SYV_SPACE) + +/* Application specific gestures, Circle a-z and Circle A-Z */ + +#define SYV_APPGESTUREMASK 0x00020000L +#define SYV_CIRCLEUPA 0x000224B6L +#define SYV_CIRCLEUPZ 0x000224CFL +#define SYV_CIRCLELOA 0x000224D0L +#define SYV_CIRCLELOZ 0x000224E9L + +/* Gesture Macros */ + +#define FIsLoAppGesture(syv) (syv >= SYV_CIRCLELOA && syv <= SYV_CIRCLELOZ) +#define FIsUpAppGesture(syv) (syv >= SYV_CIRCLEUPA && syv <= SYV_CIRCLEUPZ) +#define FIsAppGesture(syv) (syv>=SYV_CIRCLEUPA && syv<=SYV_CIRCLELOZ) + +#define SyvAppGestureFromLoAnsi(ansi) ((DWORD)(BYTE)ansi- 'a' + SYV_CIRCLELOA) +#define SyvAppGestureFromUpAnsi(ansi) ((DWORD)(BYTE)ansi- 'A' + SYV_CIRCLEUPA) +#define AnsiFromSyvAppGesture(syv) ChSyvToAnsi( \ + syv-(FIsUpAppGesture(syv)? SYV_CIRCLEUPA-(SYV)'A': SYV_CIRCLELOA-(SYV)'a')) + +/* SYV definitions for shapes */ + +#define SYV_SHAPELINE 0x00040001L +#define SYV_SHAPEELLIPSE 0x00040002L +#define SYV_SHAPERECT 0x00040003L +#define SYV_SHAPEMIN SYV_SHAPELINE +#define SYV_SHAPEMAX SYV_SHAPERECT + +/****** Recognition Error Codes *********************************************/ + +#define REC_OEM (-1024) +#define REC_LANGUAGE (-48) +#define REC_GUIDE (-47) +#define REC_PARAMERROR (-46) +#define REC_INVALIDREF (-45) +#define REC_RECTEXCLUDE (-44) +#define REC_RECTBOUND (-43) +#define REC_PCM (-42) +#define REC_RESULTMODE (-41) +#define REC_HWND (-40) +#define REC_ALC (-39) +#define REC_ERRORLEVEL (-38) +#define REC_CLVERIFY (-37) +#define REC_DICT (-36) +#define REC_HREC (-35) +#define REC_BADEVENTREF (-33) +#define REC_NOCOLLECTION (-32) + +#define REC_DEBUG (-32) + +#define REC_POINTEREVENT (-31) +#define REC_BADHPENDATA (-9) +#define REC_OOM (-8) +#define REC_NOINPUT (-7) +#define REC_NOTABLET (-6) +#define REC_BUSY (-5) +#define REC_BUFFERTOOSMALL (-4) +#define REC_ABORT (-3) + +#define REC_OVERFLOW (-1) + +#define REC_OK 0 +#define REC_TERMBOUND 1 +#define REC_TERMEX 2 +#define REC_TERMPENUP 3 +#define REC_TERMRANGE 4 +#define REC_TERMTIMEOUT 5 +#define REC_DONE 6 +#define REC_TERMOEM 512 + +/****** Pen Driver Structures and Entry points ******************************/ + +typedef struct tagOEMPENINFO + { + UINT wPdt; + UINT wValueMax; + UINT wDistinct; + } + OEMPENINFO, FAR *LPOEMPENINFO; + +#define PDT_NULL 0 +#define PDT_PRESSURE 1 +#define PDT_HEIGHT 2 +#define PDT_ANGLEXY 3 +#define PDT_ANGLEZ 4 +#define PDT_BARRELROTATION 5 +#define PDT_OEMSPECIFIC 16 + +#define MAXOEMDATAWORDS 6 + +typedef struct tagPENPACKET + { + UINT wTabletX; + UINT wTabletY; + UINT wPDK; + UINT rgwOemData[MAXOEMDATAWORDS]; + } + PENPACKET, FAR *LPPENPACKET; + +typedef BOOL (CALLBACK * LPFNRAWHOOK)(LPPENPACKET); + +typedef struct tagPENINFO + { + UINT cxRawWidth; + UINT cyRawHeight; + UINT wDistinctWidth; + UINT wDistinctHeight; + int nSamplingRate; + int nSamplingDist; + LONG lPdc; + int cPens; + int cbOemData; + OEMPENINFO rgoempeninfo[MAXOEMDATAWORDS]; + UINT rgwReserved[8]; + } + PENINFO, FAR *LPPENINFO; + +#define PDC_INTEGRATED 0x00000001L +#define PDC_PROXIMITY 0x00000002L +#define PDC_RANGE 0x00000004L +#define PDC_INVERT 0x00000008L +#define PDC_RELATIVE 0x00000010L +#define PDC_BARREL1 0x00000020L +#define PDC_BARREL2 0x00000040L +#define PDC_BARREL3 0x00000080L + +typedef struct tagSTROKEINFO + { + UINT cPnt; + UINT cbPnts; + UINT wPdk; + DWORD dwTick; + } + STROKEINFO, FAR *LPSTROKEINFO; + +typedef struct tagCALBSTRUCT + { + int wOffsetX; + int wOffsetY; + int wDistinctWidth; + int wDistinctHeight; + } + CALBSTRUCT, FAR *LPCALBSTRUCT; + +/****** DRV_ values for pen driver specific messages ************************/ + +#define DRV_SetPenDriverEntryPoints DRV_RESERVED+1 +#define DRV_RemovePenDriverEntryPoints DRV_RESERVED+2 +#define DRV_SetPenSamplingRate DRV_RESERVED+3 +#define DRV_SetPenSamplingDist DRV_RESERVED+4 +#define DRV_GetName DRV_RESERVED+5 +#define DRV_GetVersion DRV_RESERVED+6 +#define DRV_GetPenInfo DRV_RESERVED+7 +#define DRV_GetCalibration DRV_RESERVED+11 +#define DRV_SetCalibration DRV_RESERVED+12 + +VOID WINAPI UpdatePenInfo(LPPENINFO); +BOOL WINAPI EndPenCollection(REC); +REC WINAPI GetPenHwData(LPPOINT, LPVOID, int, UINT, LPSTROKEINFO); +REC WINAPI GetPenHwEventData(UINT, UINT, LPPOINT, LPVOID, int, LPSTROKEINFO); +VOID WINAPI PenPacket(VOID); +BOOL WINAPI SetPenHook(HKP, LPFNRAWHOOK); + +/****** Pen Hardware Constants **********************************************/ + +#define PDK_UP 0x0000 +#define PDK_DOWN 0x0001 +#define PDK_BARREL1 0x0002 +#define PDK_BARREL2 0x0004 +#define PDK_BARREL3 0x0008 +#define PDK_TRANSITION 0x0010 +#define PDK_INVERTED 0x0080 +#define PDK_OUTOFRANGE 0x4000 +#define PDK_DRIVER 0x8000 +#define PDK_TIPMASK 0x0001 +#define PDK_SWITCHES (PDK_DOWN|PDK_BARREL1|PDK_BARREL2|PDK_BARREL3) + +#define PCM_PENUP 0x00000001L +#define PCM_RANGE 0x00000002L +#define PCM_INVERT 0x00000020L +#define PCM_RECTEXCLUDE 0x00002000L +#define PCM_RECTBOUND 0x00004000L +#define PCM_TIMEOUT 0x00008000L +#define PCM_ADDDEFAULTS RC_LDEFAULTFLAGS /* 0x80000000L */ + +/****** Virtual Event Layer *************************************************/ + +VOID WINAPI PostVirtualKeyEvent(UINT, BOOL); +VOID WINAPI PostVirtualMouseEvent(UINT, int, int); +VOID WINAPI AtomicVirtualEvent(BOOL); + +#define VWM_MOUSEMOVE 0x0001 +#define VWM_MOUSELEFTDOWN 0x0002 +#define VWM_MOUSELEFTUP 0x0004 +#define VWM_MOUSERIGHTDOWN 0x0008 +#define VWM_MOUSERIGHTUP 0x0010 + +/****** RC Definition *************************************************************/ + +#define CL_NULL 0 +#define CL_MINIMUM 1 +#define CL_MAXIMUM 100 +#define INKWIDTH_MINIMUM 0 +#define INKWIDTH_MAXIMUM 15 +#define ENUM_MINIMUM 1 +#define ENUM_MAXIMUM 4096 +#define MAXDICTIONARIES 16 + +typedef struct tagGUIDE + { + int xOrigin; + int yOrigin; + int cxBox; + int cyBox; + int cxBase; + int cyBase; + int cHorzBox; + int cVertBox; + int cyMid; + } + GUIDE, FAR *LPGUIDE; + +typedef BOOL (CALLBACK * RCYIELDPROC)(VOID); + +#define cbRcLanguageMax 44 +#define cbRcUserMax 32 +#define cbRcrgbfAlcMax 32 +#define cwRcReservedMax 8 + +typedef struct tagRC + { + HREC hrec; + HWND hwnd; + UINT wEventRef; + UINT wRcPreferences; + LONG lRcOptions; + RCYIELDPROC lpfnYield; + BYTE lpUser[cbRcUserMax]; + UINT wCountry; + UINT wIntlPreferences; + char lpLanguage[cbRcLanguageMax]; + LPDF rglpdf[MAXDICTIONARIES]; + UINT wTryDictionary; + CL clErrorLevel; + ALC alc; + ALC alcPriority; + BYTE rgbfAlc[cbRcrgbfAlcMax]; + UINT wResultMode; + UINT wTimeOut; + LONG lPcm; + RECT rectBound; + RECT rectExclude; + GUIDE guide; + UINT wRcOrient; + UINT wRcDirect; + int nInkWidth; + COLORREF rgbInk; + DWORD dwAppParam; + DWORD dwDictParam; + DWORD dwRecognizer; + UINT rgwReserved[cwRcReservedMax]; + } + RC, FAR *LPRC; + +typedef HANDLE HPENDATA; + +typedef struct tagSYC + { + UINT wStrokeFirst; + UINT wPntFirst; + UINT wStrokeLast; + UINT wPntLast; + BOOL fLastSyc; + } + SYC, FAR *LPSYC; + +#define wPntAll (UINT)0xFFFF +#define iSycNull (-1) + +typedef struct tagSYE + { + SYV syv; + LONG lRecogVal; + CL cl; + int iSyc; + } + SYE, FAR *LPSYE; + +#define MAXHOTSPOT 8 + +typedef struct tagSYG + { + POINT rgpntHotSpots[MAXHOTSPOT]; + int cHotSpot; + int nFirstBox; + LONG lRecogVal; + LPSYE lpsye; + int cSye; + LPSYC lpsyc; + int cSyc; + } + SYG, FAR *LPSYG; + +typedef int (CALLBACK *ENUMPROC)(LPSYV, int, VOID FAR *); + +typedef struct tagRCRESULT + { + SYG syg; + UINT wResultsType; + int cSyv; + LPSYV lpsyv; + HANDLE hSyv; + int nBaseLine; + int nMidLine; + HPENDATA hpendata; + RECT rectBoundInk; + POINT pntEnd; + LPRC lprc; + } + RCRESULT, FAR *LPRCRESULT; + +#define RCRT_DEFAULT 0x0000 +#define RCRT_UNIDENTIFIED 0x0001 +#define RCRT_GESTURE 0x0002 +#define RCRT_NOSYMBOLMATCH 0x0004 +#define RCRT_PRIVATE 0x4000 +#define RCRT_NORECOG 0x8000 +#define RCRT_ALREADYPROCESSED 0x0008 +#define RCRT_GESTURETRANSLATED 0x0010 +#define RCRT_GESTURETOKEYS 0x0020 + +#define HKP_SETHOOK 0 +#define HKP_UNHOOK 0xFFFF +#define HWR_RESULTS 0 +#define HWR_APPWIDE 1 + +#define PEN_NOINKWIDTH 0 +#define LPDFNULL ((LPDF)NULL) + +#define RPA_DEFAULT 1 + +/* GetGlobalRC return codes */ +#define GGRC_OK 0 +#define GGRC_DICTBUFTOOSMALL 1 +#define GGRC_PARAMERROR 2 + +/* SetGlobalRC return code flags */ +#define SGRC_OK 0x0000 +#define SGRC_USER 0x0001 +#define SGRC_PARAMERROR 0x0002 +#define SGRC_RC 0x0004 +#define SGRC_RECOGNIZER 0x0008 +#define SGRC_DICTIONARY 0x0010 +#define SGRC_INIFILE 0x0020 + +#define GetWEventRef() (LOWORD(GetMessageExtraInfo())) + +HREC WINAPI InstallRecognizer(LPSTR); +VOID WINAPI UninstallRecognizer(HREC); +UINT WINAPI GetGlobalRC(LPRC, LPSTR, LPSTR, int); +UINT WINAPI SetGlobalRC(LPRC, LPSTR, LPSTR); +VOID WINAPI RegisterPenApp(UINT, BOOL); +UINT WINAPI IsPenAware(VOID); +BOOL WINAPI SetRecogHook(UINT, UINT, HWND); +VOID WINAPI InitRC(HWND, LPRC); +REC WINAPI Recognize(LPRC); +REC WINAPI RecognizeData(LPRC, HPENDATA); +BOOL WINAPI TrainInk(LPRC, HPENDATA, LPSYV); +BOOL WINAPI TrainContext(LPRCRESULT, LPSYE, int, LPSYC, int); +REC WINAPI ProcessWriting(HWND, LPRC); +BOOL WINAPI CorrectWriting(HWND, LPSTR, UINT, LPRC, DWORD, DWORD); +VOID WINAPI EmulatePen(BOOL); +int WINAPI GetSymbolMaxLength(LPSYG); +int WINAPI GetSymbolCount(LPSYG); +VOID WINAPI FirstSymbolFromGraph(LPSYG, LPSYV, int, int FAR *); +UINT WINAPI EnumSymbols(LPSYG, WORD, ENUMPROC, LPVOID); + +/****** Miscellaneous Functions *********************************************/ + +BOOL WINAPI TPtoDP(LPPOINT, int); +BOOL WINAPI DPtoTP(LPPOINT, int); +VOID WINAPI BoundingRectFromPoints(LPPOINT, int, LPRECT); +BOOL WINAPI SymbolToCharacter(LPSYV, int, LPSTR, LPINT); +int WINAPI CharacterToSymbol(LPSTR, int, LPSYV); +UINT WINAPI GetVersionPenWin(VOID); +BOOL WINAPI ExecuteGesture(HWND, SYV, LPRCRESULT); + +/****** RC Options and Flags ***********************************************/ + +#define ALC_ALL 0x000043FFL +#define ALC_DEFAULT 0x00000000L +#define ALC_LCALPHA 0x00000001L +#define ALC_UCALPHA 0x00000002L +#define ALC_ALPHA 0x00000003L +#define ALC_NUMERIC 0x00000004L +#define ALC_ALPHANUMERIC 0x00000007L +#define ALC_PUNC 0x00000008L +#define ALC_MATH 0x00000010L +#define ALC_MONETARY 0x00000020L +#define ALC_OTHER 0x00000040L +#define ALC_WHITE 0x00000100L +#define ALC_NONPRINT 0x00000200L +#define ALC_GESTURE 0x00004000L +#define ALC_USEBITMAP 0x00008000L +#define ALC_DBCS 0x00000400L +#define ALC_HIRAGANA 0x00010000L +#define ALC_KATAKANA 0x00020000L +#define ALC_KANJI 0x00040000L +#define ALC_OEM 0x0FF80000L +#define ALC_RESERVED 0xF0003800L +#define ALC_NOPRIORITY 0x00000000L +#define ALC_SYSMINIMUM (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE) + +#define MpAlcB(lprc,i) ((lprc)->rgbfAlc[((i) & 0xff) >> 3]) +#define MpIbf(i) ((BYTE)(1 << ((i) & 7))) + +#define SetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) |= MpIbf(i);} while (0) +#define ResetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0) +#define IsAlcBitAnsi(lprc, i) ((MpAlcB(lprc,i) & MpIbf(i)) != 0) + +#define RCD_DEFAULT 0 +#define RCD_LR 1 +#define RCD_RL 2 +#define RCD_TB 3 +#define RCD_BT 4 + +#define RCO_NOPOINTEREVENT 0x00000001L +#define RCO_SAVEALLDATA 0x00000002L +#define RCO_SAVEHPENDATA 0x00000004L +#define RCO_NOFLASHUNKNOWN 0x00000008L +#define RCO_TABLETCOORD 0x00000010L +#define RCO_NOSPACEBREAK 0x00000020L +#define RCO_NOHIDECURSOR 0x00000040L +#define RCO_NOHOOK 0x00000080L +#define RCO_BOXED 0x00000100L +#define RCO_SUGGEST 0x00000200L +#define RCO_DISABLEGESMAP 0x00000400L +#define RCO_NOFLASHCURSOR 0x00000800L +#define RCO_COLDRECOG 0x00008000L + +#define RCP_LEFTHAND 0x0001 +#define RCP_MAPCHAR 0x0004 + +#define RCOR_NORMAL 1 +#define RCOR_RIGHT 2 +#define RCOR_UPSIDEDOWN 3 +#define RCOR_LEFT 4 + +#define RRM_STROKE 0 +#define RRM_SYMBOL 1 +#define RRM_WORD 2 +#define RRM_NEWLINE 3 +#define RRM_COMPLETE 16 + +#define RCIP_ALLANSICHAR 0x0001 +#define RCIP_MASK 0x0001 + +#define CWR_STRIPCR 0x00000001L +#define CWR_STRIPLF 0x00000002L +#define CWR_STRIPTAB 0x00000004L +#define CWR_SINGLELINEEDIT 0x00000007L +#define CWR_TITLE 0x00000010L +#define CWR_KKCONVERT 0x00000020L + +#define MAP_GESTOGES (RCRT_GESTURE|RCRT_GESTURETRANSLATED) +#define MAP_GESTOVKEYS (RCRT_GESTURETOKEYS|RCRT_ALREADYPROCESSED) + +#define IsGestureToGesture(lprcresult) (((lprcresult)->wResultstype & MAP_GESTOGES \ + ) == MAP_GESTOGES) + +#define IsGestureToVkeys(lprcresult) (((lprcresult)->wResultstype & MAP_GESTOVKEYS \ + ) == MAP_GESTOVKEYS) + +#define SetAlreadyProcessed(lprcresult) ((lprcresult)->wResultsType = ((lprcresult)->wResultsType \ + & ~RCRT_GESTURETOKEYS) | RCRT_ALREADYPROCESSED) + +/****** Pen Data Type *******************************************************/ + +typedef struct tagPENDATAHEADER + { + UINT wVersion; + UINT cbSizeUsed; + UINT cStrokes; + UINT cPnt; + UINT cPntStrokeMax; + RECT rectBound; + UINT wPndts; + int nInkWidth; + DWORD rgbInk; + } + PENDATAHEADER, FAR *LPPENDATAHEADER, FAR *LPPENDATA; + +#define PDTS_LOMETRIC 0x0000 +#define PDTS_HIMETRIC 0x0001 +#define PDTS_HIENGLISH 0x0002 +#define PDTS_SCALEMAX 0x0003 +#define PDTS_DISPLAY 0x0003 +#define PDTS_ARBITRARY 0x0004 +#define PDTS_SCALEMASK 0x000F +#define PDTS_STANDARDSCALE PDTS_HIENGLISH + +#define PDTS_NOPENINFO 0x0100 +#define PDTS_NOUPPOINTS 0x0200 +#define PDTS_NOOEMDATA 0x0400 +#define PDTS_NOCOLINEAR 0x0800 +#define PDTS_COMPRESSED 0x8000 +#define PDTS_COMPRESSMETHOD 0x00F0 +#define PDTS_COMPRESS2NDDERIV 0x0010 + +#define PDTT_DEFAULT 0x0000 +#define PDTT_PENINFO PDTS_NOPENINFO +#define PDTT_UPPOINTS PDTS_NOUPPOINTS +#define PDTT_OEMDATA PDTS_NOOEMDATA +#define PDTT_COLINEAR PDTS_NOCOLINEAR +#define PDTT_COMPRESS PDTS_COMPRESSED +#define PDTT_DECOMPRESS 0x4000 +#define PDTT_ALL (PDTT_PENINFO|PDTT_UPPOINTS|PDTT_OEMDATA|PDTT_COLINEAR) + +#define DestroyPenData(hpendata) (GlobalFree(hpendata)==NULL) +#define EndEnumStrokes(hpendata) GlobalUnlock(hpendata) + +BOOL WINAPI IsPenEvent(UINT, LONG); +BOOL WINAPI GetPenAsyncState(UINT); + +BOOL WINAPI GetPenDataInfo(HPENDATA, LPPENDATAHEADER, LPPENINFO, DWORD); +BOOL WINAPI GetPenDataStroke(LPPENDATA, UINT, LPPOINT FAR *, LPVOID FAR *, LPSTROKEINFO ); +BOOL WINAPI GetPointsFromPenData(HPENDATA, UINT, UINT, UINT, LPPOINT); +VOID WINAPI DrawPenData(HDC, LPRECT, HPENDATA); +BOOL WINAPI MetricScalePenData(HPENDATA, UINT); +BOOL WINAPI ResizePenData(HPENDATA, LPRECT); +BOOL WINAPI OffsetPenData(HPENDATA, int, int); +BOOL WINAPI RedisplayPenData(HDC, HPENDATA, LPPOINT, LPPOINT, int, DWORD); +HPENDATA WINAPI CompactPenData(HPENDATA, UINT ); +HPENDATA WINAPI DuplicatePenData(HPENDATA, UINT); +HPENDATA WINAPI CreatePenData(LPPENINFO, int, UINT, UINT); +HPENDATA WINAPI AddPointsPenData(HPENDATA, LPPOINT, LPVOID, LPSTROKEINFO); +LPPENDATA WINAPI BeginEnumStrokes(HPENDATA ); + +/****** New Windows Messages ************************************************/ + +#define WM_RCRESULT (WM_PENWINFIRST+1) +#define WM_HOOKRCRESULT (WM_PENWINFIRST+2) +#define WM_GLOBALRCCHANGE (WM_PENWINFIRST+3) +#define WM_SKB (WM_PENWINFIRST+4) +#define WM_HEDITCTL (WM_PENWINFIRST+5) + +/****** Dictionary **********************************************************/ + +#define cbDictPathMax 255 +#define DIRQ_QUERY 1 +#define DIRQ_DESCRIPTION 2 +#define DIRQ_CONFIGURE 3 +#define DIRQ_OPEN 4 +#define DIRQ_CLOSE 5 +#define DIRQ_SETWORDLISTS 6 +#define DIRQ_STRING 7 +#define DIRQ_SUGGEST 8 +#define DIRQ_ADD 9 +#define DIRQ_DELETE 10 +#define DIRQ_FLUSH 11 +#define DIRQ_RCCHANGE 12 +#define DIRQ_SYMBOLGRAPH 13 +#define DIRQ_INIT 14 +#define DIRQ_CLEANUP 15 +#define DIRQ_COPYRIGHT 16 + + +#define DIRQ_USER 4096 + +BOOL WINAPI DictionarySearch(LPRC, LPSYE, int, LPSYV, int); + +/****** Handwriting Edit Control ********************************************/ + +#define HE_GETRC 3 +#define HE_SETRC 4 +#define HE_GETINFLATE 5 +#define HE_SETINFLATE 6 +#define HE_GETUNDERLINE 7 +#define HE_SETUNDERLINE 8 +#define HE_GETINKHANDLE 9 +#define HE_SETINKMODE 10 +#define HE_STOPINKMODE 11 +#define HE_GETRCRESULTCODE 12 +#define HE_DEFAULTFONT 13 +#define HE_CHARPOSITION 14 +#define HE_CHAROFFSET 15 + +#define HE_GETRCRESULT 22 + +#define HE_KKCONVERT 30 +#define HE_GETKKCONVERT 31 +#define HE_CANCELKKCONVERT 32 +#define HE_FIXKKCONVERT 33 + +#define HEKK_DEFAULT 0 +#define HEKK_CONVERT 1 +#define HEKK_CANDIDATE 2 + +#define HEP_NORECOG 0 +#define HEP_RECOG 1 +#define HEP_WAITFORTAP 2 + +#define HN_ENDREC 4 +#define HN_DELAYEDRECOGFAIL 5 + +#define HN_RCRESULT 20 + +#define HN_ENDKKCONVERT 30 + +typedef struct tagRECTOFS + { + int dLeft; + int dTop; + int dRight; + int dBottom; + } + RECTOFS, FAR *LPRECTOFS; + +/****** Boxed Edit Control **************************************************/ + +typedef struct tagBOXLAYOUT + { + int cyCusp; + int cyEndCusp; + UINT style; + DWORD rgbText; + DWORD rgbBox; + DWORD rgbSelect; + } + BOXLAYOUT, FAR *LPBOXLAYOUT; + +#define BXS_NONE 0U +#define BXS_RECT 1U +#define BXS_ENDTEXTMARK 2U +#define BXS_MASK 3U + +#define HE_GETBOXLAYOUT 20 +#define HE_SETBOXLAYOUT 21 + +#define BXD_CELLWIDTH 12 +#define BXD_CELLHEIGHT 16 +#define BXD_BASEHEIGHT 13 +#define BXD_BASEHORZ 0 +#define BXD_CUSPHEIGHT 2 +#define BXD_ENDCUSPHEIGHT 4 + +/****** Screen Keyboard *****************************************************/ + +typedef struct tagSKBINFO + { + HWND hwnd; + UINT nPad; + BOOL fVisible; + BOOL fMinimized; + RECT rect; + DWORD dwReserved; + } + SKBINFO, FAR *LPSKBINFO; + +#define SKB_QUERY 0x0000 +#define SKB_SHOW 0x0001 +#define SKB_HIDE 0x0002 +#define SKB_CENTER 0x0010 +#define SKB_MOVE 0x0020 +#define SKB_MINIMIZE 0x0040 +#define SKB_FULL 0x0100 +#define SKB_BASIC 0x0200 +#define SKB_NUMPAD 0x0400 + +#define OBM_SKBBTNUP 32767 +#define OBM_SKBBTNDOWN 32766 +#define OBM_SKBBTNDISABLED 32765 + +#define SKN_CHANGED 1 + +#define SKN_POSCHANGED 1 +#define SKN_PADCHANGED 2 +#define SKN_MINCHANGED 4 +#define SKN_VISCHANGED 8 +#define SKN_TERMINATED 0xffff + +BOOL WINAPI ShowKeyboard(HWND, UINT, LPPOINT, LPSKBINFO); + +/****** New ComboBox Notifications *****************************************/ + +#define CBN_ENDREC 16 +#define CBN_DELAYEDRECOGFAIL 17 +#define CBN_RCRESULT 18 + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* #define _INC_PENWIN */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/penwoem.h b/private/oleauto/tools/win16/hdos/c800/include/penwoem.h new file mode 100644 index 000000000..b9c96d68c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/penwoem.h @@ -0,0 +1,75 @@ +/*****************************************************************************\ +* * +* penwoem.h - Pen Windows APIs into recognizer layer. * +* Assumes windows.h and penwin.h have been previously included. * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_PENWOEM /* prevent multiple includes */ +#define _INC_PENWOEM + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +typedef int (CALLBACK *LPFUNCRESULTS) (LPRCRESULT, REC); + +/* Initialization Functions */ + +#define WCR_RECOGNAME 0 +#define WCR_QUERY 1 +#define WCR_CONFIGDIALOG 2 +#define WCR_DEFAULT 3 +#define WCR_RCCHANGE 4 +#define WCR_VERSION 5 +#define WCR_TRAIN 6 +#define WCR_TRAINSAVE 7 +#define WCR_TRAINMAX 8 +#define WCR_TRAINDIRTY 9 +#define WCR_TRAINCUSTOM 10 +#define WCR_QUERYLANGUAGE 11 +#define WCR_USERCHANGE 12 +#define WCR_PRIVATE 1024 + +/* sub-function of WCR_USERCHANGE */ +#define CRUC_REMOVE 1 + +/* Return values for WCR_TRAIN Function */ +#define TRAIN_NONE 0x0000 +#define TRAIN_DEFAULT 0x0001 +#define TRAIN_CUSTOM 0x0002 +#define TRAIN_BOTH (TRAIN_DEFAULT | TRAIN_CUSTOM) + +/* Control values for TRAINSAVE */ +#define TRAIN_SAVE 0 /* Save changes that have been made */ +#define TRAIN_REVERT 1 /* Discard changes that have been made */ + +UINT WINAPI ConfigRecognizer(UINT, WPARAM, LPARAM); +BOOL WINAPI InitRecognizer(LPRC); +VOID WINAPI CloseRecognizer(VOID); + +/* Recognition Functions */ +REC WINAPI RecognizeInternal(LPRC, LPFUNCRESULTS); +REC WINAPI RecognizeDataInternal(LPRC, HPENDATA, LPFUNCRESULTS); + +/* Training Functions */ +BOOL WINAPI TrainInkInternal(LPRC, HPENDATA, LPSYV); +BOOL WINAPI TrainContextInternal(LPRCRESULT, LPSYE, int, LPSYC, int); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* #define _INC_PENWOEM */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/pgchart.h b/private/oleauto/tools/win16/hdos/c800/include/pgchart.h new file mode 100644 index 000000000..5be26e358 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/pgchart.h @@ -0,0 +1,256 @@ +/*** +*pgchart.h - Declare constants, functions and macros for charting library. +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the presentation graphics library functions and +* the structures and manifest constants that are used with them. +* +***************************************************************************/ + + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* Force word alignment to avoid possible -Zp override */ +#pragma pack(2) + + +/* Required for the missing value definition */ +#ifndef FLT_MAX +#define FLT_MAX 3.402823466e+38F /* max value */ +#endif + +#define _PG_PALETTELEN 16 /* Number of entries in internal palette */ +#define _PG_MAXCHARTTYPE 5 /* Maximum available chart type */ +#define _PG_MAXCHARTSTYLE 2 /* Maximum chart style */ +#define _PG_TITLELEN 70 /* Maximum title text length */ + +#define _PG_LEFT 1 /* Positions used for titles and legends */ +#define _PG_CENTER 2 +#define _PG_RIGHT 3 +#define _PG_BOTTOM 4 +#define _PG_OVERLAY 5 + +#define _PG_LINEARAXIS 1 /* Used to specify axis types */ +#define _PG_LOGAXIS 2 + +#define _PG_DECFORMAT 1 /* Used to specify tic mark label format */ +#define _PG_EXPFORMAT 2 + +#define _PG_BARCHART 1 /* Charttype for a bar chart */ +#define _PG_COLUMNCHART 2 /* Charttype for a column chart */ +#define _PG_PLAINBARS 1 /* Styles for bar and column charts */ +#define _PG_STACKEDBARS 2 + +#define _PG_LINECHART 3 /* Charttype for a line chart */ +#define _PG_SCATTERCHART 4 /* Charttype for a scatter chart */ +#define _PG_POINTANDLINE 1 /* Styles for line and scatter charts */ +#define _PG_POINTONLY 2 + +#define _PG_PIECHART 5 /* Charttype for pie chart */ +#define _PG_PERCENT 1 /* Styles for pie charts */ +#define _PG_NOPERCENT 2 + +#define _PG_MISSINGVALUE (-FLT_MAX) /* Indicates missing data values */ + + +/* Error codes */ + +/* Numbers greater than 100 will terminate chart routine, others will cause + * default values to be used + */ +#define _PG_NOTINITIALIZED 102 /* If library not initialized */ +#define _PG_BADSCREENMODE 103 /* Graphics mode not set before charting */ +#define _PG_BADCHARTSTYLE 04 /* Chart style invalid */ +#define _PG_BADCHARTTYPE 104 /* Chart type invalid */ +#define _PG_BADLEGENDWINDOW 105 /* Invalid legend window specified */ +#define _PG_BADCHARTWINDOW 07 /* x1=x2 or y1=y2 in chart window spec. */ +#define _PG_BADDATAWINDOW 107 /* If chart window is too small */ +#define _PG_NOMEMORY 108 /* Not enough memory for data arrays */ +#define _PG_BADLOGBASE 05 /* Log base <= 0 */ +#define _PG_BADSCALEFACTOR 06 /* Scale factor = 0 */ +#define _PG_TOOSMALLN 109 /* Number of data points <= 0 */ +#define _PG_TOOFEWSERIES 110 /* Number of series <= 0 */ + + +/* Typedefs */ + +/* Typedef for chart title */ +#ifndef _TITLETYPE_DEFINED +typedef struct { + char title[_PG_TITLELEN]; /* Title text */ + short titlecolor; /* Internal palette color for title text */ + short justify; /* _PG_LEFT, _PG_CENTER, _PG_RIGHT */ +} _titletype; +#define _TITLETYPE_DEFINED +#endif + +/* Typedef for chart axes */ +#ifndef _AXISTYPE_DEFINED +typedef struct { + short grid; /* TRUE=grid lines drawn; FALSE no lines */ + short gridstyle; /* Style number from style pool for grid lines */ + _titletype axistitle; /* Title definition for axis */ + short axiscolor; /* Color for axis */ + short labeled; /* TRUE=tic marks and titles drawn */ + short rangetype; /* _PG_LINEARAXIS, _PG_LOGAXIS */ + float logbase; /* Base used if log axis */ + short autoscale; /* TRUE=next 7 values calculated by system */ + float scalemin; /* Minimum value of scale */ + float scalemax; /* Maximum value of scale */ + float scalefactor; /* Scale factor for data on this axis */ + _titletype scaletitle; /* Title definition for scaling factor */ + float ticinterval; /* Distance between tic marks (world coord.) */ + short ticformat; /* _PG_EXPFORMAT or _PG_DECFORMAT for tic labels */ + short ticdecimals; /* Number of decimals for tic labels (max=9)*/ +} _axistype; +#define _AXISTYPE_DEFINED +#endif + +/* Typedef used for defining chart and data windows */ +#ifndef _WINDOWTYPE_DEFINED +typedef struct { + short x1; /* Left edge of window in pixels */ + short y1; /* Top edge of window in pixels */ + short x2; /* Right edge of window in pixels */ + short y2; /* Bottom edge of window in pixels */ + short border; /* TRUE for border, FALSE otherwise */ + short background; /* Internal palette color for window bgnd */ + short borderstyle; /* Style bytes for window border */ + short bordercolor; /* Internal palette color for window border */ +} _windowtype; +#define _WINDOWTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _LEGENDTYPE_DEFINED +typedef struct { + short legend; /* TRUE=draw legend; FALSE=no legend */ + short place; /* _PG_RIGHT, _PG_BOTTOM, _PG_OVERLAY */ + short textcolor; /* Internal palette color for text */ + short autosize; /* TRUE=system calculates size */ + _windowtype legendwindow; /* Window definition for legend */ +} _legendtype; +#define _LEGENDTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _CHARTENV_DEFINED +typedef struct { + short charttype; /* _PG_BARCHART, _PG_COLUMNCHART, + _PG_LINECHART, _PG_SCATTERCHART, + _PG_PIECHART */ + short chartstyle; /* Style for selected chart type */ + _windowtype chartwindow; /* Window definition for overall chart */ + _windowtype datawindow; /* Window definition for data part of chart */ + _titletype maintitle; /* Main chart title */ + _titletype subtitle; /* Chart sub-title */ + _axistype xaxis; /* Definition for X-axis */ + _axistype yaxis; /* Definition for Y-axis */ + _legendtype legend; /* Definition for legend */ +} _chartenv; +#define _CHARTENV_DEFINED +#endif + +/* Typedef for character bitmap */ +#ifndef _CHARMAP_DEFINED +typedef unsigned char _charmap[8]; +#define _CHARMAP_DEFINED +#endif + +/* Typedef for pattern bitmap */ +#ifndef _FILLMAP_DEFINED +typedef unsigned char _fillmap[8]; +#define _FILLMAP_DEFINED +#endif + +/* Typedef for palette entry definition */ +#ifndef _PALETTEENTRY_DEFINED +typedef struct { + unsigned short color; + unsigned short style; + _fillmap fill; + char plotchar; +} _paletteentry; +#define _PALETTEENTRY_DEFINED +#endif + +/* Typedef for palette definition */ +#ifndef _PALETTETYPE_DEFINED +typedef _paletteentry _palettetype[_PG_PALETTELEN]; +#define _PALETTETYPE_DEFINED +#endif + +/* Typedef for style sets */ +#ifndef _STYLESET_DEFINED +typedef unsigned short _styleset[_PG_PALETTELEN]; +#define _STYLESET_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define titletype _titletype +#define axistype _axistype +#define windowtype _windowtype +#define legendtype _legendtype +#define chartenv _chartenv +#define charmap _charmap +#define fillmap _fillmap +#define paletteentry _paletteentry +#define palettetype _palettetype +#define styleset _styleset +#endif + + +/* Function prototypes for charting routines */ + +short __far __cdecl _pg_initchart(void); +short __far __cdecl _pg_defaultchart(_chartenv __far *, short, short); + +short __far __cdecl _pg_chart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_chartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartscatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_chartscatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartpie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +/* Function prototypes for support routines */ + +short __far __cdecl _pg_hlabelchart(_chartenv __far *, short, short, short, const char __far *); +short __far __cdecl _pg_vlabelchart(_chartenv __far *, short, short, short, const char __far *); + +short __far __cdecl _pg_analyzechart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_analyzechartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzescatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_analyzescatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzepie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +short __far __cdecl _pg_getpalette(_paletteentry __far *); +short __far __cdecl _pg_setpalette(const _paletteentry __far *); +short __far __cdecl _pg_resetpalette(void); + +void __far __cdecl _pg_getstyleset(unsigned short __far *); +void __far __cdecl _pg_setstyleset(const unsigned short __far *); +void __far __cdecl _pg_resetstyleset(void); + +short __far __cdecl _pg_getchardef(short, unsigned char __far *); +short __far __cdecl _pg_setchardef(short, const unsigned char __far *); + + +/* Restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/print.h b/private/oleauto/tools/win16/hdos/c800/include/print.h new file mode 100644 index 000000000..263dff97d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/print.h @@ -0,0 +1,302 @@ +/*****************************************************************************\ +* * +* print.h - Printing helper functions, types, and definitions * +* * +* Copyright (c) 1985-1992. Microsoft Corp. All rights reserved.* +* * +******************************************************************************* +* +* PRINTDRIVER - For inclusion with a printer driver +* NOPQ - Prevent inclusion of priority queue APIs +* +\*****************************************************************************/ + +#ifndef _INC_PRINT +#define _INC_PRINT + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifdef PRINTDRIVER + +#define NORASTEROPS +#define NOTEXTMETRICS +#define NOGDICAPMASKS +#define NOGDIOBJ +#define NOBITMAP +#define NOSOUND +#define NOTEXTMETRIC +#define NOCOMM +#define NOKANJI + +#include <windows.h> + +#undef NORASTEROPS +#undef NOTEXTMETRICS +#undef NOGDICAPMASKS +#undef NOGDICAPMASKS +#undef NOGDIOBJ +#undef NOBITMAP +#undef NOSOUND +#undef NOTEXTMETRIC +#undef NOCOMM +#undef NOKANJI + +#define NOPTRC /* don't allow gdidefs.inc to redef these */ +#define PTTYPE POINT + +#define PQERROR (-1) + +#ifndef NOPQ + +DECLARE_HANDLE(HPQ); + +HPQ WINAPI CreatePQ(int); +int WINAPI MinPQ(HPQ); +int WINAPI ExtractPQ(HPQ); +int WINAPI InsertPQ(HPQ, int, int); +int WINAPI SizePQ(HPQ, int); +void WINAPI DeletePQ(HPQ); +#endif /* !NOPQ */ + +/* Spool routines for use by printer drivers */ + +DECLARE_HANDLE(HPJOB); + +HPJOB WINAPI OpenJob(LPSTR, LPSTR, HPJOB); +int WINAPI StartSpoolPage(HPJOB); +int WINAPI EndSpoolPage(HPJOB); +int WINAPI WriteSpool(HPJOB, LPSTR, int); +int WINAPI CloseJob(HPJOB); +int WINAPI DeleteJob(HPJOB, int); +int WINAPI WriteDialog(HPJOB, LPSTR, int); +int WINAPI DeleteSpoolPage(HPJOB); + +#endif /* !PRINTDRIVER */ + +typedef struct tagBANDINFOSTRUCT +{ + BOOL fGraphics; + BOOL fText; + RECT rcGraphics; +} BANDINFOSTRUCT, FAR* LPBI; + +#define USA_COUNTRYCODE 1 + +/* + * Printer driver initialization using ExtDeviceMode() + * and DeviceCapabilities(). + * This replaces Drivinit.h + */ + +/* size of a device name string */ +#define CCHDEVICENAME 32 +#define CCHPAPERNAME 64 + +/* current version of specification */ +#define DM_SPECVERSION 0x30A + +/* field selection bits */ +#define DM_ORIENTATION 0x0000001L +#define DM_PAPERSIZE 0x0000002L +#define DM_PAPERLENGTH 0x0000004L +#define DM_PAPERWIDTH 0x0000008L +#define DM_SCALE 0x0000010L +#define DM_COPIES 0x0000100L +#define DM_DEFAULTSOURCE 0x0000200L +#define DM_PRINTQUALITY 0x0000400L +#define DM_COLOR 0x0000800L +#define DM_DUPLEX 0x0001000L +#define DM_YRESOLUTION 0x0002000L +#define DM_TTOPTION 0x0004000L + +/* orientation selections */ +#define DMORIENT_PORTRAIT 1 +#define DMORIENT_LANDSCAPE 2 + +/* paper selections */ +/* Warning: The PostScript driver mistakingly uses DMPAPER_ values between + * 50 and 56. Don't use this range when defining new paper sizes. + */ +#define DMPAPER_FIRST DMPAPER_LETTER +#define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */ +#define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */ +#define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */ +#define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */ +#define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */ +#define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */ +#define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */ +#define DMPAPER_A3 8 /* A3 297 x 420 mm */ +#define DMPAPER_A4 9 /* A4 210 x 297 mm */ +#define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */ +#define DMPAPER_A5 11 /* A5 148 x 210 mm */ +#define DMPAPER_B4 12 /* B4 250 x 354 */ +#define DMPAPER_B5 13 /* B5 182 x 257 mm */ +#define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */ +#define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */ +#define DMPAPER_10X14 16 /* 10x14 in */ +#define DMPAPER_11X17 17 /* 11x17 in */ +#define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */ +#define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */ +#define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */ +#define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */ +#define DMPAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */ +#define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */ +#define DMPAPER_CSHEET 24 /* C size sheet */ +#define DMPAPER_DSHEET 25 /* D size sheet */ +#define DMPAPER_ESHEET 26 /* E size sheet */ +#define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */ +#define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */ +#define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */ +#define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */ +#define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */ +#define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */ +#define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */ +#define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */ +#define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */ +#define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */ +#define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */ +#define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */ +#define DMPAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */ +#define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */ +#define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */ + +#define DMPAPER_LAST DMPAPER_FANFOLD_LGL_GERMAN + +#define DMPAPER_USER 256 + +/* bin selections */ +#define DMBIN_FIRST DMBIN_UPPER +#define DMBIN_UPPER 1 +#define DMBIN_ONLYONE 1 +#define DMBIN_LOWER 2 +#define DMBIN_MIDDLE 3 +#define DMBIN_MANUAL 4 +#define DMBIN_ENVELOPE 5 +#define DMBIN_ENVMANUAL 6 +#define DMBIN_AUTO 7 +#define DMBIN_TRACTOR 8 +#define DMBIN_SMALLFMT 9 +#define DMBIN_LARGEFMT 10 +#define DMBIN_LARGECAPACITY 11 +#define DMBIN_CASSETTE 14 +#define DMBIN_LAST DMBIN_CASSETTE + +#define DMBIN_USER 256 /* device specific bins start here */ + +/* print qualities */ +#define DMRES_DRAFT (-1) +#define DMRES_LOW (-2) +#define DMRES_MEDIUM (-3) +#define DMRES_HIGH (-4) + +/* color enable/disable for color printers */ +#define DMCOLOR_MONOCHROME 1 +#define DMCOLOR_COLOR 2 + +/* duplex enable */ +#define DMDUP_SIMPLEX 1 +#define DMDUP_VERTICAL 2 +#define DMDUP_HORIZONTAL 3 + +/* TrueType options */ +#define DMTT_BITMAP 1 /* print TT fonts as graphics */ +#define DMTT_DOWNLOAD 2 /* download TT fonts as soft fonts */ +#define DMTT_SUBDEV 3 /* substitute device fonts for TT fonts */ + +typedef struct tagDEVMODE +{ + char dmDeviceName[CCHDEVICENAME]; + UINT dmSpecVersion; + UINT dmDriverVersion; + UINT dmSize; + UINT dmDriverExtra; + DWORD dmFields; + int dmOrientation; + int dmPaperSize; + int dmPaperLength; + int dmPaperWidth; + int dmScale; + int dmCopies; + int dmDefaultSource; + int dmPrintQuality; + int dmColor; + int dmDuplex; + int dmYResolution; + int dmTTOption; +} DEVMODE; + +typedef DEVMODE* PDEVMODE, NEAR* NPDEVMODE, FAR* LPDEVMODE; + +/* mode selections for the device mode function */ +#define DM_UPDATE 1 +#define DM_COPY 2 +#define DM_PROMPT 4 +#define DM_MODIFY 8 + +#define DM_IN_BUFFER DM_MODIFY +#define DM_IN_PROMPT DM_PROMPT +#define DM_OUT_BUFFER DM_COPY +#define DM_OUT_DEFAULT DM_UPDATE + +/* device capabilities indices */ +#define DC_FIELDS 1 +#define DC_PAPERS 2 +#define DC_PAPERSIZE 3 +#define DC_MINEXTENT 4 +#define DC_MAXEXTENT 5 +#define DC_BINS 6 +#define DC_DUPLEX 7 +#define DC_SIZE 8 +#define DC_EXTRA 9 +#define DC_VERSION 10 +#define DC_DRIVER 11 +#define DC_BINNAMES 12 +#define DC_ENUMRESOLUTIONS 13 +#define DC_FILEDEPENDENCIES 14 +#define DC_TRUETYPE 15 +#define DC_PAPERNAMES 16 +#define DC_ORIENTATION 17 +#define DC_COPIES 18 + +/* bit fields of the return value (DWORD) for DC_TRUETYPE */ +#define DCTT_BITMAP 0x0000001L +#define DCTT_DOWNLOAD 0x0000002L +#define DCTT_SUBDEV 0x0000004L + +/* export ordinal definitions */ +#define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90) +#define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91) +#define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13) + +/* define types of pointers to ExtDeviceMode() and DeviceCapabilities() + * functions + */ +typedef UINT (CALLBACK* LPFNDEVMODE)(HWND, HMODULE, DEVMODE FAR*, + LPSTR, LPSTR, DEVMODE FAR*, LPSTR, UINT); + +typedef DWORD (CALLBACK* LPFNDEVCAPS)(LPSTR, LPSTR, UINT, LPSTR, DEVMODE FAR*); + +HDC WINAPI ResetDC(HDC, const DEVMODE FAR*); + +/* this structure is used by the GETSETSCREENPARAMS escape */ +typedef struct tagSCREENPARAMS +{ + int angle; + int frequency; +} SCREENPARAMS; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_PRINT */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/process.h b/private/oleauto/tools/win16/hdos/c800/include/process.h new file mode 100644 index 000000000..56e67d8c2 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/process.h @@ -0,0 +1,144 @@ +/*** +*process.h - definition and declarations for process control functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations and definitions for the +* spawnxx, execxx, and various other process control routines. +* +****/ + +#ifndef _INC_PROCESS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* mode values for spawnxx routines + * (only P_WAIT and P_OVERLAY are supported on MS-DOS) + */ + +#ifndef _MT +extern int __near __cdecl _p_overlay; +#endif + +#define _P_WAIT 0 +#define _P_NOWAIT 1 +#ifdef _MT +#define _P_OVERLAY 2 +#else +#define _P_OVERLAY _p_overlay +#endif +#define _OLD_P_OVERLAY 2 +#define _P_NOWAITO 3 +#define _P_DETACH 4 + + +/* function prototypes */ + +#ifdef _MT +int __cdecl _beginthread(void(__cdecl *)(void *), + void *, unsigned, void *); +void __cdecl _endthread(void); +#endif +void __cdecl abort(void); +void __cdecl _cexit(void); +void __cdecl _c_exit(void); +#ifndef _WINDOWS +int __cdecl _execl(const char *, const char *, ...); +int __cdecl _execle(const char *, const char *, ...); +int __cdecl _execlp(const char *, const char *, ...); +int __cdecl _execlpe(const char *, const char *, ...); +int __cdecl _execv(const char *, + const char * const *); +int __cdecl _execve(const char *, + const char * const *, const char * const *); +int __cdecl _execvp(const char *, + const char * const *); +int __cdecl _execvpe(const char *, + const char * const *, const char * const *); +#endif +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __cdecl _getpid(void); +#ifndef _WINDOWS +int __cdecl _spawnl(int, const char *, const char *, + ...); +int __cdecl _spawnle(int, const char *, const char *, + ...); +int __cdecl _spawnlp(int, const char *, const char *, + ...); +int __cdecl _spawnlpe(int, const char *, const char *, + ...); +int __cdecl _spawnv(int, const char *, + const char * const *); +int __cdecl _spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl _spawnvp(int, const char *, + const char * const *); +int __cdecl _spawnvpe(int, const char *, + const char * const *, const char * const *); +int __cdecl system(const char *); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_WAIT _P_WAIT +#define P_NOWAIT _P_NOWAIT +#define P_OVERLAY _P_OVERLAY +#define OLD_P_OVERLAY _OLD_P_OVERLAY +#define P_NOWAITO _P_NOWAITO +#define P_DETACH _P_DETACH + +#ifndef _WINDOWS +int __cdecl execl(const char *, const char *, ...); +int __cdecl execle(const char *, const char *, ...); +int __cdecl execlp(const char *, const char *, ...); +int __cdecl execlpe(const char *, const char *, ...); +int __cdecl execv(const char *, + const char * const *); +int __cdecl execve(const char *, + const char * const *, const char * const *); +int __cdecl execvp(const char *, + const char * const *); +int __cdecl execvpe(const char *, + const char * const *, const char * const *); +#endif +int __cdecl getpid(void); +#ifndef _WINDOWS +int __cdecl spawnl(int, const char *, const char *, + ...); +int __cdecl spawnle(int, const char *, const char *, + ...); +int __cdecl spawnlp(int, const char *, const char *, + ...); +int __cdecl spawnlpe(int, const char *, const char *, + ...); +int __cdecl spawnv(int, const char *, + const char * const *); +int __cdecl spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl spawnvp(int, const char *, + const char * const *); +int __cdecl spawnvpe(int, const char *, + const char * const *, const char * const *); +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_PROCESS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h b/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h new file mode 100644 index 000000000..337f02311 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h @@ -0,0 +1,168 @@ +/*****************************************************************************\ +* * +* scrnsave.h Windows 3.1 screensaver defines and definitions. +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_SCRNSAVE +#define _INC_SCRNSAVE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If not included with 3.1 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + + +/* Icon resource ID. + * + * This should be the first icon used and must have this resource number. + * This is needed as the first icon in the file will be grabbed + */ +#define ID_APP 100 +#define DLG_CHANGEPASSWORD 2000 +#define DLG_ENTERPASSWORD 2001 +#define DLG_INVALIDPASSWORD 2002 +#define DLG_SCRNSAVECONFIGURE 2003 + +#define idsIsPassword 1000 +#define idsIniFile 1001 +#define idsScreenSaver 1002 +#define idsPassword 1003 +#define idsDifferentPW 1004 +#define idsChangePW 1005 +#define idsBadOldPW 1006 +#define idsAppName 1007 +#define idsNoHelpMemory 1008 +#define idsHelpFile 1009 + +/* This function is the Window Procedure for the screen saver. It is + * up to the programmer to handle any of the messages that wish to be + * interpretted. Any unused messages are then passed back to + * DefScreenSaverProc if desired which will take default action on any + * unprocessed message... + */ +LRESULT WINAPI ScreenSaverProc(HWND, unsigned, UINT, LPARAM); + +/* This function performs default message processing. Currently handles + * the following messages: + * + * WM_SYSCOMMAND: return FALSE if wParam is SC_SCREENSAVE or SC_CLOSE + * + * WM_DESTROY: PostQuitMessage(0) + * + * WM_SETCURSOR: By default, this will set the cursor to a null cursor, + * thereby removing it from the screen. + * + * WM_LBUTTONDOWN: + * WM_MBUTTONDOWN: + * WM_RBUTTONDOWN: + * WM_KEYDOWN: + * WM_KEYUP: + * WM_MOUSEMOVE: By default, these will cause the program to terminate. + * Unless the password option is enabled. In that case + * the DlgGetPassword() dialog box is brought up. + * + * WM_NCACTIVATE: + * WM_ACTIVATEAPP: + * WM_ACTIVATE: By default, if the wParam parameter is FALSE (signifying + * that transfer is being taken away from the application), + * then the program will terminate. Termination is + * accomplished by generating a WM_CLOSE message. This way, + * if the user sets something up in the WM_CREATE, a + * WM_DESTROY will be generated and it can be destroyed + * properly. + * This message is ignored, however is the password option + * is enabled. + */ +LRESULT WINAPI DefScreenSaverProc(HWND, UINT, WPARAM, LPARAM); + +/* A function is also needed for configuring the screen saver. The function + * should be exactly like it is below and must be exported such that the + * program can use MAKEPROCINSTANCE on it and call up a dialog box. Further- + * more, the template used for the dialog must be called + * ScreenSaverConfigure to allow the main function to access it... + */ +BOOL WINAPI ScreenSaverConfigureDialog(HWND, UINT, WPARAM, LPARAM); + +/* This function is called from the ScreenSaveConfigureDialog() to change + * the Screen Saver's password. Note: passwords are GLOBAL to all + * screen savers using this model. Whether or not the password is enabled + * is LOCAL to a particular screen saver. + */ +BOOL WINAPI DlgChangePassword(HWND, UINT, WPARAM, LPARAM); + +/* To allow the programmer the ability to register child control windows, this + * function is called prior to the creation of the dialog box. Any + * registering that is required should be done here, or return TRUE if none + * is needed... + */ +BOOL _cdecl RegisterDialogClasses(HINSTANCE); + +/* The following three functions are called by DefScreenSaverProc and must + * be exported by all screensavers using this model. + */ +BOOL WINAPI DlgGetPassword(HWND, UINT, WPARAM, LPARAM); +BOOL WINAPI DlgInvalidPassword(HWND, UINT, WPARAM, LPARAM); +DWORD WINAPI HelpMessageFilterHookFunction(int, WORD, LPMSG); + +/* + * There are only three other points that should be of notice: + * 1) The screen saver must have a string declared as 'szAppName' contaning the + * name of the screen saver, and it must be declared as a global. + * 2) The screen saver EXE file should be renamed to a file with a SCR + * extension so that the screen saver dialog form the control panel can + * find it when is searches for screen savers. + */ +#define WS_GT (WS_GROUP | WS_TABSTOP) +#define MAXFILELEN 13 +#define TITLEBARNAMELEN 40 +#define BUFFLEN 255 + +/* The following globals are defined in scrnsave.lib */ +extern HINSTANCE _cdecl hMainInstance; +extern HWND _cdecl hMainWindow; +extern char _cdecl szName[TITLEBARNAMELEN]; +extern char _cdecl szIsPassword[22]; +extern char _cdecl szIniFile[MAXFILELEN]; +extern char _cdecl szScreenSaver[22]; +extern char _cdecl szPassword[16]; +extern char _cdecl szDifferentPW[BUFFLEN]; +extern char _cdecl szChangePW[30]; +extern char _cdecl szBadOldPW[BUFFLEN]; +extern char _cdecl szHelpFile[MAXFILELEN]; +extern char _cdecl szNoHelpMemory[BUFFLEN]; +extern UINT _cdecl MyHelpMessage; +extern HOOKPROC _cdecl fpMessageFilter; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_SCRNSAVE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/search.h b/private/oleauto/tools/win16/hdos/c800/include/search.h new file mode 100644 index 000000000..5418887c6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/search.h @@ -0,0 +1,59 @@ +/*** +*search.h - declarations for searcing/sorting routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations for the sorting and +* searching routines. +* [System V] +* +****/ + +#ifndef _INC_SEARCH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl _lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl _lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_SEARCH +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/setjmp.h b/private/oleauto/tools/win16/hdos/c800/include/setjmp.h new file mode 100644 index 000000000..4f96d20c6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/setjmp.h @@ -0,0 +1,44 @@ +/*** +*setjmp.h - definitions/declarations for setjmp/longjmp routines +* +* Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the machine-dependent buffer used by +* setjmp/longjmp to save and restore the program state, and +* declarations for those routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SETJMP + +#ifndef __cplusplus + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define the buffer type for holding the state information */ + +#define _JBLEN 9 /* bp, di, si, sp, ret addr, ds */ + +#ifndef _JMP_BUF_DEFINED +typedef int jmp_buf[_JBLEN]; +#define _JMP_BUF_DEFINED +#endif + +/* ANSI requires setjmp be a macro */ + +#define setjmp _setjmp + +/* function prototypes */ + +int __cdecl _setjmp(jmp_buf); +void __cdecl longjmp(jmp_buf, int); + +#endif + +#define _INC_SETJMP +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/share.h b/private/oleauto/tools/win16/hdos/c800/include/share.h new file mode 100644 index 000000000..bc5398db4 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/share.h @@ -0,0 +1,29 @@ +/*** +*share.h - defines file sharing modes for sopen +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the file sharing modes for sopen(). +* +****/ + +#ifndef _INC_SHARE + +#define _SH_COMPAT 0x00 /* compatibility mode */ +#define _SH_DENYRW 0x10 /* deny read/write mode */ +#define _SH_DENYWR 0x20 /* deny write mode */ +#define _SH_DENYRD 0x30 /* deny read mode */ +#define _SH_DENYNO 0x40 /* deny none mode */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define SH_COMPAT _SH_COMPAT +#define SH_DENYRW _SH_DENYRW +#define SH_DENYWR _SH_DENYWR +#define SH_DENYRD _SH_DENYRD +#define SH_DENYNO _SH_DENYNO +#endif + +#define _INC_SHARE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/shellapi.h b/private/oleauto/tools/win16/hdos/c800/include/shellapi.h new file mode 100644 index 000000000..af978b924 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/shellapi.h @@ -0,0 +1,88 @@ +/*****************************************************************************\ +* * +* shellapi.h - SHELL.DLL functions, types, and definitions * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_SHELLAPI +#define _INC_SHELLAPI + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* If included with Windows 3.0 windows.h: define 3.1-compatible types */ + +#ifndef _INC_WINDOWS + +#define HDROP HANDLE +#define WINAPI FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD + +#else + +DECLARE_HANDLE(HDROP); + +#endif + +/* return codes from Registration functions */ +#define ERROR_SUCCESS 0L +#define ERROR_BADDB 1L +#define ERROR_BADKEY 2L +#define ERROR_CANTOPEN 3L +#define ERROR_CANTREAD 4L +#define ERROR_CANTWRITE 5L +#define ERROR_OUTOFMEMORY 6L +#define ERROR_INVALID_PARAMETER 7L +#define ERROR_ACCESS_DENIED 8L + +#define REG_SZ 1 /* string type */ + +#define HKEY_CLASSES_ROOT 1 + +typedef DWORD HKEY; +typedef HKEY FAR* PHKEY; + +LONG WINAPI RegOpenKey(HKEY, LPCSTR, HKEY FAR*); +LONG WINAPI RegCreateKey(HKEY, LPCSTR, HKEY FAR*); +LONG WINAPI RegCloseKey(HKEY); +LONG WINAPI RegDeleteKey(HKEY, LPCSTR); +LONG WINAPI RegSetValue(HKEY, LPCSTR, DWORD, LPCSTR, DWORD); +LONG WINAPI RegQueryValue(HKEY, LPCSTR, LPSTR, LONG FAR*); +LONG WINAPI RegEnumKey(HKEY, DWORD, LPSTR, DWORD); + +UINT WINAPI DragQueryFile(HDROP, UINT, LPSTR, UINT); +BOOL WINAPI DragQueryPoint(HDROP, POINT FAR*); +void WINAPI DragFinish(HDROP); +void WINAPI DragAcceptFiles(HWND, BOOL); + +HICON WINAPI ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex); + +/* error values for ShellExecute() beyond the regular WinExec() codes */ +#define SE_ERR_SHARE 26 +#define SE_ERR_ASSOCINCOMPLETE 27 +#define SE_ERR_DDETIMEOUT 28 +#define SE_ERR_DDEFAIL 29 +#define SE_ERR_DDEBUSY 30 +#define SE_ERR_NOASSOC 31 + +HINSTANCE WINAPI ShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int iShowCmd); +HINSTANCE WINAPI FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_SHELLAPI */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/signal.h b/private/oleauto/tools/win16/hdos/c800/include/signal.h new file mode 100644 index 000000000..c8894ef02 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/signal.h @@ -0,0 +1,70 @@ +/*** +*signal.h - defines signal values and routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the signal values and declares the signal functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SIGNAL + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIG_ATOMIC_T_DEFINED +typedef int sig_atomic_t; +#define _SIG_ATOMIC_T_DEFINED +#endif + +#define NSIG 23 /* maximum signal number + 1 */ + + +/* signal types */ + +#ifndef _WINDOWS +#define SIGINT 2 /* Ctrl-C sequence */ +#define SIGILL 4 /* illegal instruction - invalid function image */ +#endif +#define SIGFPE 8 /* floating point exception */ +#ifndef _WINDOWS +#define SIGSEGV 11 /* segment violation */ +#define SIGTERM 15 /* Software termination signal from kill */ +#define SIGABRT 22 /* abnormal termination triggered by abort call */ +#endif + + +/* signal action codes */ + +/* default signal action */ +#define SIG_DFL (void (__cdecl *)(int))0 + +/* ignore */ +#define SIG_IGN (void (__cdecl *)(int))1 + +/* signal error value (returned by signal call on error) */ +#define SIG_ERR (void (__cdecl *)(int))-1 + + +/* function prototypes */ + +void (__cdecl * __cdecl signal(int, + void (__cdecl *)(int)))(int); +#ifndef _MT +int __cdecl raise(int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_SIGNAL +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdarg.h b/private/oleauto/tools/win16/hdos/c800/include/stdarg.h new file mode 100644 index 000000000..f1d6f7ef7 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdarg.h @@ -0,0 +1,52 @@ +/*** +*stdarg.h - defines ANSI-style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines ANSI-style macros for accessing arguments +* of functions which take a variable number of arguments. +* [ANSI] +* +****/ + +#ifndef _INC_STDARG + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_start(ap,v) ap = (va_list)&v + _INTSIZEOF(v) +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif + +#define _INC_STDARG +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stddef.h b/private/oleauto/tools/win16/hdos/c800/include/stddef.h new file mode 100644 index 000000000..2423b1229 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stddef.h @@ -0,0 +1,80 @@ +/*** +*stddef.h - definitions/declarations for common constants, types, variables +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains definitions and declarations for some commonly +* used constants, types, and variables. +* [ANSI] +* +****/ + +#ifndef _INC_STDDEF + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* define the NULL pointer value and the offsetof() macro */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* offset of field m in a struct s */ + +#define offsetof(s,m) (size_t)( (char *)&(((s *)0)->m) - (char *)0 ) + + +/* errno declaration */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +#define errno (*_errno()) +#else +extern int __near __cdecl volatile errno; +#endif + + +/* define the implementation dependent size types */ + +#ifndef _PTRDIFF_T_DEFINED +typedef int ptrdiff_t; +#define _PTRDIFF_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +#ifdef _MT +/* define pointer to thread id value */ + +extern int __far *_threadid; +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDDEF +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdio.h b/private/oleauto/tools/win16/hdos/c800/include/stdio.h new file mode 100644 index 000000000..b968e041c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdio.h @@ -0,0 +1,352 @@ +/*** +*stdio.h - definitions/declarations for standard I/O routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the level 2 I/O ("standard I/O") routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STDIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _VA_LIST_DEFINED +typedef char *va_list; +#define _VA_LIST_DEFINED +#endif + +/* buffered I/O macros */ + +#define BUFSIZ 512 +#ifdef _MT +#define _NFILE 40 +#else +#define _NFILE 20 +#endif +#define EOF (-1) + +#ifndef _FILE_DEFINED +#pragma pack(2) +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + char _flag; + char _file; + }; +typedef struct _iobuf FILE; +#pragma pack() +#define _FILE_DEFINED +#endif + + +/* _P_tmpnam: Directory where temporary files may be created. + * L_tmpnam size = size of _P_tmpdir + * + 1 (in case _P_tmpdir does not end in "\\") + * + 6 (for the temp number string) + * + 1 (for the null terminator) + */ + +#define _P_tmpdir "\\" +#define L_tmpnam sizeof(_P_tmpdir)+8 + + +/* fseek constants */ + +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + + +/* minimum guaranteed filename length, open file count, and unique + * tmpnam filenames. + */ + +#define FILENAME_MAX 128 +#define FOPEN_MAX 18 +#define TMP_MAX 32767 +#define _SYS_OPEN 20 + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* declare _iob[] array */ + +#ifndef _STDIO_DEFINED +extern FILE __near __cdecl _iob[]; +#endif + + +/* define file position type */ + +#ifndef _FPOS_T_DEFINED +typedef long fpos_t; +#define _FPOS_T_DEFINED +#endif + + +/* standard file pointers */ + +#ifndef _WINDLL +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define stderr (&_iob[2]) +#endif +#ifndef _WINDOWS +#define _stdaux (&_iob[3]) +#define _stdprn (&_iob[4]) +#endif + + +#define _IOREAD 0x01 +#define _IOWRT 0x02 + +#define _IOFBF 0x0 +#define _IOLBF 0x40 +#define _IONBF 0x04 + +#define _IOMYBUF 0x08 +#define _IOEOF 0x10 +#define _IOERR 0x20 +#define _IOSTRG 0x40 +#define _IORW 0x80 + + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _QWINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +#ifndef _STDIO_DEFINED +int __cdecl _filbuf(FILE *); +int __cdecl _flsbuf(int, FILE *); +FILE * __cdecl _fsopen(const char *, + const char *, int); +void __cdecl clearerr(FILE *); +int __cdecl fclose(FILE *); +int __cdecl _fcloseall(void); +FILE * __cdecl _fdopen(int, const char *); +int __cdecl feof(FILE *); +int __cdecl ferror(FILE *); +int __cdecl fflush(FILE *); +int __cdecl fgetc(FILE *); +#ifndef _WINDLL +int __cdecl _fgetchar(void); +#endif +int __cdecl fgetpos(FILE *, fpos_t *); +char * __cdecl fgets(char *, int, FILE *); +int __cdecl _fileno(FILE *); +int __cdecl _flushall(void); +FILE * __cdecl fopen(const char *, + const char *); +int __cdecl fprintf(FILE *, const char *, ...); +int __cdecl fputc(int, FILE *); +#ifndef _WINDLL +int __cdecl _fputchar(int); +#endif +int __cdecl fputs(const char *, FILE *); +size_t __cdecl fread(void *, size_t, size_t, FILE *); +FILE * __cdecl freopen(const char *, + const char *, FILE *); +#ifndef _WINDLL +int __cdecl fscanf(FILE *, const char *, ...); +#endif +int __cdecl fsetpos(FILE *, const fpos_t *); +int __cdecl fseek(FILE *, long, int); +long __cdecl ftell(FILE *); +#ifdef _WINDOWS +#ifndef _WINDLL +FILE * __cdecl _fwopen(struct _wopeninfo *, struct _wsizeinfo *, const char *); +#endif +#endif +size_t __cdecl fwrite(const void *, size_t, size_t, + FILE *); +int __cdecl getc(FILE *); +#ifndef _WINDLL +int __cdecl getchar(void); +char * __cdecl gets(char *); +#endif +int __cdecl _getw(FILE *); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +#ifndef _WINDLL +int __cdecl printf(const char *, ...); +#endif +int __cdecl putc(int, FILE *); +#ifndef _WINDLL +int __cdecl putchar(int); +int __cdecl puts(const char *); +#endif +int __cdecl _putw(int, FILE *); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +void __cdecl rewind(FILE *); +int __cdecl _rmtmp(void); +#ifndef _WINDLL +int __cdecl scanf(const char *, ...); +#endif +void __cdecl setbuf(FILE *, char *); +int __cdecl setvbuf(FILE *, char *, int, size_t); +int __cdecl _snprintf(char *, size_t, const char *, ...); +int __cdecl sprintf(char *, const char *, ...); +#ifndef _WINDLL +int __cdecl sscanf(const char *, const char *, ...); +#endif +char * __cdecl _tempnam(char *, char *); +FILE * __cdecl tmpfile(void); +char * __cdecl tmpnam(char *); +int __cdecl ungetc(int, FILE *); +int __cdecl _unlink(const char *); +int __cdecl vfprintf(FILE *, const char *, va_list); +#ifndef _WINDLL +int __cdecl vprintf(const char *, va_list); +#endif +int __cdecl _vsnprintf(char *, size_t, const char *, va_list); +int __cdecl vsprintf(char *, const char *, va_list); +#define _STDIO_DEFINED +#endif + +/* macro definitions */ + +#define feof(_stream) ((_stream)->_flag & _IOEOF) +#define ferror(_stream) ((_stream)->_flag & _IOERR) +#define _fileno(_stream) ((int)(unsigned char)(_stream)->_file) +#define getc(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ \ + : _filbuf(_stream)) +#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \ + ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) +#ifndef _WINDLL +#define getchar() getc(stdin) +#define putchar(_c) putc((_c),stdout) +#endif + +#ifdef _MT +#undef getc +#undef putc +#undef getchar +#undef putchar +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_tmpdir _P_tmpdir +#define SYS_OPEN _SYS_OPEN + +#ifndef _WINDOWS +#define stdaux _stdaux +#define stdprn _stdprn +#endif + +int __cdecl fcloseall(void); +FILE * __cdecl fdopen(int, const char *); +#ifndef _WINDLL +int __cdecl fgetchar(void); +#endif +int __cdecl fileno(FILE *); +int __cdecl flushall(void); +#ifndef _WINDLL +int __cdecl fputchar(int); +#endif +int __cdecl getw(FILE *); +int __cdecl putw(int, FILE *); +int __cdecl rmtmp(void); +char * __cdecl tempnam(char *, char *); +int __cdecl unlink(const char *); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDIO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h b/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h new file mode 100644 index 000000000..ac8d3e744 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h @@ -0,0 +1,55 @@ +/*** +*stdiostr.h - definitions/declarations for stdiobuf, stdiostream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the stdiostream and stdiobuf classes. +* [AT&T C++] +* +****/ + +#include <iostream.h> +#include <stdio.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifndef _INC_STDIOSTREAM +#define _INC_STDIOSTREAM +class stdiobuf : public streambuf { +public: + stdiobuf(FILE* f); +FILE * stdiofile() { return _str; } + +virtual int pbackfail(int c); +virtual int overflow(int c = EOF); +virtual int underflow(); +virtual streampos seekoff( streamoff, ios::seek_dir, int =ios::in|ios::out); +virtual int sync(); + ~stdiobuf(); + int setrwbuf(int _rsize, int _wsize); // CONSIDER: move to ios:: +// protected: +// virtual int doallocate(); +private: + FILE * _str; +}; + +// obsolescent +class stdiostream : public iostream { // note: spec.'d as : public IOS... +public: + stdiostream(FILE *); + ~stdiostream(); + stdiobuf* rdbuf() const { return (stdiobuf*) ostream::rdbuf(); } + +private: +}; + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdlib.h b/private/oleauto/tools/win16/hdos/c800/include/stdlib.h new file mode 100644 index 000000000..d32171a05 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdlib.h @@ -0,0 +1,282 @@ +/*** +*stdlib.h - declarations/definitions for commonly used library functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* commonly used library functions which either don't fit somewhere +* else, or, like toupper/tolower, can't be declared in the normal +* place for other reasons. +* [ANSI] +* +****/ + +#ifndef _INC_STDLIB + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* exit() arg values */ + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +#ifndef _ONEXIT_T_DEFINED +typedef int (__cdecl * _onexit_t)(); +typedef int (__far __cdecl * _fonexit_t)(); +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef int (__cdecl * onexit_t)(); +#endif +#define _ONEXIT_T_DEFINED +#endif + + +/* data structure definitions for div and ldiv runtimes. */ + +#ifndef _DIV_T_DEFINED + +typedef struct _div_t { + int quot; + int rem; +} div_t; + +typedef struct _ldiv_t { + long quot; + long rem; +} ldiv_t; + +#define _DIV_T_DEFINED +#endif + +/* maximum value that can be returned by the rand function. */ + +#define RAND_MAX 0x7fff + +extern unsigned short __mb_cur_max; /* mb-len for curr. locale */ +#define MB_CUR_MAX __mb_cur_max + + +/* min and max macros */ + +#define __max(a,b) (((a) > (b)) ? (a) : (b)) +#define __min(a,b) (((a) < (b)) ? (a) : (b)) + + +/* sizes for buffers used by the _makepath() and _splitpath() functions. + * note that the sizes include space for 0-terminator + */ + +#define _MAX_PATH 260 /* max. length of full pathname */ +#define _MAX_DRIVE 3 /* max. length of drive component */ +#define _MAX_DIR 256 /* max. length of path component */ +#define _MAX_FNAME 256 /* max. length of file name component */ +#define _MAX_EXT 256 /* max. length of extension component */ + +/* external variable declarations */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +extern int __far * __cdecl __far __doserrno(void); +#define errno (*_errno()) +#define _doserrno (*__doserrno()) +#else +extern int __near __cdecl volatile errno; /* error value */ +extern int __near __cdecl _doserrno; /* OS system error value */ +#endif + +extern char * __near __cdecl _sys_errlist[]; /* perror error message table */ +extern int __near __cdecl _sys_nerr; /* # of entries in sys_errlist table */ +extern char ** __near __cdecl _environ; /* pointer to environment table */ +extern int __near __cdecl _fmode; /* default file translation mode */ +#ifndef _WINDOWS +extern int __near __cdecl _fileinfo; /* open file info mode (for spawn) */ +#endif + +extern unsigned int __near __cdecl _psp; /* Program Segment Prefix */ + +extern char __far * __near __cdecl _pgmptr; /* Pointer to Program name */ + +/* DOS and Windows major/minor version numbers */ + +extern unsigned int __near __cdecl _osver; +extern unsigned char __near __cdecl _osmajor; +extern unsigned char __near __cdecl _osminor; +extern unsigned int __near __cdecl _winver; +extern unsigned char __near __cdecl _winmajor; +extern unsigned char __near __cdecl _winminor; + +/* OS mode */ + +#define _DOS_MODE 0 /* DOS */ +#define _OS2_MODE 1 /* OS/2 */ +#define _WIN_MODE 2 /* Windows */ + +extern unsigned char __near __cdecl _osmode; + +/* CPU mode */ + +#define _REAL_MODE 0 /* real mode */ +#define _PROT_MODE 1 /* protect mode */ + +extern unsigned char __near __cdecl _cpumode; + +/* function prototypes */ + +#ifdef _MT +double __pascal atof(const char *); +double __pascal strtod(const char *, char * *); +ldiv_t __pascal ldiv(long, long); +#else +double __cdecl atof(const char *); +double __cdecl strtod(const char *, char * *); +ldiv_t __cdecl ldiv(long, long); +#endif + +void __cdecl abort(void); +int __cdecl abs(int); +int __cdecl atexit(void (__cdecl *)(void)); +int __cdecl atoi(const char *); +long __cdecl atol(const char *); +long double __cdecl _atold(const char *); +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl calloc(size_t, size_t); +div_t __cdecl div(int, int); +char * __cdecl _ecvt(double, int, int *, int *); +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __far __cdecl _fatexit(void (__cdecl __far *)(void)); +char * __cdecl _fcvt(double, int, int *, int *); +_fonexit_t __far __cdecl _fonexit(_fonexit_t); +void __cdecl free(void *); +char * __cdecl _fullpath(char *, const char *, + size_t); +char * __cdecl _gcvt(double, int, char *); +char * __cdecl getenv(const char *); +char * __cdecl _itoa(int, char *, int); +long __cdecl labs(long); +unsigned long __cdecl _lrotl(unsigned long, int); +unsigned long __cdecl _lrotr(unsigned long, int); +char * __cdecl _ltoa(long, char *, int); +void __cdecl _makepath(char *, const char *, + const char *, const char *, const char *); +void * __cdecl malloc(size_t); +_onexit_t __cdecl _onexit(_onexit_t); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +int __cdecl _putenv(const char *); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); +unsigned int __cdecl _rotl(unsigned int, int); +unsigned int __cdecl _rotr(unsigned int, int); +int __cdecl rand(void); +void * __cdecl realloc(void *, size_t); +void __cdecl _searchenv(const char *, const char *, + char *); +void __cdecl _splitpath(const char *, char *, + char *, char *, char *); +void __cdecl srand(unsigned int); +long __cdecl strtol(const char *, char * *, + int); +long double __cdecl _strtold(const char *, + char * *); +unsigned long __cdecl strtoul(const char *, + char * *, int); +void __cdecl _swab(char *, char *, int); +#ifndef _WINDOWS +int __cdecl system(const char *); +#endif +char * __cdecl _ultoa(unsigned long, char *, int); + +int __cdecl mblen(const char *, size_t); +int __cdecl mbtowc(wchar_t *, const char *, size_t); +int __cdecl wctomb(char *, wchar_t); +size_t __cdecl mbstowcs(wchar_t *, const char *, size_t); +size_t __cdecl wcstombs(char *, const wchar_t *, size_t); + +/* model-independent function prototypes */ + +int __far __cdecl _fmblen(const char __far *, size_t); +int __far __cdecl _fmbtowc(wchar_t __far *, const char __far *, + size_t); +int __far __cdecl _fwctomb(char __far *, wchar_t); +size_t __far __cdecl _fmbstowcs(wchar_t __far *, const char __far *, + size_t); +size_t __far __cdecl _fwcstombs(char __far *, const wchar_t __far *, + size_t); + +#ifndef tolower +int __cdecl tolower(int); +#endif + +#ifndef toupper +int __cdecl toupper(int); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#ifndef __cplusplus +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +extern char * __near __cdecl sys_errlist[]; +extern int __near __cdecl sys_nerr; +extern char ** __near __cdecl environ; + +#define DOS_MODE _DOS_MODE +#define OS2_MODE _OS2_MODE + +char * __cdecl ecvt(double, int, int *, int *); +char * __cdecl fcvt(double, int, int *, int *); +char * __cdecl gcvt(double, int, char *); +char * __cdecl itoa(int, char *, int); +char * __cdecl ltoa(long, char *, int); +onexit_t __cdecl onexit(onexit_t); +int __cdecl putenv(const char *); +void __cdecl swab(char *, char *, int); +char * __cdecl ultoa(unsigned long, char *, int); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDLIB +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/streamb.h b/private/oleauto/tools/win16/hdos/c800/include/streamb.h new file mode 100644 index 000000000..5ac1b51ce --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/streamb.h @@ -0,0 +1,142 @@ +/*** +*streamb.h - definitions/declarations for the streambuf class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the streambuf class. +* [AT&T C++] +* +****/ + +#ifndef _INC_STREAMB +#define _INC_STREAMB + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +typedef long streampos, streamoff; + +class streambuf { +public: + + virtual ~streambuf(); + + inline int in_avail() const; + inline int out_waiting() const; + int sgetc(); + int snextc(); + int sbumpc(); + void stossc(); + + inline int sputbackc(char); + + inline int sputc(int); + inline int sputn(const char _HFAR_ *,int); + inline int sgetn(char _HFAR_ *,int); + + virtual int sync(); + +// enum seek_dir { beg=0, cur=1, end=2 }; // CONSIDER: needed ??? + + virtual streambuf* setbuf(char _HFAR_ *, int); + virtual streampos seekoff(streamoff,ios::seek_dir,int =ios::in|ios::out); + virtual streampos seekpos(streampos,int =ios::in|ios::out); + + virtual int xsputn(const char _HFAR_ *,int); + virtual int xsgetn(char _HFAR_ *,int); + + virtual int overflow(int =EOF) = 0; // pure virtual function + virtual int underflow() = 0; // pure virtual function + + virtual int pbackfail(int); + + void dbp(); + +protected: + streambuf(); + streambuf(char _HFAR_ *,int); + + inline char _HFAR_ * base() const; + inline char _HFAR_ * ebuf() const; + inline char _HFAR_ * pbase() const; + inline char _HFAR_ * pptr() const; + inline char _HFAR_ * epptr() const; + inline char _HFAR_ * eback() const; + inline char _HFAR_ * gptr() const; + inline char _HFAR_ * egptr() const; + inline int blen() const; + inline void setp(char _HFAR_ *,char _HFAR_ *); + inline void setg(char _HFAR_ *,char _HFAR_ *,char _HFAR_ *); + inline void pbump(int); + inline void gbump(int); + + void setb(char _HFAR_ *,char _HFAR_ *,int =0); + inline int unbuffered() const; + inline void unbuffered(int); + int allocate(); + virtual int doallocate(); + +private: + int _fAlloc; + int _fUnbuf; + int x_lastc; + char _HFAR_ * _base; + char _HFAR_ * _ebuf; + char _HFAR_ * _pbase; + char _HFAR_ * _pptr; + char _HFAR_ * _epptr; + char _HFAR_ * _eback; + char _HFAR_ * _gptr; + char _HFAR_ * _egptr; +}; + +inline int streambuf::in_avail() const { return (gptr()<_egptr) ? (_egptr-gptr()) : 0; } +inline int streambuf::out_waiting() const { return (_pptr>=_pbase) ? (_pptr-_pbase) : 0; } + +inline int streambuf::sputbackc(char _c){ return (_eback<gptr()) ? *(--_gptr)=_c : pbackfail(_c); } + +inline int streambuf::sputc(int _i){ return (_pptr<_epptr) ? (unsigned char)(*(_pptr++)=(char)_i) : overflow(_i); } + +inline int streambuf::sputn(const char _HFAR_ * _str,int _n) { return xsputn(_str, _n); } +inline int streambuf::sgetn(char _HFAR_ * _str,int _n) { return xsgetn(_str, _n); } + +inline char _HFAR_ * streambuf::base() const { return _base; } +inline char _HFAR_ * streambuf::ebuf() const { return _ebuf; } +inline int streambuf::blen() const {return ((_ebuf > _base) ? (_ebuf-_base) : 0); } +inline char _HFAR_ * streambuf::pbase() const { return _pbase; } +inline char _HFAR_ * streambuf::pptr() const { return _pptr; } +inline char _HFAR_ * streambuf::epptr() const { return _epptr; } +inline char _HFAR_ * streambuf::eback() const { return _eback; } +inline char _HFAR_ * streambuf::gptr() const { return _gptr; } +inline char _HFAR_ * streambuf::egptr() const { return _egptr; } +inline void streambuf::gbump(int n) { if (_egptr) _gptr += n; } +inline void streambuf::pbump(int n) { if (_epptr) _pptr += n; } +inline void streambuf::setg(char _HFAR_ * eb, char _HFAR_ * g, char _HFAR_ * eg) {_eback=eb; _gptr=g; _egptr=eg; x_lastc=EOF; } +inline void streambuf::setp(char _HFAR_ * p, char _HFAR_ * ep) {_pptr=_pbase=p; _epptr=ep; } +inline int streambuf::unbuffered() const { return _fUnbuf; } +inline void streambuf::unbuffered(int fUnbuf) { _fUnbuf = fUnbuf; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stress.h b/private/oleauto/tools/win16/hdos/c800/include/stress.h new file mode 100644 index 000000000..388683e78 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stress.h @@ -0,0 +1,56 @@ +/*****************************************************************************\ +* * +* stress.h - Stress functions definitions * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +*******************************************************************************/ + +#ifndef _INC_STRESS +#define _INC_STRESS + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** Simple types & common helper macros *********************************/ + +#ifndef _INC_WINDOWS /* If included with 3.0 headers... */ +#define UINT WORD +#define WINAPI FAR PASCAL +#endif /* _INC_WINDOWS */ + +/* stuff for AllocDiskSpace() */ +#define EDS_WIN 1 +#define EDS_CUR 2 +#define EDS_TEMP 3 + + +/* function prototypes */ +BOOL WINAPI AllocMem(DWORD); +void WINAPI FreeAllMem(void); +int WINAPI AllocFileHandles(int); +void WINAPI UnAllocFileHandles(void); +int WINAPI GetFreeFileHandles(void); +int WINAPI AllocDiskSpace(long,UINT); +void WINAPI UnAllocDiskSpace(UINT); +BOOL WINAPI AllocUserMem(UINT); +void WINAPI FreeAllUserMem(void); +BOOL WINAPI AllocGDIMem(UINT); +void WINAPI FreeAllGDIMem(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_STRESS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/string.h b/private/oleauto/tools/win16/hdos/c800/include/string.h new file mode 100644 index 000000000..961417a72 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/string.h @@ -0,0 +1,167 @@ +/*** +*string.h - declarations for string manipulation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the string +* manipulation functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STRING + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memcpy(void *, const void *, + size_t); +void * __cdecl memmove(void *, const void *, + size_t); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +char * __cdecl strcat(char *, const char *); +char * __cdecl strchr(const char *, int); +int __cdecl strcmp(const char *, const char *); +int __cdecl _strcmpi(const char *, const char *); +int __cdecl strcoll(const char *, const char *); +int __cdecl _stricmp(const char *, const char *); +char * __cdecl strcpy(char *, const char *); +size_t __cdecl strcspn(const char *, const char *); +char * __cdecl _strdup(const char *); +char * __cdecl _strerror(const char *); +char * __cdecl strerror(int); +size_t __cdecl strlen(const char *); +char * __cdecl _strlwr(char *); +char * __cdecl strncat(char *, const char *, + size_t); +int __cdecl strncmp(const char *, const char *, + size_t); +int __cdecl _strnicmp(const char *, const char *, + size_t); +char * __cdecl strncpy(char *, const char *, + size_t); +char * __cdecl _strnset(char *, int, size_t); +char * __cdecl strpbrk(const char *, + const char *); +char * __cdecl strrchr(const char *, int); +char * __cdecl _strrev(char *); +char * __cdecl _strset(char *, int); +size_t __cdecl strspn(const char *, const char *); +char * __cdecl strstr(const char *, + const char *); +char * __cdecl strtok(char *, const char *); +char * __cdecl _strupr(char *); +size_t __cdecl strxfrm (char *, const char *, + size_t); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemmove(void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); +char __far * __far __cdecl _fstrcat(char __far *, const char __far *); +char __far * __far __cdecl _fstrchr(const char __far *, int); +int __far __cdecl _fstrcmp(const char __far *, const char __far *); +int __far __cdecl _fstricmp(const char __far *, const char __far *); +char __far * __far __cdecl _fstrcpy(char __far *, const char __far *); +size_t __far __cdecl _fstrcspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrdup(const char __far *); +char __near * __far __cdecl _nstrdup(const char __far *); +size_t __far __cdecl _fstrlen(const char __far *); +char __far * __far __cdecl _fstrlwr(char __far *); +char __far * __far __cdecl _fstrncat(char __far *, const char __far *, + size_t); +int __far __cdecl _fstrncmp(const char __far *, const char __far *, + size_t); +int __far __cdecl _fstrnicmp(const char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrncpy(char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrnset(char __far *, int, size_t); +char __far * __far __cdecl _fstrpbrk(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrrchr(const char __far *, int); +char __far * __far __cdecl _fstrrev(char __far *); +char __far * __far __cdecl _fstrset(char __far *, int); +size_t __far __cdecl _fstrspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrstr(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrtok(char __far *, const char __far *); +char __far * __far __cdecl _fstrupr(char __far *); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +int __cdecl strcmpi(const char *, const char *); +int __cdecl stricmp(const char *, const char *); +char * __cdecl strdup(const char *); +char * __cdecl strlwr(char *); +int __cdecl strnicmp(const char *, const char *, + size_t); +char * __cdecl strnset(char *, int, size_t); +char * __cdecl strrev(char *); +char * __cdecl strset(char *, int); +char * __cdecl strupr(char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STRING +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/strstrea.h b/private/oleauto/tools/win16/hdos/c800/include/strstrea.h new file mode 100644 index 000000000..640fc06eb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/strstrea.h @@ -0,0 +1,95 @@ +/*** +*strstream.h - definitions/declarations for strstreambuf, strstream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the strstream and strstreambuf classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_STRSTREAM +#define _INC_STRSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +class strstreambuf : public streambuf { +public: + strstreambuf(); + strstreambuf(int); + strstreambuf(char _HFAR_ *, int, char _HFAR_ * = 0); + strstreambuf(unsigned char _HFAR_ *, int, unsigned char _HFAR_ * = 0); + strstreambuf(signed char _HFAR_ _HFAR_ *, int, signed char _HFAR_ * = 0); + strstreambuf(void _HFAR_ * (*a)(long), void (*f) (void _HFAR_ *)); + ~strstreambuf(); + + void freeze(int =1); + char _HFAR_ * str(); + +virtual int overflow(int); +virtual int underflow(); +virtual streambuf* setbuf(char _HFAR_ *, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +virtual int sync(); // not in spec. + +protected: +virtual int doallocate(); +private: + int x_dynamic; + int x_bufmin; + int _fAlloc; + int x_static; + void _HFAR_ * (* x_alloc)(long); + void (* x_free)(void _HFAR_ *); +}; + +class istrstream : public istream { +public: + istrstream(char _HFAR_ *); + istrstream(char _HFAR_ *, int); + ~istrstream(); + +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +class ostrstream : public ostream { +public: + ostrstream(); + ostrstream(char _HFAR_ *, int, int = ios::out); + ~ostrstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +class strstream : public iostream { // strstreambase ??? +public: + strstream(); + strstream(char _HFAR_ *, int, int); + ~strstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } // not in spec. +inline strstreambuf* rdbuf() const { return (strstreambuf*) ostream::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/time.h b/private/oleauto/tools/win16/hdos/c800/include/time.h new file mode 100644 index 000000000..edbb46b06 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/time.h @@ -0,0 +1,129 @@ +/*** +*time.h - definitions/declarations for time routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the various declarations and definitions +* for the time routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_TIME + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* implementation defined time types */ + +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED +#endif + +#ifndef _CLOCK_T_DEFINED +typedef long clock_t; +#define _CLOCK_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* structure for use with localtime(), gmtime(), etc. */ + +#ifndef _TM_DEFINED +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; +#define _TM_DEFINED +#endif + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* clock ticks macro - ANSI version */ + +#define CLOCKS_PER_SEC 1000 + + +/* extern declarations for the global variables used by the ctime family of + * routines. + */ + +extern int __near __cdecl _daylight; /* non-zero if daylight savings time is used */ +extern long __near __cdecl _timezone; /* difference in seconds between GMT and local time */ +extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */ + + +/* function prototypes */ + +#ifdef _MT +double __pascal difftime(time_t, time_t); +#else +double __cdecl difftime(time_t, time_t); +#endif + +char * __cdecl asctime(const struct tm *); +char * __cdecl ctime(const time_t *); +#ifndef _WINDLL +clock_t __cdecl clock(void); +#endif +struct tm * __cdecl gmtime(const time_t *); +struct tm * __cdecl localtime(const time_t *); +time_t __cdecl mktime(struct tm *); +#ifndef _WINDLL +size_t __cdecl strftime(char *, size_t, const char *, + const struct tm *); +#endif +char * __cdecl _strdate(char *); +char * __cdecl _strtime(char *); +time_t __cdecl time(time_t *); +void __cdecl _tzset(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define CLK_TCK CLOCKS_PER_SEC + +extern int __near __cdecl daylight; +extern long __near __cdecl timezone; +extern char * __near __cdecl tzname[2]; + +void __cdecl tzset(void); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_TIME +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h new file mode 100644 index 000000000..25b918f80 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h @@ -0,0 +1,469 @@ +/*****************************************************************************\ +* * +* toolhelp.h - toolhelp.dll functions, types, and definitions * +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_TOOLHELP +#define _INC_TOOLHELP + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If included with 3.0 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#define HTASK HANDLE +#endif /* _INC_WINDOWS */ + +/****** General symbols ******************************************************/ +#define MAX_DATA 11 +#define MAX_PATH 255 +#define MAX_MODULE_NAME 8 + 1 +#define MAX_CLASSNAME 255 + +/****** Global heap walking ***************************************************/ +typedef struct tagGLOBALINFO +{ + DWORD dwSize; + WORD wcItems; + WORD wcItemsFree; + WORD wcItemsLRU; +} GLOBALINFO; + +typedef struct tagGLOBALENTRY +{ + DWORD dwSize; + DWORD dwAddress; + DWORD dwBlockSize; + HGLOBAL hBlock; + WORD wcLock; + WORD wcPageLock; + WORD wFlags; + BOOL wHeapPresent; + HGLOBAL hOwner; + WORD wType; + WORD wData; + DWORD dwNext; + DWORD dwNextAlt; +} GLOBALENTRY; + +/* GlobalFirst()/GlobalNext() flags */ +#define GLOBAL_ALL 0 +#define GLOBAL_LRU 1 +#define GLOBAL_FREE 2 + +/* GLOBALENTRY.wType entries */ +#define GT_UNKNOWN 0 +#define GT_DGROUP 1 +#define GT_DATA 2 +#define GT_CODE 3 +#define GT_TASK 4 +#define GT_RESOURCE 5 +#define GT_MODULE 6 +#define GT_FREE 7 +#define GT_INTERNAL 8 +#define GT_SENTINEL 9 +#define GT_BURGERMASTER 10 + +/* If GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: */ +#define GD_USERDEFINED 0 +#define GD_CURSORCOMPONENT 1 +#define GD_BITMAP 2 +#define GD_ICONCOMPONENT 3 +#define GD_MENU 4 +#define GD_DIALOG 5 +#define GD_STRING 6 +#define GD_FONTDIR 7 +#define GD_FONT 8 +#define GD_ACCELERATORS 9 +#define GD_RCDATA 10 +#define GD_ERRTABLE 11 +#define GD_CURSOR 12 +#define GD_ICON 14 +#define GD_NAMETABLE 15 +#define GD_MAX_RESOURCE 15 + +/* GLOBALENTRY.wFlags */ +#define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */ + +BOOL WINAPI GlobalInfo(GLOBALINFO FAR* lpGlobalInfo); +BOOL WINAPI GlobalFirst(GLOBALENTRY FAR* lpGlobal, WORD wFlags); +BOOL WINAPI GlobalNext(GLOBALENTRY FAR* lpGlobal, WORD wFlags); +BOOL WINAPI GlobalEntryHandle(GLOBALENTRY FAR* lpGlobal, HGLOBAL hItem); +BOOL WINAPI GlobalEntryModule(GLOBALENTRY FAR* lpGlobal, HMODULE hModule, WORD wSeg); +WORD WINAPI GlobalHandleToSel(HGLOBAL hMem); + +/****** Local heap walking ***************************************************/ + +typedef struct tagLOCALINFO +{ + DWORD dwSize; + WORD wcItems; +} LOCALINFO; + +typedef struct tagLOCALENTRY +{ + DWORD dwSize; + HLOCAL hHandle; + WORD wAddress; + WORD wSize; + WORD wFlags; + WORD wcLock; + WORD wType; + WORD hHeap; + WORD wHeapType; + WORD wNext; +} LOCALENTRY; + +/* LOCALENTRY.wHeapType flags */ +#define NORMAL_HEAP 0 +#define USER_HEAP 1 +#define GDI_HEAP 2 + +/* LOCALENTRY.wFlags */ +#define LF_FIXED 1 +#define LF_FREE 2 +#define LF_MOVEABLE 4 + +/* LOCALENTRY.wType */ +#define LT_NORMAL 0 +#define LT_FREE 0xff +#define LT_GDI_PEN 1 /* LT_GDI_* is for GDI's heap */ +#define LT_GDI_BRUSH 2 +#define LT_GDI_FONT 3 +#define LT_GDI_PALETTE 4 +#define LT_GDI_BITMAP 5 +#define LT_GDI_RGN 6 +#define LT_GDI_DC 7 +#define LT_GDI_DISABLED_DC 8 +#define LT_GDI_METADC 9 +#define LT_GDI_METAFILE 10 +#define LT_GDI_MAX LT_GDI_METAFILE +#define LT_USER_CLASS 1 /* LT_USER_* is for USER's heap */ +#define LT_USER_WND 2 +#define LT_USER_STRING 3 +#define LT_USER_MENU 4 +#define LT_USER_CLIP 5 +#define LT_USER_CBOX 6 +#define LT_USER_PALETTE 7 +#define LT_USER_ED 8 +#define LT_USER_BWL 9 +#define LT_USER_OWNERDRAW 10 +#define LT_USER_SPB 11 +#define LT_USER_CHECKPOINT 12 +#define LT_USER_DCE 13 +#define LT_USER_MWP 14 +#define LT_USER_PROP 15 +#define LT_USER_LBIV 16 +#define LT_USER_MISC 17 +#define LT_USER_ATOMS 18 +#define LT_USER_LOCKINPUTSTATE 19 +#define LT_USER_HOOKLIST 20 +#define LT_USER_USERSEEUSERDOALLOC 21 +#define LT_USER_HOTKEYLIST 22 +#define LT_USER_POPUPMENU 23 +#define LT_USER_HANDLETABLE 32 +#define LT_USER_MAX LT_USER_HANDLETABLE + +BOOL WINAPI LocalInfo(LOCALINFO FAR* lpLocal, HGLOBAL hHeap); +BOOL WINAPI LocalFirst(LOCALENTRY FAR* lpLocal, HGLOBAL hHeap); +BOOL WINAPI LocalNext(LOCALENTRY FAR* lpLocal); + +/****** Stack Tracing ********************************************************/ + +typedef struct tagSTACKTRACEENTRY +{ + DWORD dwSize; + HTASK hTask; + WORD wSS; + WORD wBP; + WORD wCS; + WORD wIP; + HMODULE hModule; + WORD wSegment; + WORD wFlags; +} STACKTRACEENTRY; + +/* STACKTRACEENTRY.wFlags values */ +#define FRAME_FAR 0 +#define FRAME_NEAR 1 + +BOOL WINAPI StackTraceFirst(STACKTRACEENTRY FAR* lpStackTrace, HTASK hTask); +BOOL WINAPI StackTraceCSIPFirst(STACKTRACEENTRY FAR* lpStackTrace, + WORD wSS, WORD wCS, WORD wIP, WORD wBP); +BOOL WINAPI StackTraceNext(STACKTRACEENTRY FAR* lpStackTrace); + +/****** Module list walking **************************************************/ + +typedef struct tagMODULEENTRY +{ + DWORD dwSize; + char szModule[MAX_MODULE_NAME + 1]; + HMODULE hModule; + WORD wcUsage; + char szExePath[MAX_PATH + 1]; + WORD wNext; +} MODULEENTRY; + +BOOL WINAPI ModuleFirst(MODULEENTRY FAR* lpModule); +BOOL WINAPI ModuleNext(MODULEENTRY FAR* lpModule); +HMODULE WINAPI ModuleFindName(MODULEENTRY FAR* lpModule, LPCSTR lpstrName); +HMODULE WINAPI ModuleFindHandle(MODULEENTRY FAR* lpModule, HMODULE hModule); + +/****** Task list walking *****************************************************/ + +typedef struct tagTASKENTRY +{ + DWORD dwSize; + HTASK hTask; + HTASK hTaskParent; + HINSTANCE hInst; + HMODULE hModule; + WORD wSS; + WORD wSP; + WORD wStackTop; + WORD wStackMinimum; + WORD wStackBottom; + WORD wcEvents; + HGLOBAL hQueue; + char szModule[MAX_MODULE_NAME + 1]; + WORD wPSPOffset; + HANDLE hNext; +} TASKENTRY; + +BOOL WINAPI TaskFirst(TASKENTRY FAR* lpTask); +BOOL WINAPI TaskNext(TASKENTRY FAR* lpTask); +BOOL WINAPI TaskFindHandle(TASKENTRY FAR* lpTask, HTASK hTask); +DWORD WINAPI TaskSetCSIP(HTASK hTask, WORD wCS, WORD wIP); +DWORD WINAPI TaskGetCSIP(HTASK hTask); +BOOL WINAPI TaskSwitch(HTASK hTask, DWORD dwNewCSIP); + +/****** Window Class enumeration **********************************************/ + +typedef struct tagCLASSENTRY +{ + DWORD dwSize; + HMODULE hInst; /* This is really an hModule */ + char szClassName[MAX_CLASSNAME + 1]; + WORD wNext; +} CLASSENTRY; + +BOOL WINAPI ClassFirst(CLASSENTRY FAR* lpClass); +BOOL WINAPI ClassNext(CLASSENTRY FAR* lpClass); + +/****** Information functions *************************************************/ + +typedef struct tagMEMMANINFO +{ + DWORD dwSize; + DWORD dwLargestFreeBlock; + DWORD dwMaxPagesAvailable; + DWORD dwMaxPagesLockable; + DWORD dwTotalLinearSpace; + DWORD dwTotalUnlockedPages; + DWORD dwFreePages; + DWORD dwTotalPages; + DWORD dwFreeLinearSpace; + DWORD dwSwapFilePages; + WORD wPageSize; +} MEMMANINFO; + +BOOL WINAPI MemManInfo(MEMMANINFO FAR* lpEnhMode); + +typedef struct tagSYSHEAPINFO +{ + DWORD dwSize; + WORD wUserFreePercent; + WORD wGDIFreePercent; + HGLOBAL hUserSegment; + HGLOBAL hGDISegment; +} SYSHEAPINFO; + +BOOL WINAPI SystemHeapInfo(SYSHEAPINFO FAR* lpSysHeap); + +/****** Interrupt Handling ****************************************************/ + +/* Hooked interrupts */ +#define INT_DIV0 0 +#define INT_1 1 +#define INT_3 3 +#define INT_UDINSTR 6 +#define INT_STKFAULT 12 +#define INT_GPFAULT 13 +#define INT_BADPAGEFAULT 14 +#define INT_CTLALTSYSRQ 256 + +/* TOOLHELP Interrupt callbacks registered with InterruptRegister should + * always be written in assembly language. The stack frame is not + * compatible with high level language conventions. + * + * This stack frame looks as follows to the callback. All registers + * should be preserved across this callback to allow restarting fault. + * ------------ + * | Flags | [SP + 0Eh] + * | CS | [SP + 0Ch] + * | IP | [SP + 0Ah] + * | Handle | [SP + 08h] + * |Exception#| [SP + 06h] + * | AX | [SP + 04h] AX Saved to allow MakeProcInstance + * | Ret CS | [SP + 02h] + * SP---> | Ret IP | [SP + 00h] + * ------------ + */ +BOOL WINAPI InterruptRegister(HTASK hTask, FARPROC lpfnIntCallback); +BOOL WINAPI InterruptUnRegister(HTASK hTask); + +/* Notifications: + * When a notification callback is called, two parameters are passed + * in: a WORD, wID, and another DWORD, dwData. wID is one of + * the values NFY_* below. Callback routines should ignore unrecog- + * nized values to preserve future compatibility. Callback routines + * are also passed a dwData value. This may contain data or may be + * a FAR pointer to a structure, or may not be used depending on + * which notification is being received. + * + * In all cases, if the return value of the callback is TRUE, the + * notification will NOT be passed on to other callbacks. It has + * been handled. This should be used sparingly and only with certain + * notifications. Callbacks almost always return FALSE. + */ + +/* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps + * should ignore these. + */ +#define NFY_UNKNOWN 0 + +/* NFY_LOADSEG: dwData points to a NFYLOADSEG structure */ +#define NFY_LOADSEG 1 +typedef struct tagNFYLOADSEG +{ + DWORD dwSize; + WORD wSelector; + WORD wSegNum; + WORD wType; /* Low bit set if data seg, clear if code seg */ + WORD wcInstance; /* Instance count ONLY VALID FOR DATA SEG */ + LPCSTR lpstrModuleName; +} NFYLOADSEG; + +/* NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed */ +#define NFY_FREESEG 2 + +/* NFY_STARTDLL: dwData points to a NFYLOADSEG structure */ +#define NFY_STARTDLL 3 +typedef struct tagNFYSTARTDLL +{ + DWORD dwSize; + HMODULE hModule; + WORD wCS; + WORD wIP; +} NFYSTARTDLL; + +/* NFY_STARTTASK: dwData is the CS:IP of the start address of the task */ +#define NFY_STARTTASK 4 + +/* NFY_EXITTASK: The low byte of dwData contains the program exit code */ +#define NFY_EXITTASK 5 + +/* NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed */ +#define NFY_DELMODULE 6 + +/* NFY_RIP: dwData points to a NFYRIP structure */ +#define NFY_RIP 7 +typedef struct tagNFYRIP +{ + DWORD dwSize; + WORD wIP; + WORD wCS; + WORD wSS; + WORD wBP; + WORD wExitCode; +} NFYRIP; + +/* NFY_TASKIN: No data. Callback should do GetCurrentTask() */ +#define NFY_TASKIN 8 + +/* NFY_TASKOUT: No data. Callback should do GetCurrentTask() */ +#define NFY_TASKOUT 9 + +/* NFY_INCHAR: Return value from callback is used. If NULL, mapped to 'i' */ +#define NFY_INCHAR 10 + +/* NFY_OUTSTR: dwData points to the string to be displayed */ +#define NFY_OUTSTR 11 + +/* NFY_LOGERROR: dwData points to a NFYLOGERROR struct */ +#define NFY_LOGERROR 12 +typedef struct tagNFYLOGERROR +{ + DWORD dwSize; + UINT wErrCode; + void FAR* lpInfo; /* Error code-dependent */ +} NFYLOGERROR; + +/* NFY_LOGPARAMERROR: dwData points to a NFYLOGPARAMERROR struct */ +#define NFY_LOGPARAMERROR 13 +typedef struct tagNFYLOGPARAMERROR +{ + DWORD dwSize; + UINT wErrCode; + FARPROC lpfnErrorAddr; + void FAR* FAR* lpBadParam; +} NFYLOGPARAMERROR; + +/* NotifyRegister() flags */ +#define NF_NORMAL 0 +#define NF_TASKSWITCH 1 +#define NF_RIP 2 + +typedef BOOL (CALLBACK* LPFNNOTIFYCALLBACK)(WORD wID, DWORD dwData); + +BOOL WINAPI NotifyRegister(HTASK hTask, LPFNNOTIFYCALLBACK lpfn, WORD wFlags); +BOOL WINAPI NotifyUnRegister(HTASK hTask); + +/****** Miscellaneous *********************************************************/ + +void WINAPI TerminateApp(HTASK hTask, WORD wFlags); + +/* TerminateApp() flag values */ +#define UAE_BOX 0 +#define NO_UAE_BOX 1 + +DWORD WINAPI MemoryRead(WORD wSel, DWORD dwOffset, void FAR* lpBuffer, DWORD dwcb); +DWORD WINAPI MemoryWrite(WORD wSel, DWORD dwOffset, void FAR* lpBuffer, DWORD dwcb); + +typedef struct tagTIMERINFO +{ + DWORD dwSize; + DWORD dwmsSinceStart; + DWORD dwmsThisVM; +} TIMERINFO; + +BOOL WINAPI TimerCount(TIMERINFO FAR* lpTimer); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif + +#endif /* !_INC_TOOLHELP */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc new file mode 100644 index 000000000..37537623b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc @@ -0,0 +1,292 @@ +;************************************************************************** +;* TOOLHELP.INC +;* +;* Assembly-language public include file for TOOLHELP.DLL +;* +;************************************************************************** + +;** General symbol values +MAX_DATA EQU 11 +MAX_PATH EQU 255 +MAX_MODULE_NAME EQU 8 + 1 ;Leave room for the zero and padding +MAX_CLASSNAME EQU 255 + +; ----- Global heap walking ----- + +GLOBALENTRY STRUC +ge_dwSize DD ? ;Structure version +ge_dwAddress DD ? ;This block's address +ge_dwBlockSize DD ? ;This block's size +ge_hBlock DW ? ;This block's handle +ge_wcLock DW ? ;Lock count +ge_wcPageLock DW ? ;Page lock count +ge_wFlags DW ? ;Block flags +ge_wHeapPresent DW ? ;Size of available local heap +ge_hOwner DW ? ;Owner handle +ge_wType DW ? ;Block type +ge_wData DW ? ;Type-specific data +ge_dwNext DD ? ;Pointer to next block +ge_dwNextAlt DD ? ;Next free/LRU block in chain +GLOBALENTRY ENDS + +; ** GlobalFirst()/GlobalNext() flags +GLOBAL_ALL EQU 0 +GLOBAL_LRU EQU 1 +GLOBAL_FREE EQU 2 + +; ** GLOBALENTRY.ge_wType entries +GT_UNKNOWN EQU 0 +GT_DGROUP EQU 1 +GT_DATA EQU 2 +GT_CODE EQU 3 +GT_TASK EQU 4 +GT_RESOURCE EQU 5 +GT_MODULE EQU 6 +GT_FREE EQU 7 +GT_INTERNAL EQU 8 +GT_SENTINEL EQU 9 +GT_BURGERMASTER EQU 10 + +; ** if GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: +GD_USERDEFINED EQU 0 +GD_CURSORCOMPONENT EQU 1 +GD_BITMAP EQU 2 +GD_ICONCOMPONENT EQU 3 +GD_MENU EQU 4 +GD_DIALOG EQU 5 +GD_STRING EQU 6 +GD_FONTDIR EQU 7 +GD_FONT EQU 8 +GD_ACCELERATORS EQU 9 +GD_RCDATA EQU 10 +GD_ERRTABLE EQU 11 +GD_CURSOR EQU 12 +GD_ICON EQU 14 +GD_NAMETABLE EQU 15 +GD_MAX_RESOURCE EQU 15 + +;** GLOBALENTRY.wFlags +GF_PDB_OWNER EQU 100h ;Low byte is KERNEL flags + +; ----- Local heap walking ----- + +LOCALENTRY STRUC +le_dwSize DD ? +le_hHandle DW ? +le_wAddress DW ? +le_wSize DW ? +le_wFlags DW ? +le_wcLock DW ? +le_wType DW ? +le_hHeap DW ? +le_wHeapType DW ? +le_wNext DW ? +LOCALENTRY ENDS + +; ** LOCALENTRY.wHeapType flags +NORMAL_HEAP EQU 0 +USER_HEAP EQU 1 +GDI_HEAP EQU 2 + +;** LOCALENTRY.wFlags +LF_FIXED EQU 1 +LF_FREE EQU 2 +LF_MOVEABLE EQU 4 + +;** LOCALENTRY.wType +LT_NORMAL EQU 0 +LT_GDI_PEN EQU 1 +LT_GDI_BRUSH EQU 2 +LT_GDI_FONT EQU 3 +LT_GDI_PALETTE EQU 4 +LT_GDI_BITMAP EQU 5 +LT_GDI_RGN EQU 6 +LT_GDI_DC EQU 7 +LT_GDI_DISABLED_DC EQU 8 +LT_GDI_METADC EQU 9 +LT_GDI_METAFILE EQU 10 +LT_GDI_MAX EQU LT_GDI_METAFILE +LT_FREE EQU 0ffh + +; ----- Stack tracing ----- + +STACKTRACEENTRY STRUC +st_dwSize DD ? +st_hTask DW ? +st_wSS DW ? +st_wBP DW ? +st_wCS DW ? +st_wIP DW ? +st_hModule DW ? +st_wSegment DW ? +st_wFlags DW ? +STACKTRACEENTRY ENDS + +;** STACKTRACEENTRY.wFlags values +FRAME_FAR EQU 0 +FRAME_NEAR EQU 1 + +; ----- Module list walking ----- + +MODULEENTRY STRUC +me_dwSize DD ? +me_szModule DB MAX_MODULE_NAME + 1 DUP(?) +me_hModule DW ? +me_wcUsage DW ? +me_szExePath DB MAX_PATH + 1 + 1 DUP(?) +me_wNext DW ? +MODULEENTRY ENDS + +; ----- Task list walking ----- + +TASKENTRY STRUC +te_dwSize DD ? +te_hTask DW ? +te_hTaskParent DW ? +te_hInst DW ? +te_hModule DW ? +te_wSS DW ? +te_wSP DW ? +te_wStackTop DW ? +te_wStackMinimum DW ? +te_wStackBottom DW ? +te_wcEvents DW ? +te_hQueue DW ? +te_szModule DB MAX_MODULE_NAME + 1 DUP(?) +te_wPSPOffset DW ? +te_hNext DW ? +TASKENTRY ENDS + +;** TaskSwitch() return values +TS_ERROR EQU 0 +TS_NEW EQU 1 +TS_OLD EQU 2 + +; ----- Window Class enumeration ----- + +CLASSENTRY STRUC +ce_dwSize DD ? +ce_hInst DW ? +ce_szClassName DB MAX_CLASSNAME + 1 DUP(?) +ce_wNext DW ? +CLASSENTRY ENDS + +; ----- Information functions ----- + +VMEMMANINFO STRUC +vmm_dwSize DD ? +vmm_dwLargestFreeBlock DD ? +vmm_dwMaxPagesAvailable DD ? +vmm_dwMaxPagesLockable DD ? +vmm_dwTotalLinearSpace DD ? +vmm_dwTotalUnlockedPages DD ? +vmm_dwFreePages DD ? +vmm_dwTotalPages DD ? +vmm_dwFreeLinearSpace DD ? +vmm_dwSwapFilePages DD ? +vmm_wPageSize DW ? +VMEMMANINFO ENDS + +SYSHEAPINFO STRUC +si_dwSize DD ? +si_wUserFreePercent DW ? +si_wGDIFreePercent DW ? +si_hUserSegment DW ? +si_hGDISegment DW ? +SYSHEAPINFO ENDS + +; ----- Notifications ----- + +;* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps +;* should ignore these. +;* +NFY_UNKNOWN EQU 0 + +;** NFY_LOADSEG: dwData points to a NFYLOADSEG structure +NFY_LOADSEG EQU 1 +NFYLOADSEG STRUC +nls_dwSize DD ? +nls_wSelector DW ? +nls_wSegNum DW ? +nls_wType DW ? ;Low bit set for DATA, clear for CODE +nls_wcInstance DW ? ;Instance count ONLY VALID FOR DATA! +nls_lpstrModuleName DD ? +NFYLOADSEG ENDS + +;** NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed +NFY_FREESEG EQU 2 + +;** NFY_STARTDLL: dwData points to a NFYSTARTDLL structure +NFY_STARTDLL EQU 3 +NFYSTARTDLL STRUC +nsd_dwSize DD ? +nsd_hModule DW ? +nsd_wCS DW ? +nsd_wIP DW ? +NFYSTARTDLL ENDS + +;** NFY_STARTTASK: dwData is the CS:IP of the task start address +NFY_STARTTASK EQU 4 + +;** NFY_EXITTASK: The low byte of dwData contains the program exit code +NFY_EXITTASK EQU 5 + +;** NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed +NFY_DELMODULE EQU 6 + +;** NFY_RIP: LOWORD(dwData) is the fatal exit code +;** NFY_RIP: dwData points to a NFYRIP structure +NFY_RIP EQU 7 +NFYRIP STRUC +nrp_dwSize DD ? +nrp_wIP DW ? +nrp_wCS DW ? +nrp_wSS DW ? +nrp_wBP DW ? +nrp_wExitCode DW ? +NFYRIP ENDS + +;** NFY_TASKIN: No data. Callback should do GetCurrentTask() +NFY_TASKIN EQU 8 + +;** NFY_TASKOUT: No data. Callback should do GetCurrentTask() +NFY_TASKOUT EQU 9 + +;** NFY_INCHAR: Return value of callback is used. If FALSE, mapped to 'i' +NFY_INCHAR EQU 10 + +;** NFY_OUTSTR: dwData points to the string to be displayed +NFY_OUTSTR EQU 11 + +;** NFY_LOGERROR: dwData points to a NFYLOGERROR struct +NFY_LOGERROR EQU 12 +NFYLOGERROR STRUC +nle_dwSize DD ? +nle_wErrCode DW ? +nle_lpInfo DD ? ;Error-code dependent +NFYLOGERROR ENDS + +;** NFY_LOGPARAMERROR: dwData points to a NFYLOGPARAMERROR struct +NFY_LOGPARAMERROR EQU 13 +NFYLOGPARAMERROR STRUC +nlp_dwSize DD ? +nlp_wErrCode DW ? +nlp_lpfnErrorAddr DD ? +nlp_lpBadParam DD ? +NFYLOGPARAMERROR ENDS + +;** NotifyRegister() flags +NF_NORMAL EQU 0 +NF_TASKSWITCH EQU 1 +NF_RIP EQU 2 + +;** TerminateApp() flag values +UAE_BOX EQU 0 +NO_UAE_BOX EQU 1 + +TIMERINFO STRUC +ti_dwSize DD ? +ti_dwmsSinceStart DD ? +ti_dwmsThisVM DD ? +TIMERINFO ENDS + diff --git a/private/oleauto/tools/win16/hdos/c800/include/varargs.h b/private/oleauto/tools/win16/hdos/c800/include/varargs.h new file mode 100644 index 000000000..0692f60f6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/varargs.h @@ -0,0 +1,52 @@ +/*** +*varargs.h - XENIX style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines XENIX style macros for accessing arguments of a +* function which takes a variable number of arguments. +* [System V] +* +****/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifdef __STDC__ +#error varargs.h incompatible with ANSI (use stdarg.h) +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ver.h b/private/oleauto/tools/win16/hdos/c800/include/ver.h new file mode 100644 index 000000000..cc8f0501e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ver.h @@ -0,0 +1,255 @@ +/*****************************************************************************\ +* * +* ver.h - Version management functions, types, and definitions * +* * +* Include file for VER.DLL and VER.LIB. These libraries are * +* designed to allow version stamping of Windows executable files* +* and of special .VER files for DOS executable files. * +* * +* The API is unchanged for LIB and DLL versions. * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +******************************************************************************* +* +* #define LIB - To be used with VER.LIB (default is for VER.DLL) +* +\*****************************************************************************/ + +#ifndef _INC_VER +#define _INC_VER + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * If .lib version is being used, declare types used in this file. + */ +#ifdef LIB + +#ifndef WINAPI /* don't declare if they're already declared */ +#define WINAPI _far _pascal +#define NEAR _near +#define FAR _far +#define PASCAL _pascal +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef signed long LONG; +typedef unsigned long DWORD; +typedef char far* LPSTR; +typedef const char far* LPCSTR; +typedef int HFILE; +#define OFSTRUCT void /* Not used by the .lib version */ +#define LOWORD(l) ((WORD)(l)) +#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF)) +#define MAKEINTRESOURCE(i) (LPSTR)((DWORD)((WORD)(i))) +#endif /* WINAPI */ + +#else /* LIB */ + +/* If .dll version is being used and we're being included with + * the 3.0 windows.h, #define compatible type aliases. + * If included with the 3.0 windows.h, #define compatible aliases + */ +#ifndef _INC_WINDOWS +#define UINT WORD +#define LPCSTR LPSTR +#define HFILE int +#endif /* !_INC_WINDOWS */ + +#endif /* !LIB */ + +/* ----- RC defines ----- */ +#ifdef RC_INVOKED +#define ID(id) id +#else +#define ID(id) MAKEINTRESOURCE(id) +#endif + +/* ----- Symbols ----- */ +#define VS_FILE_INFO ID(16) /* Version stamp res type */ +#define VS_VERSION_INFO ID(1) /* Version stamp res ID */ +#define VS_USER_DEFINED ID(100) /* User-defined res IDs */ + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FFI_SIGNATURE 0xFEEF04BDL +#define VS_FFI_STRUCVERSION 0x00010000L +#define VS_FFI_FILEFLAGSMASK 0x0000003FL + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FF_DEBUG 0x00000001L +#define VS_FF_PRERELEASE 0x00000002L +#define VS_FF_PATCHED 0x00000004L +#define VS_FF_PRIVATEBUILD 0x00000008L +#define VS_FF_INFOINFERRED 0x00000010L +#define VS_FF_SPECIALBUILD 0x00000020L + +/* ----- VS_VERSION.dwFileOS ----- */ +#define VOS_UNKNOWN 0x00000000L +#define VOS_DOS 0x00010000L +#define VOS_OS216 0x00020000L +#define VOS_OS232 0x00030000L +#define VOS_NT 0x00040000L + +#define VOS__BASE 0x00000000L +#define VOS__WINDOWS16 0x00000001L +#define VOS__PM16 0x00000002L +#define VOS__PM32 0x00000003L +#define VOS__WINDOWS32 0x00000004L + +#define VOS_DOS_WINDOWS16 0x00010001L +#define VOS_DOS_WINDOWS32 0x00010004L +#define VOS_OS216_PM16 0x00020002L +#define VOS_OS232_PM32 0x00030003L +#define VOS_NT_WINDOWS32 0x00040004L + +/* ----- VS_VERSION.dwFileType ----- */ +#define VFT_UNKNOWN 0x00000000L +#define VFT_APP 0x00000001L +#define VFT_DLL 0x00000002L +#define VFT_DRV 0x00000003L +#define VFT_FONT 0x00000004L +#define VFT_VXD 0x00000005L +#define VFT_STATIC_LIB 0x00000007L + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */ +#define VFT2_UNKNOWN 0x00000000L +#define VFT2_DRV_PRINTER 0x00000001L +#define VFT2_DRV_KEYBOARD 0x00000002L +#define VFT2_DRV_LANGUAGE 0x00000003L +#define VFT2_DRV_DISPLAY 0x00000004L +#define VFT2_DRV_MOUSE 0x00000005L +#define VFT2_DRV_NETWORK 0x00000006L +#define VFT2_DRV_SYSTEM 0x00000007L +#define VFT2_DRV_INSTALLABLE 0x00000008L +#define VFT2_DRV_SOUND 0x00000009L +#define VFT2_DRV_COMM 0x0000000AL + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */ +#define VFT2_FONT_RASTER 0x00000001L +#define VFT2_FONT_VECTOR 0x00000002L +#define VFT2_FONT_TRUETYPE 0x00000003L + +/* ----- VerFindFile() flags ----- */ +#define VFFF_ISSHAREDFILE 0x0001 + +#define VFF_CURNEDEST 0x0001 +#define VFF_FILEINUSE 0x0002 +#define VFF_BUFFTOOSMALL 0x0004 + +/* ----- VerInstallFile() flags ----- */ +#define VIFF_FORCEINSTALL 0x0001 +#define VIFF_DONTDELETEOLD 0x0002 + +#define VIF_TEMPFILE 0x00000001L +#define VIF_MISMATCH 0x00000002L +#define VIF_SRCOLD 0x00000004L + +#define VIF_DIFFLANG 0x00000008L +#define VIF_DIFFCODEPG 0x00000010L +#define VIF_DIFFTYPE 0x00000020L + +#define VIF_WRITEPROT 0x00000040L +#define VIF_FILEINUSE 0x00000080L +#define VIF_OUTOFSPACE 0x00000100L +#define VIF_ACCESSVIOLATION 0x00000200L +#define VIF_SHARINGVIOLATION 0x00000400L +#define VIF_CANNOTCREATE 0x00000800L +#define VIF_CANNOTDELETE 0x00001000L +#define VIF_CANNOTRENAME 0x00002000L +#define VIF_CANNOTDELETECUR 0x00004000L +#define VIF_OUTOFMEMORY 0x00008000L + +#define VIF_CANNOTREADSRC 0x00010000L +#define VIF_CANNOTREADDST 0x00020000L + +#define VIF_BUFFTOOSMALL 0x00040000L + +#ifndef RC_INVOKED /* RC doesn't need to see the rest of this */ + +/* ----- Types and structures ----- */ + +typedef signed short int SHORT; + +typedef struct tagVS_FIXEDFILEINFO +{ + DWORD dwSignature; /* e.g. 0xfeef04bd */ + DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */ + DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */ + DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */ + DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */ + DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */ + DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */ + DWORD dwFileType; /* e.g. VFT_DRIVER */ + DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */ + DWORD dwFileDateMS; /* e.g. 0 */ + DWORD dwFileDateLS; /* e.g. 0 */ +} VS_FIXEDFILEINFO; + +/* ----- Function prototypes ----- */ + +UINT WINAPI VerFindFile(UINT uFlags, LPCSTR szFileName, + LPCSTR szWinDir, LPCSTR szAppDir, + LPSTR szCurDir, UINT FAR* lpuCurDirLen, + LPSTR szDestDir, UINT FAR* lpuDestDirLen); + +DWORD WINAPI VerInstallFile(UINT uFlags, + LPCSTR szSrcFileName, LPCSTR szDestFileName, LPCSTR szSrcDir, + LPCSTR szDestDir, LPCSTR szCurDir, LPSTR szTmpFile, UINT FAR* lpuTmpFileLen); + +/* Returns size of version info in bytes */ +DWORD WINAPI GetFileVersionInfoSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD FAR *lpdwHandle); /* Information for use by GetFileVersionInfo */ + +/* Read version info into buffer */ +BOOL WINAPI GetFileVersionInfo( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD dwHandle, /* Information from GetFileVersionSize */ + DWORD dwLen, /* Length of buffer for info */ + void FAR* lpData); /* Buffer to place the data structure */ + +/* Returns size of resource in bytes */ +DWORD WINAPI GetFileResourceSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD FAR *lpdwFileOffset); /* Returns file offset of resource */ + +/* Reads file resource into buffer */ +BOOL WINAPI GetFileResource( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD dwFileOffset, /* File offset or NULL */ + DWORD dwResLen, /* Length of resource to read or NULL */ + void FAR* lpData); /* Pointer to data buffer */ + +UINT WINAPI VerLanguageName(UINT wLang, LPSTR szLang, UINT nSize); + +UINT WINAPI GetWindowsDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +UINT WINAPI GetSystemDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +BOOL WINAPI VerQueryValue(const void FAR* pBlock, LPCSTR lpSubBlock, + void FAR* FAR* lplpBuffer, UINT FAR* lpuLen); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#pragma pack() + +#endif /* !RC_INVOKED */ +#endif /* !_INC_VER */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/vmemory.h b/private/oleauto/tools/win16/hdos/c800/include/vmemory.h new file mode 100644 index 000000000..4a57e93ec --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/vmemory.h @@ -0,0 +1,60 @@ +/*** +* vmemory.h - Virtual Memory (VM) Management Routines +* +* Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file provides prototypes and definitions for +* the virtual memory management routines. +* +*******************************************************************************/ + +#ifndef _INC_VMEMORY + +#if (_MSC_VER <= 600) +#define __far _far +#define __pascal _pascal +#endif + +/* virtual memory handle type */ +typedef unsigned long _vmhnd_t; + +/* null handle value */ +#define _VM_NULL ((_vmhnd_t) 0) + +/* use all available DOS memory for virtual heap */ +#define _VM_ALLDOS 0 + +/* swap areas */ +#define _VM_EMS 1 +#define _VM_XMS 2 +#define _VM_DISK 4 +#define _VM_ALLSWAP (_VM_EMS | _VM_XMS | _VM_DISK) + +/* clean/dirty flags */ +#define _VM_CLEAN 0 +#define _VM_DIRTY 1 + +/* function prototypes */ + +#ifdef __cplusplus +extern "C" { +#endif + +void __far __pascal _vfree(_vmhnd_t); +int __far __pascal _vheapinit(unsigned int, unsigned int, unsigned int); +void __far __pascal _vheapterm(void); +void __far * __far __pascal _vload(_vmhnd_t, int); +void __far * __far __pascal _vlock(_vmhnd_t); +unsigned int __far __pascal _vlockcnt(_vmhnd_t); +_vmhnd_t __far __pascal _vmalloc(unsigned long); +unsigned long __far __pascal _vmsize(_vmhnd_t); +_vmhnd_t __far __pascal _vrealloc(_vmhnd_t , unsigned long); +void __far __pascal _vunlock(_vmhnd_t, int); + +#ifdef __cplusplus +} +#endif + +#define _INC_VMEMORY +#endif /* _INC_VMEMORY */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/wfext.h b/private/oleauto/tools/win16/hdos/c800/include/wfext.h new file mode 100644 index 000000000..0cadd0499 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/wfext.h @@ -0,0 +1,85 @@ +/*****************************************************************************\ +* * +* wfext.h - Windows File Manager Extensions definitions * +* * +* Version 3.10 * * +* * +* Copyright (c) 1991-1992, Microsoft Corp. All rights reserved. * +* * +*******************************************************************************/ + +#ifndef _INC_WFEXT +#define _INC_WFEXT /* #defined if wfext.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#define MENU_TEXT_LEN 40 + +#define FMMENU_FIRST 1 +#define FMMENU_LAST 99 + +#define FMEVENT_LOAD 100 +#define FMEVENT_UNLOAD 101 +#define FMEVENT_INITMENU 102 +#define FMEVENT_USER_REFRESH 103 +#define FMEVENT_SELCHANGE 104 + +#define FMFOCUS_DIR 1 +#define FMFOCUS_TREE 2 +#define FMFOCUS_DRIVES 3 +#define FMFOCUS_SEARCH 4 + +#define FM_GETFOCUS (WM_USER + 0x0200) +#define FM_GETDRIVEINFO (WM_USER + 0x0201) +#define FM_GETSELCOUNT (WM_USER + 0x0202) +#define FM_GETSELCOUNTLFN (WM_USER + 0x0203) /* LFN versions are odd */ +#define FM_GETFILESEL (WM_USER + 0x0204) +#define FM_GETFILESELLFN (WM_USER + 0x0205) /* LFN versions are odd */ +#define FM_REFRESH_WINDOWS (WM_USER + 0x0206) +#define FM_RELOAD_EXTENSIONS (WM_USER + 0x0207) + +typedef struct tagFMS_GETFILESEL +{ + UINT wTime; + UINT wDate; + DWORD dwSize; + BYTE bAttr; + char szName[260]; /* always fully qualified */ +} FMS_GETFILESEL, FAR *LPFMS_GETFILESEL; + +typedef struct tagFMS_GETDRIVEINFO /* for drive */ +{ + DWORD dwTotalSpace; + DWORD dwFreeSpace; + char szPath[260]; /* current directory */ + char szVolume[14]; /* volume label */ + char szShare[128]; /* if this is a net drive */ +} FMS_GETDRIVEINFO, FAR *LPFMS_GETDRIVEINFO; + +typedef struct tagFMS_LOAD +{ + DWORD dwSize; /* for version checks */ + char szMenuName[MENU_TEXT_LEN]; /* output */ + HMENU hMenu; /* output */ + UINT wMenuDelta; /* input */ +} FMS_LOAD, FAR *LPFMS_LOAD; + +typedef DWORD (CALLBACK *FM_EXT_PROC)(HWND, UINT, LONG); +typedef DWORD (CALLBACK *FM_UNDELETE_PROC)(HWND, LPSTR); + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* _INC_WFEXT */ + diff --git a/private/oleauto/tools/win16/hdos/c800/include/windows.h b/private/oleauto/tools/win16/hdos/c800/include/windows.h new file mode 100644 index 000000000..ab1c8ba04 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windows.h @@ -0,0 +1,5373 @@ +/*****************************************************************************\ +* * +* windows.h - Windows functions, types, and definitions * +* * +* Version 3.10 * +* * +* Copyright (c) 1985-1992, Microsoft Corp. All rights reserved. * +* * +******************************************************************************* +* +* The following symbols control inclusion of various parts of this file: +* +* WINVER Windows version number (0x030a). To exclude +* definitions introduced in version 3.1 (or above) +* #define WINVER 0x0300 before #including <windows.h> +* +* #define: To prevent inclusion of: +* +* NOKERNEL KERNEL APIs and definitions +* NOGDI GDI APIs and definitions +* NOUSER USER APIs and definitions +* NOSOUND Sound APIs and definitions +* NOCOMM Comm driver APIs and definitions +* NODRIVERS Installable driver APIs and definitions +* +* NOMINMAX min() and max() macros +* NOLOGERROR LogError() and related definitions +* NOPROFILER Profiler APIs +* NOMEMMGR Local and global memory management +* NOLFILEIO _l* file I/O routines +* NOOPENFILE OpenFile and related definitions +* NORESOURCE Resource management +* NOATOM Atom management +* NOLANGUAGE Character test routines +* NOLSTRING lstr* string management routines +* NODBCS Double-byte character set routines +* NOKEYBOARDINFO Keyboard driver routines +* NOGDICAPMASKS GDI device capability constants +* NOCOLOR COLOR_* color values +* NOGDIOBJ GDI pens, brushes, fonts +* NODRAWTEXT DrawText() and related definitions +* NOTEXTMETRIC TEXTMETRIC and related APIs +* NOSCALABLEFONT Truetype scalable font support +* NOBITMAP Bitmap support +* NORASTEROPS GDI Raster operation definitions +* NOMETAFILE Metafile support +* NOSYSMETRICS GetSystemMetrics() and related SM_* definitions +* NOSYSTEMPARAMSINFO SystemParametersInfo() and SPI_* definitions +* NOMSG APIs and definitions that use MSG structure +* NOWINSTYLES Window style definitions +* NOWINOFFSETS Get/SetWindowWord/Long offset definitions +* NOSHOWWINDOW ShowWindow and related definitions +* NODEFERWINDOWPOS DeferWindowPos and related definitions +* NOVIRTUALKEYCODES VK_* virtual key codes +* NOKEYSTATES MK_* message key state flags +* NOWH SetWindowsHook and related WH_* definitions +* NOMENUS Menu APIs +* NOSCROLL Scrolling APIs and scroll bar control +* NOCLIPBOARD Clipboard APIs and definitions +* NOICONS IDI_* icon IDs +* NOMB MessageBox and related definitions +* NOSYSCOMMANDS WM_SYSCOMMAND SC_* definitions +* NOMDI MDI support +* NOCTLMGR Control management and controls +* NOWINMESSAGES WM_* window messages +* NOHELP Help support +* +\****************************************************************************/ + +#ifndef _INC_WINDOWS +#define _INC_WINDOWS /* #defined if windows.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* If WINVER is not defined, assume version 3.1 */ +#ifndef WINVER +#define WINVER 0x030a +#endif + +#ifdef RC_INVOKED +/* Don't include definitions that RC.EXE can't parse */ +#define NOATOM +#define NOGDI +#define NOGDICAPMASKS +#define NOMETAFILE +#define NOMINMAX +#define NOMSG +#define NOOPENFILE +#define NORASTEROPS +#define NOSCROLL +#define NOSOUND +#define NOSYSMETRICS +#define NOTEXTMETRIC +#define NOWH +#define NODBCS +#define NOSYSTEMPARAMSINFO +#define NOCOMM +#define NOOEMRESOURCE +#endif /* RC_INVOKED */ + +/* Handle OEMRESOURCE for 3.0 compatibility */ +#if (WINVER < 0x030a) +#define NOOEMRESOURCE +#ifdef OEMRESOURCE +#undef NOOEMRESOURCE +#endif +#endif + +/******* Common definitions and typedefs ***********************************/ + +#define VOID void + +#define FAR _far +#define NEAR _near +#define PASCAL _pascal +#define CDECL _cdecl + +#define WINAPI _far _pascal +#define CALLBACK _far _pascal + +/****** Simple types & common helper macros *********************************/ + +typedef int BOOL; +#define FALSE 0 +#define TRUE 1 + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; + +typedef unsigned int UINT; + +#ifdef STRICT +typedef signed long LONG; +#else +#define LONG long +#endif + +#define LOBYTE(w) ((BYTE)(w)) +#define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF)) + +#define LOWORD(l) ((WORD)(DWORD)(l)) +#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF)) + +#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16))) + +#ifndef NOMINMAX +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#endif /* NOMINMAX */ + +/* Types use for passing & returning polymorphic values */ +typedef UINT WPARAM; +typedef LONG LPARAM; +typedef LONG LRESULT; + +#define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high)) +#define MAKELRESULT(low, high) ((LRESULT)MAKELONG(low, high)) + +/****** Common pointer types ************************************************/ + +#ifndef NULL +#define NULL 0 +#endif + +typedef char NEAR* PSTR; +typedef char NEAR* NPSTR; + + +typedef char FAR* LPSTR; +typedef const char FAR* LPCSTR; + +typedef BYTE NEAR* PBYTE; +typedef BYTE FAR* LPBYTE; + +typedef int NEAR* PINT; +typedef int FAR* LPINT; + +typedef WORD NEAR* PWORD; +typedef WORD FAR* LPWORD; + +typedef long NEAR* PLONG; +typedef long FAR* LPLONG; + +typedef DWORD NEAR* PDWORD; +typedef DWORD FAR* LPDWORD; + +typedef void FAR* LPVOID; + +#define MAKELP(sel, off) ((void FAR*)MAKELONG((off), (sel))) +#define SELECTOROF(lp) HIWORD(lp) +#define OFFSETOF(lp) LOWORD(lp) + +#define FIELDOFFSET(type, field) ((int)(&((type NEAR*)1)->field)-1) + +/****** Common handle types *************************************************/ + +#ifdef STRICT +typedef const void NEAR* HANDLE; +#define DECLARE_HANDLE(name) struct name##__ { int unused; }; \ + typedef const struct name##__ NEAR* name +#define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \ + typedef const struct name##__ FAR* name +#else /* STRICT */ +typedef UINT HANDLE; +#define DECLARE_HANDLE(name) typedef UINT name +#define DECLARE_HANDLE32(name) typedef DWORD name +#endif /* !STRICT */ + +typedef HANDLE* PHANDLE; +typedef HANDLE NEAR* SPHANDLE; +typedef HANDLE FAR* LPHANDLE; + +typedef HANDLE HGLOBAL; +typedef HANDLE HLOCAL; + +typedef HANDLE GLOBALHANDLE; +typedef HANDLE LOCALHANDLE; + +typedef UINT ATOM; + +#ifdef STRICT +typedef void (CALLBACK* FARPROC)(void); +typedef void (NEAR PASCAL* NEARPROC)(void); +#else +typedef int (CALLBACK* FARPROC)(); +typedef int (NEAR PASCAL* NEARPROC)(); +#endif + +DECLARE_HANDLE(HSTR); + +/****** KERNEL typedefs, structures, and functions **************************/ + +DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */ + +#ifndef NOKERNEL + +/****** Application entry point function ************************************/ + +#ifdef STRICT +int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int); +#endif + +/****** System Information **************************************************/ + +DWORD WINAPI GetVersion(void); + +DWORD WINAPI GetFreeSpace(UINT); +UINT WINAPI GetCurrentPDB(void); + +UINT WINAPI GetWindowsDirectory(LPSTR, UINT); +UINT WINAPI GetSystemDirectory(LPSTR, UINT); + +#if (WINVER >= 0x030a) +UINT WINAPI GetFreeSystemResources(UINT); +#define GFSR_SYSTEMRESOURCES 0x0000 +#define GFSR_GDIRESOURCES 0x0001 +#define GFSR_USERRESOURCES 0x0002 +#endif /* WINVER >= 0x030a */ + +DWORD WINAPI GetWinFlags(void); + +#define WF_PMODE 0x0001 +#define WF_CPU286 0x0002 +#define WF_CPU386 0x0004 +#define WF_CPU486 0x0008 +#define WF_STANDARD 0x0010 +#define WF_WIN286 0x0010 +#define WF_ENHANCED 0x0020 +#define WF_WIN386 0x0020 +#define WF_CPU086 0x0040 +#define WF_CPU186 0x0080 +#define WF_LARGEFRAME 0x0100 +#define WF_SMALLFRAME 0x0200 +#define WF_80x87 0x0400 +#define WF_PAGING 0x0800 +#define WF_WLO 0x8000 + +LPSTR WINAPI GetDOSEnvironment(void); + +DWORD WINAPI GetCurrentTime(void); +DWORD WINAPI GetTickCount(void); +DWORD WINAPI GetTimerResolution(void); + +/****** Error handling ******************************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOLOGERROR + +void WINAPI LogError(UINT err, void FAR* lpInfo); +void WINAPI LogParamError(UINT err, FARPROC lpfn, void FAR* param); + +/****** LogParamError/LogError values */ + +/* Error modifier bits */ + +#define ERR_WARNING 0x8000 +#define ERR_PARAM 0x4000 + +#define ERR_SIZE_MASK 0x3000 +#define ERR_BYTE 0x1000 +#define ERR_WORD 0x2000 +#define ERR_DWORD 0x3000 + +/****** LogParamError() values */ + +/* Generic parameter values */ +#define ERR_BAD_VALUE 0x6001 +#define ERR_BAD_FLAGS 0x6002 +#define ERR_BAD_INDEX 0x6003 +#define ERR_BAD_DVALUE 0x7004 +#define ERR_BAD_DFLAGS 0x7005 +#define ERR_BAD_DINDEX 0x7006 +#define ERR_BAD_PTR 0x7007 +#define ERR_BAD_FUNC_PTR 0x7008 +#define ERR_BAD_SELECTOR 0x6009 +#define ERR_BAD_STRING_PTR 0x700a +#define ERR_BAD_HANDLE 0x600b + +/* KERNEL parameter errors */ +#define ERR_BAD_HINSTANCE 0x6020 +#define ERR_BAD_HMODULE 0x6021 +#define ERR_BAD_GLOBAL_HANDLE 0x6022 +#define ERR_BAD_LOCAL_HANDLE 0x6023 +#define ERR_BAD_ATOM 0x6024 +#define ERR_BAD_HFILE 0x6025 + +/* USER parameter errors */ +#define ERR_BAD_HWND 0x6040 +#define ERR_BAD_HMENU 0x6041 +#define ERR_BAD_HCURSOR 0x6042 +#define ERR_BAD_HICON 0x6043 +#define ERR_BAD_HDWP 0x6044 +#define ERR_BAD_CID 0x6045 +#define ERR_BAD_HDRVR 0x6046 + +/* GDI parameter errors */ +#define ERR_BAD_COORDS 0x7060 +#define ERR_BAD_GDI_OBJECT 0x6061 +#define ERR_BAD_HDC 0x6062 +#define ERR_BAD_HPEN 0x6063 +#define ERR_BAD_HFONT 0x6064 +#define ERR_BAD_HBRUSH 0x6065 +#define ERR_BAD_HBITMAP 0x6066 +#define ERR_BAD_HRGN 0x6067 +#define ERR_BAD_HPALETTE 0x6068 +#define ERR_BAD_HMETAFILE 0x6069 + + +/**** LogError() values */ + +/* KERNEL errors */ +#define ERR_GALLOC 0x0001 +#define ERR_GREALLOC 0x0002 +#define ERR_GLOCK 0x0003 +#define ERR_LALLOC 0x0004 +#define ERR_LREALLOC 0x0005 +#define ERR_LLOCK 0x0006 +#define ERR_ALLOCRES 0x0007 +#define ERR_LOCKRES 0x0008 +#define ERR_LOADMODULE 0x0009 + +/* USER errors */ +#define ERR_CREATEDLG 0x0040 +#define ERR_CREATEDLG2 0x0041 +#define ERR_REGISTERCLASS 0x0042 +#define ERR_DCBUSY 0x0043 +#define ERR_CREATEWND 0x0044 +#define ERR_STRUCEXTRA 0x0045 +#define ERR_LOADSTR 0x0046 +#define ERR_LOADMENU 0x0047 +#define ERR_NESTEDBEGINPAINT 0x0048 +#define ERR_BADINDEX 0x0049 +#define ERR_CREATEMENU 0x004a + +/* GDI errors */ +#define ERR_CREATEDC 0x0080 +#define ERR_CREATEMETA 0x0081 +#define ERR_DELOBJSELECTED 0x0082 +#define ERR_SELBITMAP 0x0083 + +/* Debugging support (DEBUG SYSTEM ONLY) */ +typedef struct tagWINDEBUGINFO +{ + UINT flags; + DWORD dwOptions; + DWORD dwFilter; + char achAllocModule[8]; + DWORD dwAllocBreak; + DWORD dwAllocCount; +} WINDEBUGINFO; + +BOOL WINAPI GetWinDebugInfo(WINDEBUGINFO FAR* lpwdi, UINT flags); +BOOL WINAPI SetWinDebugInfo(const WINDEBUGINFO FAR* lpwdi); + +void FAR _cdecl DebugOutput(UINT flags, LPCSTR lpsz, ...); + +/* WINDEBUGINFO flags values */ +#define WDI_OPTIONS 0x0001 +#define WDI_FILTER 0x0002 +#define WDI_ALLOCBREAK 0x0004 + +/* dwOptions values */ +#define DBO_CHECKHEAP 0x0001 +#define DBO_BUFFERFILL 0x0004 +#define DBO_DISABLEGPTRAPPING 0x0010 +#define DBO_CHECKFREE 0x0020 + +#define DBO_SILENT 0x8000 + +#define DBO_TRACEBREAK 0x2000 +#define DBO_WARNINGBREAK 0x1000 +#define DBO_NOERRORBREAK 0x0800 +#define DBO_NOFATALBREAK 0x0400 +#define DBO_INT3BREAK 0x0100 + +/* DebugOutput flags values */ +#define DBF_TRACE 0x0000 +#define DBF_WARNING 0x4000 +#define DBF_ERROR 0x8000 +#define DBF_FATAL 0xc000 + +/* dwFilter values */ +#define DBF_KERNEL 0x1000 +#define DBF_KRN_MEMMAN 0x0001 +#define DBF_KRN_LOADMODULE 0x0002 +#define DBF_KRN_SEGMENTLOAD 0x0004 +#define DBF_USER 0x0800 +#define DBF_GDI 0x0400 +#define DBF_MMSYSTEM 0x0040 +#define DBF_PENWIN 0x0020 +#define DBF_APPLICATION 0x0008 +#define DBF_DRIVER 0x0010 + +#endif /* NOLOGERROR */ +#endif /* WINVER >= 0x030a */ + +void WINAPI FatalExit(int); +void WINAPI FatalAppExit(UINT, LPCSTR); + +BOOL WINAPI ExitWindows(DWORD dwReturnCode, UINT wReserved); + +#define EW_RESTARTWINDOWS 0x42 +#if (WINVER >= 0x030a) +#define EW_REBOOTSYSTEM 0x43 + +BOOL WINAPI ExitWindowsExec(LPCSTR, LPCSTR); +#endif /* WINVER >= 0x030a */ + +void WINAPI DebugBreak(void); +void WINAPI OutputDebugString(LPCSTR); + +/* SetErrorMode() constants */ +#define SEM_FAILCRITICALERRORS 0x0001 +#define SEM_NOGPFAULTERRORBOX 0x0002 +#define SEM_NOOPENFILEERRORBOX 0x8000 + +UINT WINAPI SetErrorMode(UINT); + +/****** Pointer validation **************************************************/ + +#if (WINVER >= 0x030a) + +BOOL WINAPI IsBadReadPtr(const void FAR* lp, UINT cb); +BOOL WINAPI IsBadWritePtr(void FAR* lp, UINT cb); +BOOL WINAPI IsBadHugeReadPtr(const void _huge* lp, DWORD cb); +BOOL WINAPI IsBadHugeWritePtr(void _huge* lp, DWORD cb); +BOOL WINAPI IsBadCodePtr(FARPROC lpfn); +BOOL WINAPI IsBadStringPtr(const void FAR* lpsz, UINT cchMax); +#endif /* WINVER >= 0x030a */ + +/****** Profiling support ***************************************************/ + +#ifndef NOPROFILER + +int WINAPI ProfInsChk(void); +void WINAPI ProfSetup(int,int); +void WINAPI ProfSampRate(int,int); +void WINAPI ProfStart(void); +void WINAPI ProfStop(void); +void WINAPI ProfClear(void); +void WINAPI ProfFlush(void); +void WINAPI ProfFinish(void); +#endif /* NOPROFILER */ + +/****** Catch/Throw and stack management ************************************/ + +typedef int CATCHBUF[9]; +typedef int FAR* LPCATCHBUF; + +int WINAPI Catch(int FAR*); +void WINAPI Throw(const int FAR*, int); + +void WINAPI SwitchStackBack(void); +void WINAPI SwitchStackTo(UINT, UINT, UINT); + +/****** Module Management ***************************************************/ + +#define HINSTANCE_ERROR ((HINSTANCE)32) + + +HINSTANCE WINAPI LoadModule(LPCSTR, LPVOID); +BOOL WINAPI FreeModule(HINSTANCE); + +HINSTANCE WINAPI LoadLibrary(LPCSTR); +void WINAPI FreeLibrary(HINSTANCE); + +UINT WINAPI WinExec(LPCSTR, UINT); + +HMODULE WINAPI GetModuleHandle(LPCSTR); + +int WINAPI GetModuleUsage(HINSTANCE); +int WINAPI GetModuleFileName(HINSTANCE, LPSTR, int); + +FARPROC WINAPI GetProcAddress(HINSTANCE, LPCSTR); + +int WINAPI GetInstanceData(HINSTANCE, BYTE*, int); + +HGLOBAL WINAPI GetCodeHandle(FARPROC); + +typedef struct tagSEGINFO +{ + UINT offSegment; + UINT cbSegment; + UINT flags; + UINT cbAlloc; + HGLOBAL h; + UINT alignShift; + UINT reserved[2]; +} SEGINFO; +typedef SEGINFO FAR* LPSEGINFO; + +void WINAPI GetCodeInfo(FARPROC lpProc, SEGINFO FAR* lpSegInfo); + +FARPROC WINAPI MakeProcInstance(FARPROC, HINSTANCE); +void WINAPI FreeProcInstance(FARPROC); + +LONG WINAPI SetSwapAreaSize(UINT); +void WINAPI SwapRecording(UINT); +void WINAPI ValidateCodeSegments(void); + +/* Windows Exit Procedure flag values */ +#define WEP_SYSTEM_EXIT 1 +#define WEP_FREE_DLL 0 + +/****** Task Management *****************************************************/ + +#endif /* NOKERNEL */ + +DECLARE_HANDLE(HTASK); + +#ifndef NOKERNEL + +UINT WINAPI GetNumTasks(void); + +#if (WINVER >= 0x030a) +BOOL WINAPI IsTask(HTASK); +#endif /* WINVER >= 0x030a */ + +HTASK WINAPI GetCurrentTask(void); + +void WINAPI Yield(void); +void WINAPI DirectedYield(HTASK); + + +/****** Global memory management ********************************************/ + +#ifndef NOMEMMGR + +/* Global Memory Flags */ + +#define GMEM_FIXED 0x0000 +#define GMEM_MOVEABLE 0x0002 +#define GMEM_NOCOMPACT 0x0010 +#define GMEM_NODISCARD 0x0020 +#define GMEM_ZEROINIT 0x0040 +#define GMEM_MODIFY 0x0080 +#define GMEM_DISCARDABLE 0x0100 +#define GMEM_NOT_BANKED 0x1000 +#define GMEM_SHARE 0x2000 +#define GMEM_DDESHARE 0x2000 +#define GMEM_NOTIFY 0x4000 +#define GMEM_LOWER GMEM_NOT_BANKED + +#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) +#define GPTR (GMEM_FIXED | GMEM_ZEROINIT) + +#define GlobalDiscard(h) GlobalReAlloc(h, 0L, GMEM_MOVEABLE) + +HGLOBAL WINAPI GlobalAlloc(UINT, DWORD); +HGLOBAL WINAPI GlobalReAlloc(HGLOBAL, DWORD, UINT); +HGLOBAL WINAPI GlobalFree(HGLOBAL); + +DWORD WINAPI GlobalDosAlloc(DWORD); +UINT WINAPI GlobalDosFree(UINT); + +#ifdef STRICT +void FAR* WINAPI GlobalLock(HGLOBAL); +#else +char FAR* WINAPI GlobalLock(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnlock(HGLOBAL); + +DWORD WINAPI GlobalSize(HGLOBAL); +DWORD WINAPI GlobalHandle(UINT); + +/* GlobalFlags return flags (in addition to GMEM_DISCARDABLE) */ +#define GMEM_DISCARDED 0x4000 +#define GMEM_LOCKCOUNT 0x00FF +UINT WINAPI GlobalFlags(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI GlobalWire(HGLOBAL); +#else +char FAR* WINAPI GlobalWire(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnWire(HGLOBAL); + +UINT WINAPI GlobalPageLock(HGLOBAL); +UINT WINAPI GlobalPageUnlock(HGLOBAL); + +void WINAPI GlobalFix(HGLOBAL); +void WINAPI GlobalUnfix(HGLOBAL); + +HGLOBAL WINAPI GlobalLRUNewest(HGLOBAL); +HGLOBAL WINAPI GlobalLRUOldest(HGLOBAL); + +DWORD WINAPI GlobalCompact(DWORD); + +#ifdef STRICT +typedef BOOL (CALLBACK* GNOTIFYPROC)(HGLOBAL); +#else +typedef FARPROC GNOTIFYPROC; +#endif + +void WINAPI GlobalNotify(GNOTIFYPROC); + +HGLOBAL WINAPI LockSegment(UINT); +void WINAPI UnlockSegment(UINT); + +#define LockData(dummy) LockSegment((UINT)-1) +#define UnlockData(dummy) UnlockSegment((UINT)-1) + +UINT WINAPI AllocSelector(UINT); +UINT WINAPI FreeSelector(UINT); +UINT WINAPI AllocDStoCSAlias(UINT); +UINT WINAPI PrestoChangoSelector(UINT sourceSel, UINT destSel); +DWORD WINAPI GetSelectorBase(UINT); +UINT WINAPI SetSelectorBase(UINT, DWORD); +DWORD WINAPI GetSelectorLimit(UINT); +UINT WINAPI SetSelectorLimit(UINT, DWORD); + +void WINAPI LimitEmsPages(DWORD); + +void WINAPI ValidateFreeSpaces(void); + +/* Low system memory notification message */ +#define WM_COMPACTING 0x0041 + +/***** Local Memory Management */ + +/* Local Memory Flags */ +#define LMEM_FIXED 0x0000 +#define LMEM_MOVEABLE 0x0002 +#define LMEM_NOCOMPACT 0x0010 +#define LMEM_NODISCARD 0x0020 +#define LMEM_ZEROINIT 0x0040 +#define LMEM_MODIFY 0x0080 +#define LMEM_DISCARDABLE 0x0F00 + +#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT) +#define LPTR (LMEM_FIXED | LMEM_ZEROINIT) + +#define NONZEROLHND (LMEM_MOVEABLE) +#define NONZEROLPTR (LMEM_FIXED) + + +#define LocalDiscard(h) LocalReAlloc(h, 0, LMEM_MOVEABLE) + + +HLOCAL WINAPI LocalAlloc(UINT, UINT); +HLOCAL WINAPI LocalReAlloc(HLOCAL, UINT, UINT); +HLOCAL WINAPI LocalFree(HLOCAL); + +#ifdef STRICT +void NEAR* WINAPI LocalLock(HLOCAL); +#else +char NEAR* WINAPI LocalLock(HLOCAL); +#endif + +BOOL WINAPI LocalUnlock(HLOCAL); + +UINT WINAPI LocalSize(HLOCAL); +#ifdef STRICT +HLOCAL WINAPI LocalHandle(void NEAR*); +#else +HLOCAL WINAPI LocalHandle(UINT); +#endif + +/* LocalFlags return flags (in addition to LMEM_DISCARDABLE) */ +#define LMEM_DISCARDED 0x4000 +#define LMEM_LOCKCOUNT 0x00FF + +UINT WINAPI LocalFlags(HLOCAL); + +BOOL WINAPI LocalInit(UINT, UINT, UINT); +UINT WINAPI LocalCompact(UINT); +UINT WINAPI LocalShrink(HLOCAL, UINT); + +#endif /* NOMEMMGR */ + +/****** File I/O ************************************************************/ + +#ifndef NOLFILEIO + +typedef int HFILE; /* Polymorphic with C runtime file handle type */ + +#define HFILE_ERROR ((HFILE)-1) + +#ifndef NOOPENFILE + +/* OpenFile() Structure */ +typedef struct tagOFSTRUCT +{ + BYTE cBytes; + BYTE fFixedDisk; + UINT nErrCode; + BYTE reserved[4]; + char szPathName[128]; +} OFSTRUCT; +typedef OFSTRUCT* POFSTRUCT; +typedef OFSTRUCT NEAR* NPOFSTRUCT; +typedef OFSTRUCT FAR* LPOFSTRUCT; + +/* OpenFile() Flags */ +#define OF_READ 0x0000 +#define OF_WRITE 0x0001 +#define OF_READWRITE 0x0002 +#define OF_SHARE_COMPAT 0x0000 +#define OF_SHARE_EXCLUSIVE 0x0010 +#define OF_SHARE_DENY_WRITE 0x0020 +#define OF_SHARE_DENY_READ 0x0030 +#define OF_SHARE_DENY_NONE 0x0040 +#define OF_PARSE 0x0100 +#define OF_DELETE 0x0200 +#define OF_VERIFY 0x0400 /* Used with OF_REOPEN */ +#define OF_SEARCH 0x0400 /* Used without OF_REOPEN */ +#define OF_CANCEL 0x0800 +#define OF_CREATE 0x1000 +#define OF_PROMPT 0x2000 +#define OF_EXIST 0x4000 +#define OF_REOPEN 0x8000 + +HFILE WINAPI OpenFile(LPCSTR, OFSTRUCT FAR*, UINT); + +#endif /* NOOPENFILE */ + +/* _lopen() flags */ +#define READ 0 +#define WRITE 1 +#define READ_WRITE 2 + +HFILE WINAPI _lopen(LPCSTR, int); +HFILE WINAPI _lcreat(LPCSTR, int); + +HFILE WINAPI _lclose(HFILE); + +LONG WINAPI _llseek(HFILE, LONG, int); + +/* _llseek origin values */ +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +UINT WINAPI _lread(HFILE, void _huge*, UINT); +UINT WINAPI _lwrite(HFILE, const void _huge*, UINT); + +#if (WINVER >= 0x030a) +long WINAPI _hread(HFILE, void _huge*, long); +long WINAPI _hwrite(HFILE, const void _huge*, long); +#endif /* WINVER >= 0x030a */ + + +#endif /* NOLFILEIO */ + +/* GetTempFileName() Flags */ +#define TF_FORCEDRIVE (BYTE)0x80 + +int WINAPI GetTempFileName(BYTE, LPCSTR, UINT, LPSTR); +BYTE WINAPI GetTempDrive(char); + +/* GetDriveType return values */ +#define DRIVE_REMOVABLE 2 +#define DRIVE_FIXED 3 +#define DRIVE_REMOTE 4 +UINT WINAPI GetDriveType(int); + +UINT WINAPI SetHandleCount(UINT); + +/****** Network support *****************************************************/ +UINT WINAPI WNetAddConnection(LPSTR, LPSTR, LPSTR); +UINT WINAPI WNetGetConnection(LPSTR, LPSTR, UINT FAR*); +UINT WINAPI WNetCancelConnection(LPSTR, BOOL); +/* Errors */ +#define WN_SUCCESS 0x0000 +#define WN_NOT_SUPPORTED 0x0001 +#define WN_NET_ERROR 0x0002 +#define WN_MORE_DATA 0x0003 +#define WN_BAD_POINTER 0x0004 +#define WN_BAD_VALUE 0x0005 +#define WN_BAD_PASSWORD 0x0006 +#define WN_ACCESS_DENIED 0x0007 +#define WN_FUNCTION_BUSY 0x0008 +#define WN_WINDOWS_ERROR 0x0009 +#define WN_BAD_USER 0x000A +#define WN_OUT_OF_MEMORY 0x000B +#define WN_CANCEL 0x000C +#define WN_CONTINUE 0x000D + +/* Connection errors */ +#define WN_NOT_CONNECTED 0x0030 +#define WN_OPEN_FILES 0x0031 +#define WN_BAD_NETNAME 0x0032 +#define WN_BAD_LOCALNAME 0x0033 +#define WN_ALREADY_CONNECTED 0x0034 +#define WN_DEVICE_ERROR 0x0035 +#define WN_CONNECTION_CLOSED 0x0036 + +/****** Resource Management *************************************************/ + +DECLARE_HANDLE(HRSRC); + +HRSRC WINAPI FindResource(HINSTANCE, LPCSTR, LPCSTR); +HGLOBAL WINAPI LoadResource(HINSTANCE, HRSRC); +BOOL WINAPI FreeResource(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI LockResource(HGLOBAL); +#else +char FAR* WINAPI LockResource(HGLOBAL); +#endif + +#define UnlockResource(h) GlobalUnlock(h) + +DWORD WINAPI SizeofResource(HINSTANCE, HRSRC); + +int WINAPI AccessResource(HINSTANCE, HRSRC); + +HGLOBAL WINAPI AllocResource(HINSTANCE, HRSRC, DWORD); + +#ifdef STRICT +typedef HGLOBAL (CALLBACK* RSRCHDLRPROC)(HGLOBAL, HINSTANCE, HRSRC); +#else +typedef FARPROC RSRCHDLRPROC; +#endif + +RSRCHDLRPROC WINAPI SetResourceHandler(HINSTANCE, LPCSTR, RSRCHDLRPROC); + +#define MAKEINTRESOURCE(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NORESOURCE + +/* Predefined Resource Types */ +#define RT_CURSOR MAKEINTRESOURCE(1) +#define RT_BITMAP MAKEINTRESOURCE(2) +#define RT_ICON MAKEINTRESOURCE(3) +#define RT_MENU MAKEINTRESOURCE(4) +#define RT_DIALOG MAKEINTRESOURCE(5) +#define RT_STRING MAKEINTRESOURCE(6) +#define RT_FONTDIR MAKEINTRESOURCE(7) +#define RT_FONT MAKEINTRESOURCE(8) +#define RT_ACCELERATOR MAKEINTRESOURCE(9) +#define RT_RCDATA MAKEINTRESOURCE(10) + +#define RT_GROUP_CURSOR MAKEINTRESOURCE(12) +#define RT_GROUP_ICON MAKEINTRESOURCE(14) + +#endif /* NORESOURCE */ + +#ifdef OEMRESOURCE + +/* OEM Resource Ordinal Numbers */ +#define OBM_CLOSE 32754 +#define OBM_UPARROW 32753 +#define OBM_DNARROW 32752 +#define OBM_RGARROW 32751 +#define OBM_LFARROW 32750 +#define OBM_REDUCE 32749 +#define OBM_ZOOM 32748 +#define OBM_RESTORE 32747 +#define OBM_REDUCED 32746 +#define OBM_ZOOMD 32745 +#define OBM_RESTORED 32744 +#define OBM_UPARROWD 32743 +#define OBM_DNARROWD 32742 +#define OBM_RGARROWD 32741 +#define OBM_LFARROWD 32740 +#define OBM_MNARROW 32739 +#define OBM_COMBO 32738 +#if (WINVER >= 0x030a) +#define OBM_UPARROWI 32737 +#define OBM_DNARROWI 32736 +#define OBM_RGARROWI 32735 +#define OBM_LFARROWI 32734 +#endif /* WINVER >= 0x030a */ + +#define OBM_OLD_CLOSE 32767 +#define OBM_SIZE 32766 +#define OBM_OLD_UPARROW 32765 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_LFARROW 32762 +#define OBM_BTSIZE 32761 +#define OBM_CHECK 32760 +#define OBM_CHECKBOXES 32759 +#define OBM_BTNCORNERS 32758 +#define OBM_OLD_REDUCE 32757 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_RESTORE 32755 + +#define OCR_NORMAL 32512 +#define OCR_IBEAM 32513 +#define OCR_WAIT 32514 +#define OCR_CROSS 32515 +#define OCR_UP 32516 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 + +#define OIC_SAMPLE 32512 +#define OIC_HAND 32513 +#define OIC_QUES 32514 +#define OIC_BANG 32515 +#define OIC_NOTE 32516 + +#endif /* OEMRESOURCE */ + +/****** Atom Management *****************************************************/ + +#define MAKEINTATOM(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NOATOM + +BOOL WINAPI InitAtomTable(int); +ATOM WINAPI AddAtom(LPCSTR); +ATOM WINAPI DeleteAtom(ATOM); +ATOM WINAPI FindAtom(LPCSTR); +UINT WINAPI GetAtomName(ATOM, LPSTR, int); +ATOM WINAPI GlobalAddAtom(LPCSTR); +ATOM WINAPI GlobalDeleteAtom(ATOM); +ATOM WINAPI GlobalFindAtom(LPCSTR); +UINT WINAPI GlobalGetAtomName(ATOM, LPSTR, int); +HLOCAL WINAPI GetAtomHandle(ATOM); + +#endif /* NOATOM */ + +/****** WIN.INI Support *****************************************************/ + +/* User Profile Routines */ +UINT WINAPI GetProfileInt(LPCSTR, LPCSTR, int); +int WINAPI GetProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int); +BOOL WINAPI WriteProfileString(LPCSTR, LPCSTR, LPCSTR); + +UINT WINAPI GetPrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR); +int WINAPI GetPrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int, LPCSTR); +BOOL WINAPI WritePrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPCSTR); + +#define WM_WININICHANGE 0x001A + +/****** International & Char Translation Support ****************************/ + +void WINAPI AnsiToOem(const char _huge*, char _huge*); +void WINAPI OemToAnsi(const char _huge*, char _huge*); + +void WINAPI AnsiToOemBuff(LPCSTR, LPSTR, UINT); +void WINAPI OemToAnsiBuff(LPCSTR, LPSTR, UINT); + +LPSTR WINAPI AnsiNext(LPCSTR); +LPSTR WINAPI AnsiPrev(LPCSTR, LPCSTR); + +LPSTR WINAPI AnsiUpper(LPSTR); +LPSTR WINAPI AnsiLower(LPSTR); + +UINT WINAPI AnsiUpperBuff(LPSTR, UINT); +UINT WINAPI AnsiLowerBuff(LPSTR, UINT); + + +#ifndef NOLANGUAGE +BOOL WINAPI IsCharAlpha(char); +BOOL WINAPI IsCharAlphaNumeric(char); +BOOL WINAPI IsCharUpper(char); +BOOL WINAPI IsCharLower(char); +#endif + +#ifndef NOLSTRING +int WINAPI lstrcmp(LPCSTR, LPCSTR); +int WINAPI lstrcmpi(LPCSTR, LPCSTR); +LPSTR WINAPI lstrcpy(LPSTR, LPCSTR); +LPSTR WINAPI lstrcat(LPSTR, LPCSTR); +int WINAPI lstrlen(LPCSTR); +#if (WINVER >= 0x030a) +LPSTR WINAPI lstrcpyn(LPSTR, LPCSTR, int); +void WINAPI hmemcpy(void _huge*, const void _huge*, long); +#endif /* WINVER >= 0x030a */ +#endif /* NOLSTRING */ + +#if (WINVER >= 0x030a) +#ifndef NODBCS +BOOL WINAPI IsDBCSLeadByte(BYTE); +#endif /* NODBCS */ +#endif /* WINVER >= 0x030a */ + +int WINAPI LoadString(HINSTANCE, UINT, LPSTR, int); + +/****** Keyboard Driver Functions *******************************************/ + +#ifndef NOKEYBOARDINFO + +DWORD WINAPI OemKeyScan(UINT); +UINT WINAPI VkKeyScan(UINT); +int WINAPI GetKeyboardType(int); +UINT WINAPI MapVirtualKey(UINT, UINT); +int WINAPI GetKBCodePage(void); +int WINAPI GetKeyNameText(LONG, LPSTR, int); +int WINAPI ToAscii(UINT wVirtKey, UINT wScanCode, BYTE FAR* lpKeyState, DWORD FAR* lpChar, UINT wFlags); + +#endif + +#endif /* NOKERNEL */ + +/****** GDI typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HDC); + +#ifndef NOGDI + +#ifdef STRICT +typedef const void NEAR* HGDIOBJ; +#else +DECLARE_HANDLE(HGDIOBJ); +#endif + +#endif /* NOGDI */ + +DECLARE_HANDLE(HBITMAP); +DECLARE_HANDLE(HPEN); +DECLARE_HANDLE(HBRUSH); +DECLARE_HANDLE(HRGN); +DECLARE_HANDLE(HPALETTE); +DECLARE_HANDLE(HFONT); + +typedef struct tagRECT +{ + int left; + int top; + int right; + int bottom; +} RECT; +typedef RECT* PRECT; +typedef RECT NEAR* NPRECT; +typedef RECT FAR* LPRECT; + +typedef struct tagPOINT +{ + int x; + int y; +} POINT; +typedef POINT* PPOINT; +typedef POINT NEAR* NPPOINT; +typedef POINT FAR* LPPOINT; + +#if (WINVER >= 0x030a) +typedef struct tagSIZE +{ + int cx; + int cy; +} SIZE; +typedef SIZE* PSIZE; +typedef SIZE NEAR* NPSIZE; +typedef SIZE FAR* LPSIZE; +#endif /* WINVER >= 0x030a */ + +#define MAKEPOINT(l) (*((POINT FAR*)&(l))) + +#ifndef NOGDI + +/****** DC Management *******************************************************/ + +HDC WINAPI CreateDC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateIC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateCompatibleDC(HDC); + +BOOL WINAPI DeleteDC(HDC); + +DWORD WINAPI GetDCOrg(HDC); + +int WINAPI SaveDC(HDC); +BOOL WINAPI RestoreDC(HDC, int); + +int WINAPI SetEnvironment(LPCSTR, const void FAR*, UINT); +int WINAPI GetEnvironment(LPCSTR, void FAR*, UINT); + +int WINAPI MulDiv(int, int, int); + +#if (WINVER >= 0x030a) +/* Drawing bounds accumulation APIs */ +UINT WINAPI SetBoundsRect(HDC hDC, const RECT FAR* lprcBounds, UINT flags); +UINT WINAPI GetBoundsRect(HDC hDC, RECT FAR* lprcBounds, UINT flags); + +#define DCB_RESET 0x0001 +#define DCB_ACCUMULATE 0x0002 +#define DCB_DIRTY DCB_ACCUMULATE +#define DCB_SET (DCB_RESET | DCB_ACCUMULATE) +#define DCB_ENABLE 0x0004 +#define DCB_DISABLE 0x0008 +#endif /* WINVER >= 0x030a */ + +/****** Device Capabilities *************************************************/ + +int WINAPI GetDeviceCaps(HDC, int); + +/* Device Parameters for GetDeviceCaps() */ +#define DRIVERVERSION 0 +#define TECHNOLOGY 2 +#define HORZSIZE 4 +#define VERTSIZE 6 +#define HORZRES 8 +#define VERTRES 10 +#define BITSPIXEL 12 +#define PLANES 14 +#define NUMBRUSHES 16 +#define NUMPENS 18 +#define NUMMARKERS 20 +#define NUMFONTS 22 +#define NUMCOLORS 24 +#define PDEVICESIZE 26 +#define CURVECAPS 28 +#define LINECAPS 30 +#define POLYGONALCAPS 32 +#define TEXTCAPS 34 +#define CLIPCAPS 36 +#define RASTERCAPS 38 +#define ASPECTX 40 +#define ASPECTY 42 +#define ASPECTXY 44 + +#define LOGPIXELSX 88 +#define LOGPIXELSY 90 + +#define SIZEPALETTE 104 +#define NUMRESERVED 106 +#define COLORRES 108 + +#ifndef NOGDICAPMASKS + +/* GetDeviceCaps() return value masks */ + +/* TECHNOLOGY */ +#define DT_PLOTTER 0 +#define DT_RASDISPLAY 1 +#define DT_RASPRINTER 2 +#define DT_RASCAMERA 3 +#define DT_CHARSTREAM 4 +#define DT_METAFILE 5 +#define DT_DISPFILE 6 + +/* CURVECAPS */ +#define CC_NONE 0x0000 +#define CC_CIRCLES 0x0001 +#define CC_PIE 0x0002 +#define CC_CHORD 0x0004 +#define CC_ELLIPSES 0x0008 +#define CC_WIDE 0x0010 +#define CC_STYLED 0x0020 +#define CC_WIDESTYLED 0x0040 +#define CC_INTERIORS 0x0080 +#define CC_ROUNDRECT 0x0100 + +/* LINECAPS */ +#define LC_NONE 0x0000 +#define LC_POLYLINE 0x0002 +#define LC_MARKER 0x0004 +#define LC_POLYMARKER 0x0008 +#define LC_WIDE 0x0010 +#define LC_STYLED 0x0020 +#define LC_WIDESTYLED 0x0040 +#define LC_INTERIORS 0x0080 + +/* POLYGONALCAPS */ +#define PC_NONE 0x0000 +#define PC_POLYGON 0x0001 +#define PC_RECTANGLE 0x0002 +#define PC_WINDPOLYGON 0x0004 +#define PC_SCANLINE 0x0008 +#define PC_WIDE 0x0010 +#define PC_STYLED 0x0020 +#define PC_WIDESTYLED 0x0040 +#define PC_INTERIORS 0x0080 + +/* TEXTCAPS */ +#define TC_OP_CHARACTER 0x0001 +#define TC_OP_STROKE 0x0002 +#define TC_CP_STROKE 0x0004 +#define TC_CR_90 0x0008 +#define TC_CR_ANY 0x0010 +#define TC_SF_X_YINDEP 0x0020 +#define TC_SA_DOUBLE 0x0040 +#define TC_SA_INTEGER 0x0080 +#define TC_SA_CONTIN 0x0100 +#define TC_EA_DOUBLE 0x0200 +#define TC_IA_ABLE 0x0400 +#define TC_UA_ABLE 0x0800 +#define TC_SO_ABLE 0x1000 +#define TC_RA_ABLE 0x2000 +#define TC_VA_ABLE 0x4000 +#define TC_RESERVED 0x8000 + +/* CLIPCAPS */ +#define CP_NONE 0x0000 +#define CP_RECTANGLE 0x0001 +#define CP_REGION 0x0002 + +/* RASTERCAPS */ +#define RC_NONE +#define RC_BITBLT 0x0001 +#define RC_BANDING 0x0002 +#define RC_SCALING 0x0004 +#define RC_BITMAP64 0x0008 +#define RC_GDI20_OUTPUT 0x0010 +#define RC_GDI20_STATE 0x0020 +#define RC_SAVEBITMAP 0x0040 +#define RC_DI_BITMAP 0x0080 +#define RC_PALETTE 0x0100 +#define RC_DIBTODEV 0x0200 +#define RC_BIGFONT 0x0400 +#define RC_STRETCHBLT 0x0800 +#define RC_FLOODFILL 0x1000 +#define RC_STRETCHDIB 0x2000 +#define RC_OP_DX_OUTPUT 0x4000 +#define RC_DEVBITS 0x8000 + +#endif /* NOGDICAPMASKS */ + +/****** Coordinate transformation support ***********************************/ + +int WINAPI SetMapMode(HDC, int); +int WINAPI GetMapMode(HDC); + +/* Map modes */ +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 + +DWORD WINAPI SetWindowOrg(HDC, int, int); +DWORD WINAPI GetWindowOrg(HDC); + +DWORD WINAPI SetWindowExt(HDC, int, int); +DWORD WINAPI GetWindowExt(HDC); + +DWORD WINAPI OffsetWindowOrg(HDC, int, int); +DWORD WINAPI ScaleWindowExt(HDC, int, int, int, int); + +DWORD WINAPI SetViewportOrg(HDC, int, int); +DWORD WINAPI GetViewportOrg(HDC); + +DWORD WINAPI SetViewportExt(HDC, int, int); +DWORD WINAPI GetViewportExt(HDC); + +DWORD WINAPI OffsetViewportOrg(HDC, int, int); +DWORD WINAPI ScaleViewportExt(HDC, int, int, int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI SetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetWindowOrgEx(HDC, POINT FAR*); + +BOOL WINAPI SetWindowExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetWindowExtEx(HDC, SIZE FAR*); + +BOOL WINAPI OffsetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleWindowExtEx(HDC, int, int, int, int, SIZE FAR*); + +BOOL WINAPI SetViewportExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetViewportExtEx(HDC, SIZE FAR*); + +BOOL WINAPI SetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetViewportOrgEx(HDC, POINT FAR*); + +BOOL WINAPI OffsetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleViewportExtEx(HDC, int, int, int, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DPtoLP(HDC, POINT FAR*, int); +BOOL WINAPI LPtoDP(HDC, POINT FAR*, int); + + +/* Coordinate Modes */ +#define ABSOLUTE 1 +#define RELATIVE 2 + +/****** Color support *******************************************************/ + +typedef DWORD COLORREF; + +#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16))) + +#define GetRValue(rgb) ((BYTE)(rgb)) +#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) +#define GetBValue(rgb) ((BYTE)((rgb)>>16)) + +COLORREF WINAPI GetNearestColor(HDC, COLORREF); + +#ifndef NOCOLOR + +COLORREF WINAPI GetSysColor(int); +void WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*); + +#define COLOR_SCROLLBAR 0 +#define COLOR_BACKGROUND 1 +#define COLOR_ACTIVECAPTION 2 +#define COLOR_INACTIVECAPTION 3 +#define COLOR_MENU 4 +#define COLOR_WINDOW 5 +#define COLOR_WINDOWFRAME 6 +#define COLOR_MENUTEXT 7 +#define COLOR_WINDOWTEXT 8 +#define COLOR_CAPTIONTEXT 9 +#define COLOR_ACTIVEBORDER 10 +#define COLOR_INACTIVEBORDER 11 +#define COLOR_APPWORKSPACE 12 +#define COLOR_HIGHLIGHT 13 +#define COLOR_HIGHLIGHTTEXT 14 +#define COLOR_BTNFACE 15 +#define COLOR_BTNSHADOW 16 +#define COLOR_GRAYTEXT 17 +#define COLOR_BTNTEXT 18 +#if (WINVER >= 0x030a) +#define COLOR_INACTIVECAPTIONTEXT 19 +#define COLOR_BTNHIGHLIGHT 20 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOLOR */ + +#define WM_SYSCOLORCHANGE 0x0015 + +/****** GDI Object Support **************************************************/ + +#ifndef NOGDIOBJ + +HGDIOBJ WINAPI GetStockObject(int); + +BOOL WINAPI IsGDIObject(HGDIOBJ); + +BOOL WINAPI DeleteObject(HGDIOBJ); +HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ); +int WINAPI GetObject(HGDIOBJ, int, void FAR*); +BOOL WINAPI UnrealizeObject(HGDIOBJ); + +#ifdef STRICT +typedef (CALLBACK* GOBJENUMPROC)(void FAR*, LPARAM); +#else +typedef FARPROC GOBJENUMPROC; +#endif + +#ifdef STRICT +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPARAM); +#else +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPSTR); +#endif + +/* Object types for EnumObjects() */ +#define OBJ_PEN 1 +#define OBJ_BRUSH 2 + +/****** Pen support *********************************************************/ + +/* Logical Pen */ +typedef struct tagLOGPEN +{ + UINT lopnStyle; + POINT lopnWidth; + COLORREF lopnColor; +} LOGPEN; +typedef LOGPEN* PLOGPEN; +typedef LOGPEN NEAR* NPLOGPEN; +typedef LOGPEN FAR* LPLOGPEN; + +/* Pen Styles */ +#define PS_SOLID 0 +#define PS_DASH 1 +#define PS_DOT 2 +#define PS_DASHDOT 3 +#define PS_DASHDOTDOT 4 +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 + +HPEN WINAPI CreatePen(int, int, COLORREF); +HPEN WINAPI CreatePenIndirect(LOGPEN FAR*); + +/* Stock pens for use with GetStockObject(); */ +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 + +/****** Brush support *******************************************************/ + +/* Brush Styles */ +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW BS_NULL +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 + +/* Hatch Styles */ +#define HS_HORIZONTAL 0 +#define HS_VERTICAL 1 +#define HS_FDIAGONAL 2 +#define HS_BDIAGONAL 3 +#define HS_CROSS 4 +#define HS_DIAGCROSS 5 + +/* Logical Brush (or Pattern) */ +typedef struct tagLOGBRUSH +{ + UINT lbStyle; + COLORREF lbColor; + int lbHatch; +} LOGBRUSH; +typedef LOGBRUSH* PLOGBRUSH; +typedef LOGBRUSH NEAR* NPLOGBRUSH; +typedef LOGBRUSH FAR* LPLOGBRUSH; + +typedef LOGBRUSH PATTERN; +typedef PATTERN* PPATTERN; +typedef PATTERN NEAR* NPPATTERN; +typedef PATTERN FAR* LPPATTERN; + +HBRUSH WINAPI CreateSolidBrush(COLORREF); +HBRUSH WINAPI CreateHatchBrush(int, COLORREF); +HBRUSH WINAPI CreatePatternBrush(HBITMAP); +HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL, UINT); +HBRUSH WINAPI CreateBrushIndirect(LOGBRUSH FAR*); + +/* Stock brushes for use with GetStockObject() */ +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH + +DWORD WINAPI SetBrushOrg(HDC, int, int); +DWORD WINAPI GetBrushOrg(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetBrushOrgEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +/****** Region support ******************************************************/ + +HRGN WINAPI CreateRectRgn(int, int, int, int); +HRGN WINAPI CreateRectRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgn(int, int, int, int); +HRGN WINAPI CreatePolygonRgn(const POINT FAR*, int, int); +HRGN WINAPI CreatePolyPolygonRgn(const POINT FAR*, const int FAR*, int, int); +HRGN WINAPI CreateRoundRectRgn(int, int, int, int, int, int); + +/* Region type flags */ +#define ERROR 0 +#define NULLREGION 1 +#define SIMPLEREGION 2 +#define COMPLEXREGION 3 + +void WINAPI SetRectRgn(HRGN, int, int, int, int); + +int WINAPI CombineRgn(HRGN, HRGN, HRGN, int); + +/* CombineRgn() command values */ +#define RGN_AND 1 +#define RGN_OR 2 +#define RGN_XOR 3 +#define RGN_DIFF 4 +#define RGN_COPY 5 + +BOOL WINAPI EqualRgn(HRGN, HRGN); +int WINAPI OffsetRgn(HRGN, int, int); + +int WINAPI GetRgnBox(HRGN, RECT FAR*); + +BOOL WINAPI RectInRegion(HRGN, const RECT FAR*); +BOOL WINAPI PtInRegion(HRGN, int, int); + +/****** Color palette Support ************************************************/ + +#define PALETTERGB(r,g,b) (0x02000000L | RGB(r,g,b)) +#define PALETTEINDEX(i) ((COLORREF)(0x01000000L | (DWORD)(WORD)(i))) + +typedef struct tagPALETTEENTRY +{ + BYTE peRed; + BYTE peGreen; + BYTE peBlue; + BYTE peFlags; +} PALETTEENTRY; +typedef PALETTEENTRY FAR* LPPALETTEENTRY; + +/* Palette entry flags */ +#define PC_RESERVED 0x01 /* palette index used for animation */ +#define PC_EXPLICIT 0x02 /* palette index is explicit to device */ +#define PC_NOCOLLAPSE 0x04 /* do not match color to system palette */ + +/* Logical Palette */ +typedef struct tagLOGPALETTE +{ + WORD palVersion; + WORD palNumEntries; + PALETTEENTRY palPalEntry[1]; +} LOGPALETTE; +typedef LOGPALETTE* PLOGPALETTE; +typedef LOGPALETTE NEAR* NPLOGPALETTE; +typedef LOGPALETTE FAR* LPLOGPALETTE; + +HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR*); + +HPALETTE WINAPI SelectPalette(HDC, HPALETTE, BOOL); + +UINT WINAPI RealizePalette(HDC); + +int WINAPI UpdateColors(HDC); +void WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); + +UINT WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); +UINT WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetNearestPaletteIndex(HPALETTE, COLORREF); + +BOOL WINAPI ResizePalette(HPALETTE, UINT); + +UINT WINAPI GetSystemPaletteEntries(HDC, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetSystemPaletteUse(HDC); +UINT WINAPI SetSystemPaletteUse(HDC, UINT); + +/* Get/SetSystemPaletteUse() values */ +#define SYSPAL_STATIC 1 +#define SYSPAL_NOSTATIC 2 + +/* Palette window messages */ +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 + +/****** Clipping support *****************************************************/ + +int WINAPI SelectClipRgn(HDC, HRGN); +int WINAPI GetClipBox(HDC, RECT FAR*); + +int WINAPI IntersectClipRect(HDC, int, int, int, int); +int WINAPI OffsetClipRgn(HDC, int, int); +int WINAPI ExcludeClipRect(HDC, int, int, int, int); + +BOOL WINAPI PtVisible(HDC, int, int); +BOOL WINAPI RectVisible(HDC, const RECT FAR*); + + +/****** General drawing support ********************************************/ + +DWORD WINAPI MoveTo(HDC, int, int); +DWORD WINAPI GetCurrentPosition(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI MoveToEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetCurrentPositionEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI LineTo(HDC, int, int); +BOOL WINAPI Polyline(HDC, const POINT FAR*, int); + +#ifdef STRICT +typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM); +#else +typedef FARPROC LINEDDAPROC; +#endif + +void WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM); + +BOOL WINAPI Rectangle(HDC, int, int, int, int); +BOOL WINAPI RoundRect(HDC, int, int, int, int, int, int); + +BOOL WINAPI Ellipse(HDC, int, int, int, int); +BOOL WINAPI Arc(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Chord(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Pie(HDC, int, int, int, int, int, int, int, int); + +BOOL WINAPI Polygon(HDC, const POINT FAR*, int); +BOOL WINAPI PolyPolygon(HDC, const POINT FAR*, int FAR*, int); + +/* PolyFill Modes */ +#define ALTERNATE 1 +#define WINDING 2 + +int WINAPI SetPolyFillMode(HDC, int); +int WINAPI GetPolyFillMode(HDC); + +BOOL WINAPI FloodFill(HDC, int, int, COLORREF); +BOOL WINAPI ExtFloodFill(HDC, int, int, COLORREF, UINT); + +/* ExtFloodFill style flags */ +#define FLOODFILLBORDER 0 +#define FLOODFILLSURFACE 1 + +BOOL WINAPI FillRgn(HDC, HRGN, HBRUSH); +BOOL WINAPI FrameRgn(HDC, HRGN, HBRUSH, int, int); +BOOL WINAPI InvertRgn(HDC, HRGN); +BOOL WINAPI PaintRgn(HDC, HRGN); + +/* Rectangle output routines */ +int WINAPI FillRect(HDC, const RECT FAR*, HBRUSH); +int WINAPI FrameRect(HDC, const RECT FAR*, HBRUSH); +void WINAPI InvertRect(HDC, const RECT FAR*); + +void WINAPI DrawFocusRect(HDC, const RECT FAR*); + + +/****** Text support ********************************************************/ + +BOOL WINAPI TextOut(HDC, int, int, LPCSTR, int); +LONG WINAPI TabbedTextOut(HDC, int, int, LPCSTR, int, int, int FAR*, int); +BOOL WINAPI ExtTextOut(HDC, int, int, UINT, const RECT FAR*, LPCSTR, UINT, int FAR*); + +#define ETO_GRAYED 0x0001 +#define ETO_OPAQUE 0x0002 +#define ETO_CLIPPED 0x0004 + +DWORD WINAPI GetTextExtent(HDC, LPCSTR, int); +DWORD WINAPI GetTabbedTextExtent(HDC, LPCSTR, int, int, int FAR*); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetTextExtentPoint(HDC, LPCSTR, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +/* DrawText() Format Flags */ +#ifndef NODRAWTEXT +#define DT_TOP 0x0000 +#define DT_LEFT 0x0000 +#define DT_CENTER 0x0001 +#define DT_RIGHT 0x0002 +#define DT_VCENTER 0x0004 +#define DT_BOTTOM 0x0008 +#define DT_WORDBREAK 0x0010 +#define DT_SINGLELINE 0x0020 +#define DT_EXPANDTABS 0x0040 +#define DT_TABSTOP 0x0080 +#define DT_NOCLIP 0x0100 +#define DT_EXTERNALLEADING 0x0200 +#define DT_CALCRECT 0x0400 +#define DT_NOPREFIX 0x0800 +#define DT_INTERNAL 0x1000 + +int WINAPI DrawText(HDC, LPCSTR, int, RECT FAR*, UINT); +#endif /* NODRAWTEXT */ + +#ifdef STRICT +typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int); +#else +typedef FARPROC GRAYSTRINGPROC; +#endif + +BOOL WINAPI GrayString(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int); + +BOOL WINAPI GetCharWidth(HDC, UINT, UINT, int FAR*); + +COLORREF WINAPI SetTextColor(HDC, COLORREF); +COLORREF WINAPI GetTextColor(HDC); + +COLORREF WINAPI SetBkColor(HDC, COLORREF); +COLORREF WINAPI GetBkColor(HDC); + +int WINAPI SetBkMode(HDC, int); +int WINAPI GetBkMode(HDC); + +/* Background Modes */ +#define TRANSPARENT 1 +#define OPAQUE 2 + +UINT WINAPI SetTextAlign(HDC, UINT); +UINT WINAPI GetTextAlign(HDC); + +/* Text Alignment Options */ +#define TA_NOUPDATECP 0x0000 +#define TA_UPDATECP 0x0001 +#define TA_LEFT 0x0000 +#define TA_RIGHT 0x0002 +#define TA_CENTER 0x0006 +#define TA_TOP 0x0000 +#define TA_BOTTOM 0x0008 +#define TA_BASELINE 0x0018 + +int WINAPI SetTextCharacterExtra(HDC, int); +int WINAPI GetTextCharacterExtra(HDC); + +int WINAPI SetTextJustification(HDC, int, int); + +/****** Font support ********************************************************/ + +#ifndef NOGDIOBJ +/* Logical Font */ +#define LF_FACESIZE 32 +typedef struct tagLOGFONT +{ + int lfHeight; + int lfWidth; + int lfEscapement; + int lfOrientation; + int lfWeight; + BYTE lfItalic; + BYTE lfUnderline; + BYTE lfStrikeOut; + BYTE lfCharSet; + BYTE lfOutPrecision; + BYTE lfClipPrecision; + BYTE lfQuality; + BYTE lfPitchAndFamily; + char lfFaceName[LF_FACESIZE]; +} LOGFONT; +typedef LOGFONT* PLOGFONT; +typedef LOGFONT NEAR* NPLOGFONT; +typedef LOGFONT FAR* LPLOGFONT; + +/* weight values */ +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_HEAVY 900 + +#define FW_ULTRALIGHT FW_EXTRALIGHT +#define FW_REGULAR FW_NORMAL +#define FW_DEMIBOLD FW_SEMIBOLD +#define FW_ULTRABOLD FW_EXTRABOLD +#define FW_BLACK FW_HEAVY + +/* CharSet values */ +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 + +/* OutPrecision values */ +#define OUT_DEFAULT_PRECIS 0 +#define OUT_STRING_PRECIS 1 +#define OUT_CHARACTER_PRECIS 2 +#define OUT_STROKE_PRECIS 3 +#if (WINVER >= 0x030a) +#define OUT_TT_PRECIS 4 +#define OUT_DEVICE_PRECIS 5 +#define OUT_RASTER_PRECIS 6 +#define OUT_TT_ONLY_PRECIS 7 +#endif /* WINVER >= 0x030a */ + +/* ClipPrecision values */ +#define CLIP_DEFAULT_PRECIS 0x00 +#define CLIP_CHARACTER_PRECIS 0x01 +#define CLIP_STROKE_PRECIS 0x02 +#define CLIP_MASK 0x0F +#if (WINVER >= 0x030a) +#define CLIP_LH_ANGLES 0x10 +#define CLIP_TT_ALWAYS 0x20 +#define CLIP_EMBEDDED 0x80 +#endif /* WINVER >= 0x030a */ + +/* Quality values */ +#define DEFAULT_QUALITY 0 +#define DRAFT_QUALITY 1 +#define PROOF_QUALITY 2 + +/* PitchAndFamily pitch values (low 4 bits) */ +#define DEFAULT_PITCH 0x00 +#define FIXED_PITCH 0x01 +#define VARIABLE_PITCH 0x02 + +/* PitchAndFamily family values (high 4 bits) */ +#define FF_DONTCARE 0x00 +#define FF_ROMAN 0x10 +#define FF_SWISS 0x20 +#define FF_MODERN 0x30 +#define FF_SCRIPT 0x40 +#define FF_DECORATIVE 0x50 + +HFONT WINAPI CreateFont(int, int, int, int, int, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, LPCSTR); +HFONT WINAPI CreateFontIndirect(const LOGFONT FAR*); + +/* Stock fonts for use with GetStockObject() */ +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 + + +DWORD WINAPI SetMapperFlags(HDC, DWORD); +#define ASPECT_FILTERING 0x00000001L + +int WINAPI AddFontResource(LPCSTR); +BOOL WINAPI RemoveFontResource(LPCSTR); + +#define WM_FONTCHANGE 0x001D + +int WINAPI GetTextFace(HDC, int, LPSTR); + +DWORD WINAPI GetAspectRatioFilter(HDC); +#if (WINVER >= 0x030a) +BOOL WINAPI GetAspectRatioFilterEx(HDC, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +#endif /* NOGDIOBJ */ + +#ifndef NOTEXTMETRIC + +typedef struct tagTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; +} TEXTMETRIC; +typedef TEXTMETRIC* PTEXTMETRIC; +typedef TEXTMETRIC NEAR* NPTEXTMETRIC; +typedef TEXTMETRIC FAR* LPTEXTMETRIC; + +/* tmPitchAndFamily values */ +#define TMPF_FIXED_PITCH 0x01 +#define TMPF_VECTOR 0x02 +#define TMPF_DEVICE 0x08 +#if (WINVER >= 0x030a) +#define TMPF_TRUETYPE 0x04 +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetTextMetrics(HDC, TEXTMETRIC FAR*); + +#if (WINVER >= 0x030a) +#ifndef NOSCALABLEFONT + +typedef struct tagPANOSE +{ + BYTE bFamilyType; + BYTE bSerifStyle; + BYTE bWeight; + BYTE bProportion; + BYTE bContrast; + BYTE bStrokeVariation; + BYTE bArmStyle; + BYTE bLetterform; + BYTE bMidline; + BYTE bXHeight; +} PANOSE, FAR* LPPANOSE; + +typedef struct tagOUTLINETEXTMETRIC +{ + UINT otmSize; + TEXTMETRIC otmTextMetrics; + BYTE otmFiller; + PANOSE otmPanoseNumber; + UINT otmfsSelection; + UINT otmfsType; + int otmsCharSlopeRise; + int otmsCharSlopeRun; + int otmItalicAngle; + UINT otmEMSquare; + int otmAscent; + int otmDescent; + UINT otmLineGap; + UINT otmsCapEmHeight; + UINT otmsXHeight; + RECT otmrcFontBox; + int otmMacAscent; + int otmMacDescent; + UINT otmMacLineGap; + UINT otmusMinimumPPEM; + POINT otmptSubscriptSize; + POINT otmptSubscriptOffset; + POINT otmptSuperscriptSize; + POINT otmptSuperscriptOffset; + UINT otmsStrikeoutSize; + int otmsStrikeoutPosition; + int otmsUnderscorePosition; + int otmsUnderscoreSize; + PSTR otmpFamilyName; + PSTR otmpFaceName; + PSTR otmpStyleName; + PSTR otmpFullName; +} OUTLINETEXTMETRIC, FAR* LPOUTLINETEXTMETRIC; + +WORD WINAPI GetOutlineTextMetrics(HDC, UINT, OUTLINETEXTMETRIC FAR*); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +#ifndef NOGDIOBJ +#if (WINVER >= 0x030a) + +/* Structure passed to FONTENUMPROC */ +/* NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields */ +typedef struct tagNEWTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; + DWORD ntmFlags; + UINT ntmSizeEM; + UINT ntmCellHeight; + UINT ntmAvgWidth; +} NEWTEXTMETRIC; +typedef NEWTEXTMETRIC* PNEWTEXTMETRIC; +typedef NEWTEXTMETRIC NEAR* NPNEWTEXTMETRIC; +typedef NEWTEXTMETRIC FAR* LPNEWTEXTMETRIC; + +/* ntmFlags field flags */ +#define NTM_REGULAR 0x00000040L +#define NTM_BOLD 0x00000020L +#define NTM_ITALIC 0x00000001L + +#define LF_FULLFACESIZE 64 + +/* Structure passed to FONTENUMPROC */ +typedef struct tagENUMLOGFONT +{ + LOGFONT elfLogFont; + char elfFullName[LF_FULLFACESIZE]; + char elfStyle[LF_FACESIZE]; +} ENUMLOGFONT, FAR* LPENUMLOGFONT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +#ifdef STRICT +#ifndef NOGDIOBJ + +typedef int (CALLBACK* OLDFONTENUMPROC)(const LOGFONT FAR*, const TEXTMETRIC FAR*, int, LPARAM); + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* FONTENUMPROC)(const ENUMLOGFONT FAR*, const NEWTEXTMETRIC FAR*, int, LPARAM); + +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPARAM); + +#else /* WINVER >= 0x030a */ +typedef OLDFONTENUMPROC FONTENUMPROC; +#endif /* WINVER >= 0x030a) */ + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPARAM); +#endif /* NOGDIOBJ */ + +#else /* STRICT */ + +typedef FARPROC OLDFONTENUMPROC; +typedef FARPROC FONTENUMPROC; + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPSTR); + +#if (WINVER >= 0x030a) +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPSTR); +#endif /* WINVER >= 0x030a */ + +#endif /* !STRICT */ + +/* EnumFonts font type values */ +#define RASTER_FONTTYPE 0x0001 +#define DEVICE_FONTTYPE 0X0002 +#if (WINVER >= 0x030a) +#define TRUETYPE_FONTTYPE 0x0004 +#endif /* WINVER >= 0x030a */ + +#endif /* NOTEXTMETRIC */ + +#ifndef NOSCALABLEFONT +#if (WINVER >= 0x030a) + +DWORD WINAPI GetFontData(HDC, DWORD, DWORD, void FAR*, DWORD); +BOOL WINAPI CreateScalableFontResource(UINT, LPCSTR, LPCSTR, LPCSTR); + +typedef struct tagGLYPHMETRICS +{ + UINT gmBlackBoxX; + UINT gmBlackBoxY; + POINT gmptGlyphOrigin; + int gmCellIncX; + int gmCellIncY; +} GLYPHMETRICS, FAR* LPGLYPHMETRICS; + +typedef struct tagFIXED +{ + UINT fract; + int value; +} FIXED, FAR* LPFIXED; + +typedef struct tagMAT2 +{ + FIXED eM11; + FIXED eM12; + FIXED eM21; + FIXED eM22; +} MAT2, FAR* LPMAT2; + +DWORD WINAPI GetGlyphOutline(HDC, UINT, UINT, GLYPHMETRICS FAR*, DWORD, void FAR*, const MAT2 FAR*); + +/* GetGlyphOutline constants */ +#define GGO_METRICS 0 +#define GGO_BITMAP 1 +#define GGO_NATIVE 2 + +#define TT_POLYGON_TYPE 24 + +#define TT_PRIM_LINE 1 +#define TT_PRIM_QSPLINE 2 + +typedef struct tagPOINTFX +{ + FIXED x; + FIXED y; +} POINTFX, FAR* LPPOINTFX; + +typedef struct tagTTPOLYCURVE +{ + UINT wType; + UINT cpfx; + POINTFX apfx[1]; +} TTPOLYCURVE, FAR* LPTTPOLYCURVE; + +typedef struct tagTTPOLYGONHEADER +{ + DWORD cb; + DWORD dwType; + POINTFX pfxStart; +} TTPOLYGONHEADER, FAR* LPTTPOLYGONHEADER; + +typedef struct tagABC +{ + int abcA; + UINT abcB; + int abcC; +} ABC; +typedef ABC FAR* LPABC; + +BOOL WINAPI GetCharABCWidths(HDC, UINT, UINT, ABC FAR*); + +typedef struct tagKERNINGPAIR +{ + WORD wFirst; + WORD wSecond; + int iKernAmount; +} KERNINGPAIR, FAR* LPKERNINGPAIR; + +int WINAPI GetKerningPairs(HDC, int, KERNINGPAIR FAR*); + +typedef struct tagRASTERIZER_STATUS +{ + int nSize; + int wFlags; + int nLanguageID; +} RASTERIZER_STATUS; +typedef RASTERIZER_STATUS FAR* LPRASTERIZER_STATUS; + +/* bits defined in wFlags of RASTERIZER_STATUS */ +#define TT_AVAILABLE 0x0001 +#define TT_ENABLED 0x0002 + +BOOL WINAPI GetRasterizerCaps(RASTERIZER_STATUS FAR*, int); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +/****** Bitmap support ******************************************************/ + +#ifndef NOBITMAP +typedef struct tagBITMAP +{ + int bmType; + int bmWidth; + int bmHeight; + int bmWidthBytes; + BYTE bmPlanes; + BYTE bmBitsPixel; + void FAR* bmBits; +} BITMAP; +typedef BITMAP* PBITMAP; +typedef BITMAP NEAR* NPBITMAP; +typedef BITMAP FAR* LPBITMAP; + +/* Bitmap Header structures */ +typedef struct tagRGBTRIPLE +{ + BYTE rgbtBlue; + BYTE rgbtGreen; + BYTE rgbtRed; +} RGBTRIPLE; +typedef RGBTRIPLE FAR* LPRGBTRIPLE; + +typedef struct tagRGBQUAD +{ + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} RGBQUAD; +typedef RGBQUAD FAR* LPRGBQUAD; + +/* structures for defining DIBs */ +typedef struct tagBITMAPCOREHEADER +{ + DWORD bcSize; + short bcWidth; + short bcHeight; + WORD bcPlanes; + WORD bcBitCount; +} BITMAPCOREHEADER; +typedef BITMAPCOREHEADER* PBITMAPCOREHEADER; +typedef BITMAPCOREHEADER FAR* LPBITMAPCOREHEADER; + +typedef struct tagBITMAPINFOHEADER +{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER* PBITMAPINFOHEADER; +typedef BITMAPINFOHEADER FAR* LPBITMAPINFOHEADER; + +/* constants for the biCompression field */ +#define BI_RGB 0L +#define BI_RLE8 1L +#define BI_RLE4 2L + +typedef struct tagBITMAPINFO +{ + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO; +typedef BITMAPINFO* PBITMAPINFO; +typedef BITMAPINFO FAR* LPBITMAPINFO; + +typedef struct tagBITMAPCOREINFO +{ + BITMAPCOREHEADER bmciHeader; + RGBTRIPLE bmciColors[1]; +} BITMAPCOREINFO; +typedef BITMAPCOREINFO* PBITMAPCOREINFO; +typedef BITMAPCOREINFO FAR* LPBITMAPCOREINFO; + +typedef struct tagBITMAPFILEHEADER +{ + UINT bfType; + DWORD bfSize; + UINT bfReserved1; + UINT bfReserved2; + DWORD bfOffBits; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER* PBITMAPFILEHEADER; +typedef BITMAPFILEHEADER FAR* LPBITMAPFILEHEADER; + + +HBITMAP WINAPI CreateBitmap(int, int, UINT, UINT, const void FAR*); +HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR* ); +HBITMAP WINAPI CreateCompatibleBitmap(HDC, int, int); +HBITMAP WINAPI CreateDiscardableBitmap(HDC, int, int); +HBITMAP WINAPI CreateDIBitmap(HDC, BITMAPINFOHEADER FAR*, DWORD, const void FAR*, BITMAPINFO FAR*, UINT); + +HBITMAP WINAPI LoadBitmap(HINSTANCE, LPCSTR); + +/* DIB color table identifiers */ +#define DIB_RGB_COLORS 0 +#define DIB_PAL_COLORS 1 + +/* constants for CreateDIBitmap */ +#define CBM_INIT 0x00000004L +#endif /* NOBITMAP */ + +#ifndef NORASTEROPS + +/* Binary raster ops */ +#define R2_BLACK 1 +#define R2_NOTMERGEPEN 2 +#define R2_MASKNOTPEN 3 +#define R2_NOTCOPYPEN 4 +#define R2_MASKPENNOT 5 +#define R2_NOT 6 +#define R2_XORPEN 7 +#define R2_NOTMASKPEN 8 +#define R2_MASKPEN 9 +#define R2_NOTXORPEN 10 +#define R2_NOP 11 +#define R2_MERGENOTPEN 12 +#define R2_COPYPEN 13 +#define R2_MERGEPENNOT 14 +#define R2_MERGEPEN 15 +#define R2_WHITE 16 + +/* Ternary raster operations */ +#define SRCCOPY 0x00CC0020L +#define SRCPAINT 0x00EE0086L +#define SRCAND 0x008800C6L +#define SRCINVERT 0x00660046L +#define SRCERASE 0x00440328L +#define NOTSRCCOPY 0x00330008L +#define NOTSRCERASE 0x001100A6L +#define MERGECOPY 0x00C000CAL +#define MERGEPAINT 0x00BB0226L +#define PATCOPY 0x00F00021L +#define PATPAINT 0x00FB0A09L +#define PATINVERT 0x005A0049L +#define DSTINVERT 0x00550009L +#define BLACKNESS 0x00000042L +#define WHITENESS 0x00FF0062L + +#endif /* NORASTEROPS */ + +#ifndef NOBITMAP +BOOL WINAPI BitBlt(HDC, int, int, int, int, HDC, int, int, DWORD); + +BOOL WINAPI PatBlt(HDC, int, int, int, int, DWORD); + +BOOL WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD); +int WINAPI StretchDIBits(HDC, int, int, int, int, int, + int, int, int, const void FAR*, LPBITMAPINFO, UINT, DWORD); + +COLORREF WINAPI SetPixel(HDC, int, int, COLORREF); +COLORREF WINAPI GetPixel(HDC, int, int); + +/* StretchBlt() Modes */ +#define BLACKONWHITE 1 +#define WHITEONBLACK 2 +#define COLORONCOLOR 3 + +/* new StretchBlt() Modes (simpler names) */ +#define STRETCH_ANDSCANS 1 +#define STRETCH_ORSCANS 2 +#define STRETCH_DELETESCANS 3 + +int WINAPI SetStretchBltMode(HDC, int); +int WINAPI GetStretchBltMode(HDC); + +DWORD WINAPI SetBitmapDimension(HBITMAP, int, int); +DWORD WINAPI GetBitmapDimension(HBITMAP); +#if (WINVER >= 0x030a) +BOOL WINAPI SetBitmapDimensionEx(HBITMAP, int, int, SIZE FAR*); +BOOL WINAPI GetBitmapDimensionEx(HBITMAP, SIZE FAR*); +#endif /* WINVER >= 0x030a */ +int WINAPI SetROP2(HDC, int); +int WINAPI GetROP2(HDC); + +LONG WINAPI SetBitmapBits(HBITMAP, DWORD, const void FAR*); +LONG WINAPI GetBitmapBits(HBITMAP, LONG, void FAR*); + +int WINAPI SetDIBits(HDC, HBITMAP, UINT, UINT, const void FAR*, BITMAPINFO FAR*, UINT); +int WINAPI GetDIBits(HDC, HBITMAP, UINT, UINT, void FAR*, BITMAPINFO FAR*, UINT); + +int WINAPI SetDIBitsToDevice(HDC, int, int, int, int, int, int, UINT, UINT, + void FAR*, BITMAPINFO FAR*, UINT); +#endif /* NOBITMAP */ + +/****** Metafile support ****************************************************/ + +#ifndef NOMETAFILE + +DECLARE_HANDLE(HMETAFILE); + +HDC WINAPI CreateMetaFile(LPCSTR); +HMETAFILE WINAPI CloseMetaFile(HDC); + +HMETAFILE WINAPI GetMetaFile(LPCSTR); +BOOL WINAPI DeleteMetaFile(HMETAFILE); +HMETAFILE WINAPI CopyMetaFile(HMETAFILE, LPCSTR); + +BOOL WINAPI PlayMetaFile(HDC, HMETAFILE); + +HGLOBAL WINAPI GetMetaFileBits(HMETAFILE); +HMETAFILE WINAPI SetMetaFileBits(HGLOBAL); +#if (WINVER >= 0x030a) +HMETAFILE WINAPI SetMetaFileBitsBetter(HGLOBAL); +#endif /* WINVER >= 0x030a */ + +/* Clipboard Metafile Picture Structure */ +typedef struct tagMETAFILEPICT +{ + int mm; + int xExt; + int yExt; + HMETAFILE hMF; +} METAFILEPICT; +typedef METAFILEPICT FAR* LPMETAFILEPICT; + +typedef struct tagMETAHEADER +{ + UINT mtType; + UINT mtHeaderSize; + UINT mtVersion; + DWORD mtSize; + UINT mtNoObjects; + DWORD mtMaxRecord; + UINT mtNoParameters; +} METAHEADER; + +typedef struct tagHANDLETABLE +{ + HGDIOBJ objectHandle[1]; +} HANDLETABLE; +typedef HANDLETABLE* PHANDLETABLE; +typedef HANDLETABLE FAR* LPHANDLETABLE; + +typedef struct tagMETARECORD +{ + DWORD rdSize; + UINT rdFunction; + UINT rdParm[1]; +} METARECORD; +typedef METARECORD* PMETARECORD; +typedef METARECORD FAR* LPMETARECORD; + +/* Metafile Functions */ +#define META_SETBKCOLOR 0x0201 +#define META_SETBKMODE 0x0102 +#define META_SETMAPMODE 0x0103 +#define META_SETROP2 0x0104 +#define META_SETRELABS 0x0105 +#define META_SETPOLYFILLMODE 0x0106 +#define META_SETSTRETCHBLTMODE 0x0107 +#define META_SETTEXTCHAREXTRA 0x0108 +#define META_SETTEXTCOLOR 0x0209 +#define META_SETTEXTJUSTIFICATION 0x020A +#define META_SETWINDOWORG 0x020B +#define META_SETWINDOWEXT 0x020C +#define META_SETVIEWPORTORG 0x020D +#define META_SETVIEWPORTEXT 0x020E +#define META_OFFSETWINDOWORG 0x020F +#define META_SCALEWINDOWEXT 0x0410 +#define META_OFFSETVIEWPORTORG 0x0211 +#define META_SCALEVIEWPORTEXT 0x0412 +#define META_LINETO 0x0213 +#define META_MOVETO 0x0214 +#define META_EXCLUDECLIPRECT 0x0415 +#define META_INTERSECTCLIPRECT 0x0416 +#define META_ARC 0x0817 +#define META_ELLIPSE 0x0418 +#define META_FLOODFILL 0x0419 +#define META_PIE 0x081A +#define META_RECTANGLE 0x041B +#define META_ROUNDRECT 0x061C +#define META_PATBLT 0x061D +#define META_SAVEDC 0x001E +#define META_SETPIXEL 0x041F +#define META_OFFSETCLIPRGN 0x0220 +#define META_TEXTOUT 0x0521 +#define META_BITBLT 0x0922 +#define META_STRETCHBLT 0x0B23 +#define META_POLYGON 0x0324 +#define META_POLYLINE 0x0325 +#define META_ESCAPE 0x0626 +#define META_RESTOREDC 0x0127 +#define META_FILLREGION 0x0228 +#define META_FRAMEREGION 0x0429 +#define META_INVERTREGION 0x012A +#define META_PAINTREGION 0x012B +#define META_SELECTCLIPREGION 0x012C +#define META_SELECTOBJECT 0x012D +#define META_SETTEXTALIGN 0x012E +#define META_DRAWTEXT 0x062F + +#define META_CHORD 0x0830 +#define META_SETMAPPERFLAGS 0x0231 +#define META_EXTTEXTOUT 0x0a32 +#define META_SETDIBTODEV 0x0d33 +#define META_SELECTPALETTE 0x0234 +#define META_REALIZEPALETTE 0x0035 +#define META_ANIMATEPALETTE 0x0436 +#define META_SETPALENTRIES 0x0037 +#define META_POLYPOLYGON 0x0538 +#define META_RESIZEPALETTE 0x0139 + +#define META_DIBBITBLT 0x0940 +#define META_DIBSTRETCHBLT 0x0b41 +#define META_DIBCREATEPATTERNBRUSH 0x0142 +#define META_STRETCHDIB 0x0f43 + +#define META_EXTFLOODFILL 0x0548 + +#define META_RESETDC 0x014C +#define META_STARTDOC 0x014D +#define META_STARTPAGE 0x004F +#define META_ENDPAGE 0x0050 +#define META_ABORTDOC 0x0052 +#define META_ENDDOC 0x005E + +#define META_DELETEOBJECT 0x01f0 + +#define META_CREATEPALETTE 0x00f7 +#define META_CREATEBRUSH 0x00F8 +#define META_CREATEPATTERNBRUSH 0x01F9 +#define META_CREATEPENINDIRECT 0x02FA +#define META_CREATEFONTINDIRECT 0x02FB +#define META_CREATEBRUSHINDIRECT 0x02FC +#define META_CREATEBITMAPINDIRECT 0x02FD +#define META_CREATEBITMAP 0x06FE +#define META_CREATEREGION 0x06FF + +void WINAPI PlayMetaFileRecord(HDC, HANDLETABLE FAR*, METARECORD FAR*, UINT); + +#ifdef STRICT +typedef int (CALLBACK* MFENUMPROC)(HDC, HANDLETABLE FAR*, METARECORD FAR*, int, LPARAM); +#else +typedef FARPROC MFENUMPROC; +#endif + +BOOL WINAPI EnumMetaFile(HDC, HMETAFILE, MFENUMPROC, LPARAM); + +#endif /* NOMETAFILE */ + +/****** Printing support ****************************************************/ + +#ifdef STRICT +typedef BOOL (CALLBACK* ABORTPROC)(HDC, int); +#else +typedef FARPROC ABORTPROC; +#endif + +#if (WINVER >= 0x030a) + +typedef struct +{ + int cbSize; + LPCSTR lpszDocName; + LPCSTR lpszOutput; +} DOCINFO; +typedef DOCINFO FAR* LPDOCINFO; + +int WINAPI StartDoc(HDC, DOCINFO FAR*); +int WINAPI StartPage(HDC); +int WINAPI EndPage(HDC); +int WINAPI EndDoc(HDC); +int WINAPI AbortDoc(HDC); + +int WINAPI SetAbortProc(HDC, ABORTPROC); +HANDLE WINAPI SpoolFile(LPSTR, LPSTR, LPSTR, LPSTR); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI QueryAbort(HDC, int); + +/* Spooler Error Codes */ +#define SP_NOTREPORTED 0x4000 +#define SP_ERROR (-1) +#define SP_APPABORT (-2) +#define SP_USERABORT (-3) +#define SP_OUTOFDISK (-4) +#define SP_OUTOFMEMORY (-5) + +#define PR_JOBSTATUS 0x0000 + +#endif /* NOGDI */ + +/* Spooler status notification message */ +#define WM_SPOOLERSTATUS 0x002A + +#ifndef NOGDI + +/******* GDI Escape support *************************************************/ + +int WINAPI Escape(HDC, int, int, LPCSTR, void FAR*); + +/* GDI Escapes */ +#define NEWFRAME 1 +#define ABORTDOC 2 +#define NEXTBAND 3 +#define SETCOLORTABLE 4 +#define GETCOLORTABLE 5 +#define FLUSHOUTPUT 6 +#define DRAFTMODE 7 +#define QUERYESCSUPPORT 8 +#define SETABORTPROC 9 +#define STARTDOC 10 +#define ENDDOC 11 +#define GETPHYSPAGESIZE 12 +#define GETPRINTINGOFFSET 13 +#define GETSCALINGFACTOR 14 +#define MFCOMMENT 15 +#define GETPENWIDTH 16 +#define SETCOPYCOUNT 17 +#define SELECTPAPERSOURCE 18 +#define DEVICEDATA 19 +#define PASSTHROUGH 19 +#define GETTECHNOLGY 20 +#define GETTECHNOLOGY 20 +#define SETLINECAP 21 +#define SETLINEJOIN 22 +#define SETMITERLIMIT 23 +#define BANDINFO 24 +#define DRAWPATTERNRECT 25 +#define GETVECTORPENSIZE 26 +#define GETVECTORBRUSHSIZE 27 +#define ENABLEDUPLEX 28 +#define GETSETPAPERBINS 29 +#define GETSETPRINTORIENT 30 +#define ENUMPAPERBINS 31 +#define SETDIBSCALING 32 +#define EPSPRINTING 33 +#define ENUMPAPERMETRICS 34 +#define GETSETPAPERMETRICS 35 +#define POSTSCRIPT_DATA 37 +#define POSTSCRIPT_IGNORE 38 +#define MOUSETRAILS 39 + +#define GETEXTENDEDTEXTMETRICS 256 +#define GETEXTENTTABLE 257 +#define GETPAIRKERNTABLE 258 +#define GETTRACKKERNTABLE 259 +#define EXTTEXTOUT 512 +#define GETFACENAME 513 +#define ENABLERELATIVEWIDTHS 768 +#define ENABLEPAIRKERNING 769 +#define SETKERNTRACK 770 +#define SETALLJUSTVALUES 771 +#define SETCHARSET 772 + +#define STRETCHBLT 2048 + +#define GETSETSCREENPARAMS 3072 + +#define BEGIN_PATH 4096 +#define CLIP_TO_PATH 4097 +#define END_PATH 4098 +#define EXT_DEVICE_CAPS 4099 +#define RESTORE_CTM 4100 +#define SAVE_CTM 4101 +#define SET_ARC_DIRECTION 4102 +#define SET_BACKGROUND_COLOR 4103 +#define SET_POLY_MODE 4104 +#define SET_SCREEN_ANGLE 4105 +#define SET_SPREAD 4106 +#define TRANSFORM_CTM 4107 +#define SET_CLIP_BOX 4108 +#define SET_BOUNDS 4109 + +#endif /* NOGDI */ + +/****** USER typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HWND); + +#ifndef NOUSER + +DECLARE_HANDLE(HMENU); + +DECLARE_HANDLE(HICON); +typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */ + +/****** System Metrics *******************************************************/ + +#ifndef NOSYSMETRICS + +int WINAPI GetSystemMetrics(int); + +/* GetSystemMetrics() codes */ +#define SM_CXSCREEN 0 +#define SM_CYSCREEN 1 +#define SM_CXVSCROLL 2 +#define SM_CYHSCROLL 3 +#define SM_CYCAPTION 4 +#define SM_CXBORDER 5 +#define SM_CYBORDER 6 +#define SM_CXDLGFRAME 7 +#define SM_CYDLGFRAME 8 +#define SM_CYVTHUMB 9 +#define SM_CXHTHUMB 10 +#define SM_CXICON 11 +#define SM_CYICON 12 +#define SM_CXCURSOR 13 +#define SM_CYCURSOR 14 +#define SM_CYMENU 15 +#define SM_CXFULLSCREEN 16 +#define SM_CYFULLSCREEN 17 +#define SM_CYKANJIWINDOW 18 +#define SM_MOUSEPRESENT 19 +#define SM_CYVSCROLL 20 +#define SM_CXHSCROLL 21 +#define SM_DEBUG 22 +#define SM_SWAPBUTTON 23 +#define SM_RESERVED1 24 +#define SM_RESERVED2 25 +#define SM_RESERVED3 26 +#define SM_RESERVED4 27 +#define SM_CXMIN 28 +#define SM_CYMIN 29 +#define SM_CXSIZE 30 +#define SM_CYSIZE 31 +#define SM_CXFRAME 32 +#define SM_CYFRAME 33 +#define SM_CXMINTRACK 34 +#define SM_CYMINTRACK 35 + +#if (WINVER >= 0x030a) +#define SM_CXDOUBLECLK 36 +#define SM_CYDOUBLECLK 37 +#define SM_CXICONSPACING 38 +#define SM_CYICONSPACING 39 +#define SM_MENUDROPALIGNMENT 40 +#define SM_PENWINDOWS 41 +#define SM_DBCSENABLED 42 +#endif /* WINVER >= 0x030a */ + +#define SM_CMETRICS 43 + +#endif /* NOSYSMETRICS */ + +UINT WINAPI GetDoubleClickTime(void); +void WINAPI SetDoubleClickTime(UINT); + +#define WM_DEVMODECHANGE 0x001B +#define WM_TIMECHANGE 0x001E + +/****** System Parameters support ********************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOSYSTEMPARAMSINFO + +BOOL WINAPI SystemParametersInfo(UINT, UINT, VOID FAR*, UINT); + +#define SPI_GETBEEP 1 +#define SPI_SETBEEP 2 +#define SPI_GETMOUSE 3 +#define SPI_SETMOUSE 4 +#define SPI_GETBORDER 5 +#define SPI_SETBORDER 6 +#define SPI_GETKEYBOARDSPEED 10 +#define SPI_SETKEYBOARDSPEED 11 +#define SPI_LANGDRIVER 12 +#define SPI_ICONHORIZONTALSPACING 13 +#define SPI_GETSCREENSAVETIMEOUT 14 +#define SPI_SETSCREENSAVETIMEOUT 15 +#define SPI_GETSCREENSAVEACTIVE 16 +#define SPI_SETSCREENSAVEACTIVE 17 +#define SPI_GETGRIDGRANULARITY 18 +#define SPI_SETGRIDGRANULARITY 19 +#define SPI_SETDESKWALLPAPER 20 +#define SPI_SETDESKPATTERN 21 +#define SPI_GETKEYBOARDDELAY 22 +#define SPI_SETKEYBOARDDELAY 23 +#define SPI_ICONVERTICALSPACING 24 +#define SPI_GETICONTITLEWRAP 25 +#define SPI_SETICONTITLEWRAP 26 +#define SPI_GETMENUDROPALIGNMENT 27 +#define SPI_SETMENUDROPALIGNMENT 28 +#define SPI_SETDOUBLECLKWIDTH 29 +#define SPI_SETDOUBLECLKHEIGHT 30 +#define SPI_GETICONTITLELOGFONT 31 +#define SPI_SETDOUBLECLICKTIME 32 +#define SPI_SETMOUSEBUTTONSWAP 33 +#define SPI_SETICONTITLELOGFONT 34 +#define SPI_GETFASTTASKSWITCH 35 +#define SPI_SETFASTTASKSWITCH 36 + +/* SystemParametersInfo flags */ +#define SPIF_UPDATEINIFILE 0x0001 +#define SPIF_SENDWININICHANGE 0x0002 + +#endif /* NOSYSTEMPARAMSINFO */ +#endif /* WINVER >= 0x030a */ + +/****** Rectangle support ****************************************************/ + +void WINAPI SetRect(RECT FAR*, int, int, int, int); +void WINAPI SetRectEmpty(RECT FAR*); + +void WINAPI CopyRect(RECT FAR*, const RECT FAR*); + +BOOL WINAPI IsRectEmpty(const RECT FAR*); + +BOOL WINAPI EqualRect(const RECT FAR*, const RECT FAR*); + +BOOL WINAPI IntersectRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI UnionRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*); + +void WINAPI OffsetRect(RECT FAR*, int, int); +void WINAPI InflateRect(RECT FAR*, int, int); + +BOOL WINAPI PtInRect(const RECT FAR*, POINT); + +/****** Window message support ***********************************************/ + +UINT WINAPI RegisterWindowMessage(LPCSTR); + +#define WM_NULL 0x0000 + +/* NOTE: All messages below 0x0400 are RESERVED by Windows */ +#define WM_USER 0x0400 + +#ifndef NOMSG + +/* Queued message structure */ +typedef struct tagMSG +{ + HWND hwnd; + UINT message; + WPARAM wParam; + LPARAM lParam; + DWORD time; + POINT pt; +} MSG; +typedef MSG* PMSG; +typedef MSG NEAR* NPMSG; +typedef MSG FAR* LPMSG; + +BOOL WINAPI GetMessage(MSG FAR*, HWND, UINT, UINT); +BOOL WINAPI PeekMessage(MSG FAR*, HWND, UINT, UINT, UINT); + +/* PeekMessage() options */ +#define PM_NOREMOVE 0x0000 +#define PM_REMOVE 0x0001 +#define PM_NOYIELD 0x0002 + +void WINAPI WaitMessage(void); + +DWORD WINAPI GetMessagePos(void); +LONG WINAPI GetMessageTime(void); +#if (WINVER >= 0x030a) +LPARAM WINAPI GetMessageExtraInfo(void); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI TranslateMessage(const MSG FAR*); +LONG WINAPI DispatchMessage(const MSG FAR*); + +BOOL WINAPI SetMessageQueue(int); + +BOOL WINAPI GetInputState(void); + +#if (WINVER >= 0x030a) +DWORD WINAPI GetQueueStatus(UINT flags); + +/* GetQueueStatus flags */ +#define QS_KEY 0x0001 +#define QS_MOUSEMOVE 0x0002 +#define QS_MOUSEBUTTON 0x0004 +#define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON) +#define QS_POSTMESSAGE 0x0008 +#define QS_TIMER 0x0010 +#define QS_PAINT 0x0020 +#define QS_SENDMESSAGE 0x0040 + +#define QS_ALLINPUT 0x007f +#endif /* WINVER >= 0x030a */ + +#endif /* NOMSG */ + +BOOL WINAPI PostMessage(HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI SendMessage(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG + +BOOL WINAPI PostAppMessage(HTASK, UINT, WPARAM, LPARAM); + +void WINAPI ReplyMessage(LRESULT); +BOOL WINAPI InSendMessage(void); + +/* Special HWND value for use with PostMessage() and SendMessage() */ +#define HWND_BROADCAST ((HWND)0xffff) + +BOOL WINAPI CallMsgFilter(MSG FAR*, int); + +#define WH_GETMESSAGE 3 + +#define WH_CALLWNDPROC 4 + +#define WH_MSGFILTER (-1) +#define WH_SYSMSGFILTER 6 + +/* CallMsgFilter() and WH_SYS/MSGFILTER context codes */ +#define MSGF_DIALOGBOX 0 +#define MSGF_MENU 2 +#define MSGF_MOVE 3 +#define MSGF_SIZE 4 +#define MSGF_SCROLLBAR 5 +#define MSGF_NEXTWINDOW 6 +#define MSGF_MAINLOOP 8 +#define MSGF_USER 4096 +#endif /* NOMSG */ + +/* Standard window messages */ +/* PenWindows specific messages */ +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F + +/* Coalescing messages */ +#define WM_COALESCE_FIRST 0x0390 +#define WM_COALESCE_LAST 0x039F + + +#if (WINVER >= 0x030a) +/****** Power management ****************************************************/ +#define WM_POWER 0x0048 + +/* wParam for WM_POWER window message and DRV_POWER driver notification */ +#define PWR_OK 1 +#define PWR_FAIL (-1) +#define PWR_SUSPENDREQUEST 1 +#define PWR_SUSPENDRESUME 2 +#define PWR_CRITICALRESUME 3 +#endif /* WINVER >= 0x030a */ + +/****** Application termination *********************************************/ + +#define WM_QUERYENDSESSION 0x0011 +#define WM_ENDSESSION 0x0016 + +#define WM_QUIT 0x0012 + +void WINAPI PostQuitMessage(int); + +#define WM_SYSTEMERROR 0x0017 + +/****** Window class management *********************************************/ + +typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); + +typedef struct tagWNDCLASS +{ + UINT style; + WNDPROC lpfnWndProc; + int cbClsExtra; + int cbWndExtra; + HINSTANCE hInstance; + HICON hIcon; + HCURSOR hCursor; + HBRUSH hbrBackground; + LPCSTR lpszMenuName; + LPCSTR lpszClassName; +} WNDCLASS; +typedef WNDCLASS* PWNDCLASS; +typedef WNDCLASS NEAR* NPWNDCLASS; +typedef WNDCLASS FAR* LPWNDCLASS; + +ATOM WINAPI RegisterClass(const WNDCLASS FAR*); +BOOL WINAPI UnregisterClass(LPCSTR, HINSTANCE); + +BOOL WINAPI GetClassInfo(HINSTANCE, LPCSTR, WNDCLASS FAR*); +int WINAPI GetClassName(HWND, LPSTR, int); + +#ifndef NOWINSTYLES + +/* Class styles */ +#define CS_VREDRAW 0x0001 +#define CS_HREDRAW 0x0002 + +#define CS_OWNDC 0x0020 +#define CS_CLASSDC 0x0040 +#define CS_PARENTDC 0x0080 + +#define CS_SAVEBITS 0x0800 + +#define CS_DBLCLKS 0x0008 + +#define CS_BYTEALIGNCLIENT 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 + +#define CS_NOCLOSE 0x0200 + +#define CS_KEYCVTWINDOW 0x0004 +#define CS_NOKEYCVT 0x0100 + +#define CS_GLOBALCLASS 0x4000 +#endif /* NOWINSTYLES */ + +#ifndef NOWINOFFSETS + +WORD WINAPI GetClassWord(HWND, int); +WORD WINAPI SetClassWord(HWND, int, WORD); +LONG WINAPI GetClassLong(HWND, int); +LONG WINAPI SetClassLong(HWND, int, LONG); + +/* Class field offsets for GetClassLong() and GetClassWord() */ +#define GCL_MENUNAME (-8) +#define GCW_HBRBACKGROUND (-10) +#define GCW_HCURSOR (-12) +#define GCW_HICON (-14) +#define GCW_HMODULE (-16) +#define GCW_CBWNDEXTRA (-18) +#define GCW_CBCLSEXTRA (-20) +#define GCL_WNDPROC (-24) +#define GCW_STYLE (-26) + +#if (WINVER >= 0x030a) +#define GCW_ATOM (-32) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINOFFSETS */ + +/****** Window creation/destroy *********************************************/ + +/* Window Styles */ +#ifndef NOWINSTYLES + +/* Basic window types */ +#define WS_OVERLAPPED 0x00000000L +#define WS_POPUP 0x80000000L +#define WS_CHILD 0x40000000L + +/* Clipping styles */ +#define WS_CLIPSIBLINGS 0x04000000L +#define WS_CLIPCHILDREN 0x02000000L + +/* Generic window states */ +#define WS_VISIBLE 0x10000000L +#define WS_DISABLED 0x08000000L + +/* Main window states */ +#define WS_MINIMIZE 0x20000000L +#define WS_MAXIMIZE 0x01000000L + +/* Main window styles */ +#define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */ +#define WS_BORDER 0x00800000L +#define WS_DLGFRAME 0x00400000L +#define WS_VSCROLL 0x00200000L +#define WS_HSCROLL 0x00100000L +#define WS_SYSMENU 0x00080000L +#define WS_THICKFRAME 0x00040000L +#define WS_MINIMIZEBOX 0x00020000L +#define WS_MAXIMIZEBOX 0x00010000L + +/* Control window styles */ +#define WS_GROUP 0x00020000L +#define WS_TABSTOP 0x00010000L + +/* Common Window Styles */ +#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) +#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU) +#define WS_CHILDWINDOW (WS_CHILD) + +/* Extended Window Styles */ +#define WS_EX_DLGMODALFRAME 0x00000001L +#define WS_EX_NOPARENTNOTIFY 0x00000004L + +#if (WINVER >= 0x030a) +#define WS_EX_TOPMOST 0x00000008L +#define WS_EX_ACCEPTFILES 0x00000010L +#define WS_EX_TRANSPARENT 0x00000020L +#endif /* WINVER >= 0x030a */ + +/* Obsolete style names */ +#define WS_TILED WS_OVERLAPPED +#define WS_ICONIC WS_MINIMIZE +#define WS_SIZEBOX WS_THICKFRAME +#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW + + +#endif /* NOWINSTYLES */ + +/* Special value for CreateWindow, et al. */ +#define HWND_DESKTOP ((HWND)0) + +BOOL WINAPI IsWindow(HWND); + +HWND WINAPI CreateWindowEx(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); +HWND WINAPI CreateWindow(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); + +#define WM_CREATE 0x0001 +#define WM_NCCREATE 0x0081 + +/* WM_CREATE/WM_NCCREATE lParam struct */ +typedef struct tagCREATESTRUCT +{ + void FAR* lpCreateParams; + HINSTANCE hInstance; + HMENU hMenu; + HWND hwndParent; + int cy; + int cx; + int y; + int x; + LONG style; + LPCSTR lpszName; + LPCSTR lpszClass; + DWORD dwExStyle; +} CREATESTRUCT; +typedef CREATESTRUCT FAR* LPCREATESTRUCT; + +BOOL WINAPI DestroyWindow(HWND); + +#define WM_DESTROY 0x0002 +#define WM_NCDESTROY 0x0082 + +/* Basic window attributes */ + +HTASK WINAPI GetWindowTask(HWND); + +BOOL WINAPI IsChild(HWND, HWND); + +HWND WINAPI GetParent(HWND); +HWND WINAPI SetParent(HWND, HWND); + +BOOL WINAPI IsWindowVisible(HWND); + +BOOL WINAPI ShowWindow(HWND, int); + + +#ifndef NOSHOWWINDOW + +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 + +/* Obsolete ShowWindow() command names */ +#define HIDE_WINDOW 0 +#define SHOW_OPENWINDOW 1 +#define SHOW_ICONWINDOW 2 +#define SHOW_FULLSCREEN 3 +#define SHOW_OPENNOACTIVATE 4 + +#define WM_SHOWWINDOW 0x0018 + +/* WM_SHOWWINDOW wParam codes */ +#define SW_PARENTCLOSING 1 +#define SW_OTHERMAXIMIZED 2 +#define SW_PARENTOPENING 3 +#define SW_OTHERRESTORED 4 + +/* Obsolete constant names */ +#define SW_OTHERZOOM SW_OTHERMAXIMIZED +#define SW_OTHERUNZOOM SW_OTHERRESTORED +#endif /* NOSHOWWINDOW */ + +#define WM_SETREDRAW 0x000B + +/* Enabled state */ +BOOL WINAPI EnableWindow(HWND,BOOL); +BOOL WINAPI IsWindowEnabled(HWND); + +#define WM_ENABLE 0x000A + +/* Window text */ +void WINAPI SetWindowText(HWND, LPCSTR); +int WINAPI GetWindowText(HWND, LPSTR, int); +int WINAPI GetWindowTextLength(HWND); + +#define WM_SETTEXT 0x000C +#define WM_GETTEXT 0x000D +#define WM_GETTEXTLENGTH 0x000E + +/* Window words */ +WORD WINAPI GetWindowWord(HWND, int); +WORD WINAPI SetWindowWord(HWND, int, WORD); +LONG WINAPI GetWindowLong(HWND, int); +LONG WINAPI SetWindowLong(HWND, int, LONG); + +/* Window field offsets for GetWindowLong() and GetWindowWord() */ +#ifndef NOWINOFFSETS +#define GWL_WNDPROC (-4) +#define GWW_HINSTANCE (-6) +#define GWW_HWNDPARENT (-8) +#define GWW_ID (-12) +#define GWL_STYLE (-16) +#define GWL_EXSTYLE (-20) +#endif /* NOWINOFFSETS */ + +/****** Window size, position, Z-order, and visibility **********************/ + +#define CW_USEDEFAULT ((int)0x8000) + +void WINAPI GetClientRect(HWND, RECT FAR*); +void WINAPI GetWindowRect(HWND, RECT FAR*); + + +#if (WINVER >= 0x030a) +typedef struct tagWINDOWPLACEMENT +{ + UINT length; + UINT flags; + UINT showCmd; + POINT ptMinPosition; + POINT ptMaxPosition; + RECT rcNormalPosition; +} WINDOWPLACEMENT; +typedef WINDOWPLACEMENT *PWINDOWPLACEMENT; +typedef WINDOWPLACEMENT FAR* LPWINDOWPLACEMENT; + +#define WPF_SETMINPOSITION 0x0001 +#define WPF_RESTORETOMAXIMIZED 0x0002 + +BOOL WINAPI GetWindowPlacement(HWND, WINDOWPLACEMENT FAR*); +BOOL WINAPI SetWindowPlacement(HWND, const WINDOWPLACEMENT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI SetWindowPos(HWND, HWND, int, int, int, int, UINT); + +/* SetWindowPos() and WINDOWPOS flags */ +#define SWP_NOSIZE 0x0001 +#define SWP_NOMOVE 0x0002 +#define SWP_NOZORDER 0x0004 +#define SWP_NOREDRAW 0x0008 +#define SWP_NOACTIVATE 0x0010 +#define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */ +#define SWP_SHOWWINDOW 0x0040 +#define SWP_HIDEWINDOW 0x0080 +#define SWP_NOCOPYBITS 0x0100 +#define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */ + +#define SWP_DRAWFRAME SWP_FRAMECHANGED +#define SWP_NOREPOSITION SWP_NOOWNERZORDER + +#define SWP_NOSENDCHANGING 0x0400 +#define SWP_DEFERERASE 0x2000 + +/* SetWindowPos() hwndInsertAfter field values */ +#define HWND_TOP ((HWND)0) +#define HWND_BOTTOM ((HWND)1) +#define HWND_TOPMOST ((HWND)-1) +#define HWND_NOTOPMOST ((HWND)-2) + +#ifndef NODEFERWINDOWPOS + +DECLARE_HANDLE(HDWP); + +HDWP WINAPI BeginDeferWindowPos(int); +HDWP WINAPI DeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT); +BOOL WINAPI EndDeferWindowPos(HDWP); + +#endif /* NODEFERWINDOWPOS */ + +BOOL WINAPI MoveWindow(HWND, int, int, int, int, BOOL); +BOOL WINAPI BringWindowToTop(HWND); + +#if (WINVER >= 0x030a) + +#define WM_WINDOWPOSCHANGING 0x0046 +#define WM_WINDOWPOSCHANGED 0x0047 + +/* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */ +typedef struct tagWINDOWPOS +{ + HWND hwnd; + HWND hwndInsertAfter; + int x; + int y; + int cx; + int cy; + UINT flags; +} WINDOWPOS; +typedef WINDOWPOS FAR* LPWINDOWPOS; +#endif /* WINVER >= 0x030a */ + +#define WM_MOVE 0x0003 +#define WM_SIZE 0x0005 + +/* WM_SIZE message wParam values */ +#define SIZE_RESTORED 0 +#define SIZE_MINIMIZED 1 +#define SIZE_MAXIMIZED 2 +#define SIZE_MAXSHOW 3 +#define SIZE_MAXHIDE 4 + +/* Obsolete constant names */ +#define SIZENORMAL SIZE_RESTORED +#define SIZEICONIC SIZE_MINIMIZED +#define SIZEFULLSCREEN SIZE_MAXIMIZED +#define SIZEZOOMSHOW SIZE_MAXSHOW +#define SIZEZOOMHIDE SIZE_MAXHIDE + +/****** Window proc implementation & subclassing support *********************/ + +LRESULT WINAPI DefWindowProc(HWND, UINT, WPARAM, LPARAM); + +#ifdef STRICT +LRESULT WINAPI CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM); +#else +LRESULT WINAPI CallWindowProc(FARPROC, HWND, UINT, WPARAM, LPARAM); +#endif + +/****** Main window support **************************************************/ + +void WINAPI AdjustWindowRect(RECT FAR*, DWORD, BOOL); +void WINAPI AdjustWindowRectEx(RECT FAR*, DWORD, BOOL, DWORD); + +#define WM_QUERYOPEN 0x0013 +#define WM_CLOSE 0x0010 + +/* Struct pointed to by WM_GETMINMAXINFO lParam */ +typedef struct tagMINMAXINFO +{ + POINT ptReserved; + POINT ptMaxSize; + POINT ptMaxPosition; + POINT ptMinTrackSize; + POINT ptMaxTrackSize; +} MINMAXINFO; +#define WM_GETMINMAXINFO 0x0024 + + +BOOL WINAPI FlashWindow(HWND, BOOL); + +void WINAPI ShowOwnedPopups(HWND, BOOL); + +/* Obsolete functions */ +BOOL WINAPI OpenIcon(HWND); +void WINAPI CloseWindow(HWND); +BOOL WINAPI AnyPopup(void); +BOOL WINAPI IsIconic(HWND); +BOOL WINAPI IsZoomed(HWND); + +/****** Window coordinate mapping and hit-testing ***************************/ + +void WINAPI ClientToScreen(HWND, POINT FAR*); +void WINAPI ScreenToClient(HWND, POINT FAR*); + +#if (WINVER >= 0x030a) +void WINAPI MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT FAR* lppt, UINT cpt); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI WindowFromPoint(POINT); +HWND WINAPI ChildWindowFromPoint(HWND, POINT); + +/****** Window query and enumeration ****************************************/ + +HWND WINAPI GetDesktopWindow(void); + +HWND WINAPI FindWindow(LPCSTR, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM); +#else +typedef FARPROC WNDENUMPROC; +#endif + +BOOL WINAPI EnumWindows(WNDENUMPROC, LPARAM); +BOOL WINAPI EnumChildWindows(HWND, WNDENUMPROC, LPARAM); +BOOL WINAPI EnumTaskWindows(HTASK, WNDENUMPROC, LPARAM); + +HWND WINAPI GetTopWindow(HWND); + +HWND WINAPI GetWindow(HWND, UINT); +HWND WINAPI GetNextWindow(HWND, UINT); + +/* GetWindow() constants */ +#define GW_HWNDFIRST 0 +#define GW_HWNDLAST 1 +#define GW_HWNDNEXT 2 +#define GW_HWNDPREV 3 +#define GW_OWNER 4 +#define GW_CHILD 5 + + +/****** Window property support *********************************************/ + +BOOL WINAPI SetProp(HWND, LPCSTR, HANDLE); +HANDLE WINAPI GetProp(HWND, LPCSTR); +HANDLE WINAPI RemoveProp(HWND, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE); +#else +typedef FARPROC PROPENUMPROC; +#endif + +int WINAPI EnumProps(HWND, PROPENUMPROC); + +/****** Window drawing support **********************************************/ + +HDC WINAPI GetDC(HWND); +int WINAPI ReleaseDC(HWND, HDC); + +HDC WINAPI GetWindowDC(HWND); + +#if (WINVER >= 0x030a) +HDC WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags); + +#define DCX_WINDOW 0x00000001L +#define DCX_CACHE 0x00000002L +#define DCX_CLIPCHILDREN 0x00000008L +#define DCX_CLIPSIBLINGS 0x00000010L +#define DCX_PARENTCLIP 0x00000020L + +#define DCX_EXCLUDERGN 0x00000040L +#define DCX_INTERSECTRGN 0x00000080L + + +#define DCX_LOCKWINDOWUPDATE 0x00000400L + + +#define DCX_USESTYLE 0x00010000L + +#endif /* WINVER >= 0x030a */ + +/****** Window repainting ***************************************************/ + +#define WM_PAINT 0x000F +#define WM_ERASEBKGND 0x0014 +#define WM_ICONERASEBKGND 0x0027 + +/* BeginPaint() return structure */ +typedef struct tagPAINTSTRUCT +{ + HDC hdc; + BOOL fErase; + RECT rcPaint; + BOOL fRestore; + BOOL fIncUpdate; + BYTE rgbReserved[16]; +} PAINTSTRUCT; +typedef PAINTSTRUCT* PPAINTSTRUCT; +typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT; +typedef PAINTSTRUCT FAR* LPPAINTSTRUCT; + +HDC WINAPI BeginPaint(HWND, PAINTSTRUCT FAR*); +void WINAPI EndPaint(HWND, const PAINTSTRUCT FAR*); + +void WINAPI UpdateWindow(HWND); + +int WINAPI ExcludeUpdateRgn(HDC, HWND); + +#if (WINVER >= 0x030a) +BOOL WINAPI LockWindowUpdate(HWND hwndLock); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetUpdateRect(HWND, RECT FAR*, BOOL); +int WINAPI GetUpdateRgn(HWND, HRGN, BOOL); + +void WINAPI InvalidateRect(HWND, const RECT FAR*, BOOL); +void WINAPI ValidateRect(HWND, const RECT FAR*); + +void WINAPI InvalidateRgn(HWND, HRGN, BOOL); +void WINAPI ValidateRgn(HWND, HRGN); + +#if (WINVER >= 0x030a) +BOOL WINAPI RedrawWindow(HWND hwnd, const RECT FAR* lprcUpdate, HRGN hrgnUpdate, UINT flags); + +#define RDW_INVALIDATE 0x0001 +#define RDW_INTERNALPAINT 0x0002 +#define RDW_ERASE 0x0004 + +#define RDW_VALIDATE 0x0008 +#define RDW_NOINTERNALPAINT 0x0010 +#define RDW_NOERASE 0x0020 + +#define RDW_NOCHILDREN 0x0040 +#define RDW_ALLCHILDREN 0x0080 + +#define RDW_UPDATENOW 0x0100 +#define RDW_ERASENOW 0x0200 + +#define RDW_FRAME 0x0400 +#define RDW_NOFRAME 0x0800 + +#endif /* WINVER >= 0x030a */ + +/****** Window scrolling ****************************************************/ + +void WINAPI ScrollWindow(HWND, int, int, const RECT FAR*, const RECT FAR*); +BOOL WINAPI ScrollDC(HDC, int, int, const RECT FAR*, const RECT FAR*, HRGN, RECT FAR*); + +#if (WINVER >= 0x030a) + +int WINAPI ScrollWindowEx(HWND hwnd, int dx, int dy, + const RECT FAR* prcScroll, const RECT FAR* prcClip, + HRGN hrgnUpdate, RECT FAR* prcUpdate, UINT flags); + +#define SW_SCROLLCHILDREN 0x0001 +#define SW_INVALIDATE 0x0002 +#define SW_ERASE 0x0004 + + +#endif /* WINVER >= 0x030a */ + +/****** Non-client window area management ************************************/ + +#define WM_NCPAINT 0x0085 + +#define WM_NCCALCSIZE 0x0083 + +#if (WINVER >= 0x030a) +/* WM_NCCALCSIZE return flags */ +#define WVR_ALIGNTOP 0x0010 +#define WVR_ALIGNLEFT 0x0020 +#define WVR_ALIGNBOTTOM 0x0040 +#define WVR_ALIGNRIGHT 0x0080 +#define WVR_HREDRAW 0x0100 +#define WVR_VREDRAW 0x0200 +#define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW) +#define WVR_VALIDRECTS 0x0400 + + +/* WM_NCCALCSIZE parameter structure */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[3]; + WINDOWPOS FAR* lppos; +} NCCALCSIZE_PARAMS; +#else /* WINVER >= 0x030a */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[2]; +} NCCALCSIZE_PARAMS; +#endif /* WINVER >= 0x030a */ +typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS; + +#define WM_NCHITTEST 0x0084 + +/* WM_NCHITTEST return codes */ +#define HTERROR (-2) +#define HTTRANSPARENT (-1) +#define HTNOWHERE 0 +#define HTCLIENT 1 +#define HTCAPTION 2 +#define HTSYSMENU 3 +#define HTSIZE 4 +#define HTMENU 5 +#define HTHSCROLL 6 +#define HTVSCROLL 7 +#define HTMINBUTTON 8 +#define HTMAXBUTTON 9 +#define HTLEFT 10 +#define HTRIGHT 11 +#define HTTOP 12 +#define HTTOPLEFT 13 +#define HTTOPRIGHT 14 +#define HTBOTTOM 15 +#define HTBOTTOMLEFT 16 +#define HTBOTTOMRIGHT 17 +#define HTBORDER 18 +#define HTGROWBOX HTSIZE +#define HTREDUCE HTMINBUTTON +#define HTZOOM HTMAXBUTTON + +/****** Drag-and-drop support ***********************************************/ + +#define WM_QUERYDRAGICON 0x0037 +#define WM_DROPFILES 0x0233 + +/****** Window activation ***************************************************/ + +HWND WINAPI SetActiveWindow(HWND); +HWND WINAPI GetActiveWindow(void); + +HWND WINAPI GetLastActivePopup(HWND); + +/* WM_ACTIVATE state values */ +#define WA_INACTIVE 0 +#define WA_ACTIVE 1 +#define WA_CLICKACTIVE 2 + +#define WM_ACTIVATE 0x0006 +#define WM_ACTIVATEAPP 0x001C +#define WM_NCACTIVATE 0x0086 + +/****** Keyboard input support **********************************************/ + +HWND WINAPI SetFocus(HWND); +HWND WINAPI GetFocus(void); + +int WINAPI GetKeyState(int); +int WINAPI GetAsyncKeyState(int); + +void WINAPI GetKeyboardState(BYTE FAR* ); +void WINAPI SetKeyboardState(BYTE FAR* ); + +#define WM_SETFOCUS 0x0007 +#define WM_KILLFOCUS 0x0008 + +#define WM_KEYDOWN 0x0100 +#define WM_KEYUP 0x0101 + +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 + +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 + +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 + + +/* Keyboard message range */ +#define WM_KEYFIRST 0x0100 +#define WM_KEYLAST 0x0108 + +/* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */ +#define KF_EXTENDED 0x0100 +#define KF_DLGMODE 0x0800 +#define KF_MENUMODE 0x1000 +#define KF_ALTDOWN 0x2000 +#define KF_REPEAT 0x4000 +#define KF_UP 0x8000 + +/* Virtual key codes */ +#ifndef NOVIRTUALKEYCODES +#define VK_LBUTTON 0x01 +#define VK_RBUTTON 0x02 +#define VK_CANCEL 0x03 +#define VK_MBUTTON 0x04 +#define VK_BACK 0x08 +#define VK_TAB 0x09 +#define VK_CLEAR 0x0C +#define VK_RETURN 0x0D +#define VK_SHIFT 0x10 +#define VK_CONTROL 0x11 +#define VK_MENU 0x12 +#define VK_PAUSE 0x13 +#define VK_CAPITAL 0x14 +#define VK_ESCAPE 0x1B +#define VK_SPACE 0x20 +#define VK_PRIOR 0x21 +#define VK_NEXT 0x22 +#define VK_END 0x23 +#define VK_HOME 0x24 +#define VK_LEFT 0x25 +#define VK_UP 0x26 +#define VK_RIGHT 0x27 +#define VK_DOWN 0x28 +#define VK_SELECT 0x29 +#define VK_PRINT 0x2A +#define VK_EXECUTE 0x2B +#define VK_SNAPSHOT 0x2C +#define VK_INSERT 0x2D +#define VK_DELETE 0x2E +#define VK_HELP 0x2F +#define VK_NUMPAD0 0x60 +#define VK_NUMPAD1 0x61 +#define VK_NUMPAD2 0x62 +#define VK_NUMPAD3 0x63 +#define VK_NUMPAD4 0x64 +#define VK_NUMPAD5 0x65 +#define VK_NUMPAD6 0x66 +#define VK_NUMPAD7 0x67 +#define VK_NUMPAD8 0x68 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define VK_ADD 0x6B +#define VK_SEPARATOR 0x6C +#define VK_SUBTRACT 0x6D +#define VK_DECIMAL 0x6E +#define VK_DIVIDE 0x6F +#define VK_F1 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define VK_F12 0x7B +#define VK_F13 0x7C +#define VK_F14 0x7D +#define VK_F15 0x7E +#define VK_F16 0x7F +#define VK_F17 0x80 +#define VK_F18 0x81 +#define VK_F19 0x82 +#define VK_F20 0x83 +#define VK_F21 0x84 +#define VK_F22 0x85 +#define VK_F23 0x86 +#define VK_F24 0x87 +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 + +/* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */ +/* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' */ + +#endif /* NOVIRTUALKEYCODES */ + + +/* SetWindowsHook() keyboard hook */ +#define WH_KEYBOARD 2 + +/****** Mouse input support *************************************************/ + +HWND WINAPI SetCapture(HWND); +void WINAPI ReleaseCapture(void); +HWND WINAPI GetCapture(void); + +BOOL WINAPI SwapMouseButton(BOOL); + +/* Mouse input messages */ +#define WM_MOUSEMOVE 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 + +/* Mouse input message range */ +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSELAST 0x0209 + +/* Mouse message wParam key states */ +#ifndef NOKEYSTATES +#define MK_LBUTTON 0x0001 +#define MK_RBUTTON 0x0002 +#define MK_SHIFT 0x0004 +#define MK_CONTROL 0x0008 +#define MK_MBUTTON 0x0010 +#endif /* NOKEYSTATES */ + +/* Non-client mouse messages */ +#define WM_NCMOUSEMOVE 0x00A0 +#define WM_NCLBUTTONDOWN 0x00A1 +#define WM_NCLBUTTONUP 0x00A2 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define WM_NCRBUTTONDOWN 0x00A4 +#define WM_NCRBUTTONUP 0x00A5 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define WM_NCMBUTTONDOWN 0x00A7 +#define WM_NCMBUTTONUP 0x00A8 +#define WM_NCMBUTTONDBLCLK 0x00A9 + +/* Mouse click activation support */ +#define WM_MOUSEACTIVATE 0x0021 + +/* WM_MOUSEACTIVATE return codes */ +#define MA_ACTIVATE 1 +#define MA_ACTIVATEANDEAT 2 +#define MA_NOACTIVATE 3 +#if (WINVER >= 0x030a) +#define MA_NOACTIVATEANDEAT 4 +#endif /* WINVER >= 0x030a */ + +/* SetWindowsHook() mouse hook */ +#ifndef NOWH +#define WH_MOUSE 7 + +typedef struct tagMOUSEHOOKSTRUCT +{ + POINT pt; + HWND hwnd; + UINT wHitTestCode; + DWORD dwExtraInfo; +} MOUSEHOOKSTRUCT; +typedef MOUSEHOOKSTRUCT FAR* LPMOUSEHOOKSTRUCT; +#endif /* NOWH */ + +/****** Mode control ********************************************************/ + +#define WM_CANCELMODE 0x001F + +/****** System modal window support *****************************************/ + +HWND WINAPI GetSysModalWindow(void); +HWND WINAPI SetSysModalWindow(HWND); + +/****** Timer support *******************************************************/ + +#ifdef STRICT +typedef void (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD); +#else +typedef FARPROC TIMERPROC; +#endif + +UINT WINAPI SetTimer(HWND, UINT, UINT, TIMERPROC); + +BOOL WINAPI KillTimer(HWND, UINT); + +#define WM_TIMER 0x0113 + +/****** Accelerator support *************************************************/ + +DECLARE_HANDLE(HACCEL); + +HACCEL WINAPI LoadAccelerators(HINSTANCE, LPCSTR); + +#ifndef NOMSG +int WINAPI TranslateAccelerator(HWND, HACCEL, MSG FAR*); +#endif + +/****** Menu support ********************************************************/ + +#ifndef NOMENUS + +/* Menu template header */ +typedef struct +{ + UINT versionNumber; + UINT offset; +} MENUITEMTEMPLATEHEADER; + +/* Menu template item struct */ +typedef struct +{ + UINT mtOption; + UINT mtID; + char mtString[1]; +} MENUITEMTEMPLATE; + +#if (WINVER >= 0x030a) +BOOL WINAPI IsMenu(HMENU); +#endif /* WINVER >= 0x030a */ + +HMENU WINAPI CreateMenu(void); +HMENU WINAPI CreatePopupMenu(void); +HMENU WINAPI LoadMenu(HINSTANCE, LPCSTR); +HMENU WINAPI LoadMenuIndirect(const void FAR*); + +BOOL WINAPI DestroyMenu(HMENU); + +HMENU WINAPI GetMenu(HWND); +BOOL WINAPI SetMenu(HWND, HMENU); + +HMENU WINAPI GetSystemMenu(HWND, BOOL); + +void WINAPI DrawMenuBar(HWND); + +BOOL WINAPI HiliteMenuItem(HWND, HMENU, UINT, UINT); + +BOOL WINAPI InsertMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI AppendMenu(HMENU, UINT, UINT, LPCSTR); +BOOL WINAPI ModifyMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI RemoveMenu(HMENU, UINT, UINT); +BOOL WINAPI DeleteMenu(HMENU, UINT, UINT); + +BOOL WINAPI ChangeMenu(HMENU, UINT, LPCSTR, UINT, UINT); + +#define MF_INSERT 0x0000 +#define MF_CHANGE 0x0080 +#define MF_APPEND 0x0100 +#define MF_DELETE 0x0200 +#define MF_REMOVE 0x1000 + +/* Menu flags for Add/Check/EnableMenuItem() */ +#define MF_BYCOMMAND 0x0000 +#define MF_BYPOSITION 0x0400 + +#define MF_SEPARATOR 0x0800 + +#define MF_ENABLED 0x0000 +#define MF_GRAYED 0x0001 +#define MF_DISABLED 0x0002 + +#define MF_UNCHECKED 0x0000 +#define MF_CHECKED 0x0008 +#define MF_USECHECKBITMAPS 0x0200 + +#define MF_STRING 0x0000 +#define MF_BITMAP 0x0004 +#define MF_OWNERDRAW 0x0100 + +#define MF_POPUP 0x0010 +#define MF_MENUBARBREAK 0x0020 +#define MF_MENUBREAK 0x0040 + +#define MF_UNHILITE 0x0000 +#define MF_HILITE 0x0080 + +#define MF_SYSMENU 0x2000 +#define MF_HELP 0x4000 +#define MF_MOUSESELECT 0x8000 + + +#define MF_END 0x0080 /* Only valid in menu resource templates */ + +BOOL WINAPI EnableMenuItem(HMENU, UINT, UINT); +BOOL WINAPI CheckMenuItem(HMENU, UINT, UINT); + +HMENU WINAPI GetSubMenu(HMENU, int); + +int WINAPI GetMenuItemCount(HMENU); +UINT WINAPI GetMenuItemID(HMENU, int); + +int WINAPI GetMenuString(HMENU, UINT, LPSTR, int, UINT); +UINT WINAPI GetMenuState(HMENU, UINT, UINT); + +BOOL WINAPI SetMenuItemBitmaps(HMENU, UINT, UINT, HBITMAP, HBITMAP); +DWORD WINAPI GetMenuCheckMarkDimensions(void); + +BOOL WINAPI TrackPopupMenu(HMENU, UINT, int, int, int, HWND, const RECT FAR*); + +/* Flags for TrackPopupMenu */ +#define TPM_LEFTBUTTON 0x0000 +#if (WINVER >= 0x030a) +#define TPM_RIGHTBUTTON 0x0002 +#define TPM_LEFTALIGN 0x0000 +#define TPM_CENTERALIGN 0x0004 +#define TPM_RIGHTALIGN 0x0008 +#endif /* WINVER >= 0x030a */ + +#endif /* NOMENUS */ + +/* Menu messages */ +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 + +#ifndef NOMENUS + +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 + +#endif /* NOMENUS */ + +/* Menu and control command messages */ +#define WM_COMMAND 0x0111 + +/****** Scroll bar support **************************************************/ + +#ifndef NOSCROLL + +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 + +/* WM_H/VSCROLL commands */ +#define SB_LINEUP 0 +#define SB_LINELEFT 0 +#define SB_LINEDOWN 1 +#define SB_LINERIGHT 1 +#define SB_PAGEUP 2 +#define SB_PAGELEFT 2 +#define SB_PAGEDOWN 3 +#define SB_PAGERIGHT 3 +#define SB_THUMBPOSITION 4 +#define SB_THUMBTRACK 5 +#define SB_TOP 6 +#define SB_LEFT 6 +#define SB_BOTTOM 7 +#define SB_RIGHT 7 +#define SB_ENDSCROLL 8 + +/* Scroll bar selection constants */ +#define SB_HORZ 0 +#define SB_VERT 1 +#define SB_CTL 2 +#define SB_BOTH 3 + +int WINAPI SetScrollPos(HWND, int, int, BOOL); +int WINAPI GetScrollPos(HWND, int); +void WINAPI SetScrollRange(HWND, int, int, int, BOOL); +void WINAPI GetScrollRange(HWND, int, int FAR*, int FAR*); +void WINAPI ShowScrollBar(HWND, int, BOOL); +BOOL WINAPI EnableScrollBar(HWND, int, UINT); + +/* EnableScrollBar() flags */ +#define ESB_ENABLE_BOTH 0x0000 +#define ESB_DISABLE_BOTH 0x0003 + +#define ESB_DISABLE_LEFT 0x0001 +#define ESB_DISABLE_RIGHT 0x0002 + +#define ESB_DISABLE_UP 0x0001 +#define ESB_DISABLE_DOWN 0x0002 + +#define ESB_DISABLE_LTUP ESB_DISABLE_LEFT +#define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT + +#endif /* NOSCROLL */ + +/******* Clipboard manager **************************************************/ + +#ifndef NOCLIPBOARD + +/* Predefined Clipboard Formats */ +#define CF_TEXT 1 +#define CF_BITMAP 2 +#define CF_METAFILEPICT 3 +#define CF_SYLK 4 +#define CF_DIF 5 +#define CF_TIFF 6 +#define CF_OEMTEXT 7 +#define CF_DIB 8 +#define CF_PALETTE 9 +#define CF_PENDATA 10 +#define CF_RIFF 11 +#define CF_WAVE 12 + +#define CF_OWNERDISPLAY 0x0080 +#define CF_DSPTEXT 0x0081 +#define CF_DSPBITMAP 0x0082 +#define CF_DSPMETAFILEPICT 0x0083 + +/* "Private" formats don't get GlobalFree()'d */ +#define CF_PRIVATEFIRST 0x0200 +#define CF_PRIVATELAST 0x02FF + +/* "GDIOBJ" formats do get DeleteObject()'d */ +#define CF_GDIOBJFIRST 0x0300 +#define CF_GDIOBJLAST 0x03FF + +/* Clipboard Manager Functions */ +BOOL WINAPI OpenClipboard(HWND); +BOOL WINAPI CloseClipboard(void); +BOOL WINAPI EmptyClipboard(void); + +#if (WINVER >= 0x030a) +HWND WINAPI GetOpenClipboardWindow(void); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI GetClipboardOwner(void); + +HWND WINAPI SetClipboardViewer(HWND); +HWND WINAPI GetClipboardViewer(void); + +HANDLE WINAPI SetClipboardData(UINT, HANDLE); +HANDLE WINAPI GetClipboardData(UINT); + +BOOL WINAPI IsClipboardFormatAvailable(UINT); +int WINAPI GetPriorityClipboardFormat(UINT FAR*, int); + +UINT WINAPI RegisterClipboardFormat(LPCSTR); +int WINAPI CountClipboardFormats(void); +UINT WINAPI EnumClipboardFormats(UINT); +int WINAPI GetClipboardFormatName(UINT, LPSTR, int); + +BOOL WINAPI ChangeClipboardChain(HWND, HWND); + +/* Clipboard command messages */ +#define WM_CUT 0x0300 +#define WM_COPY 0x0301 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 + +/* Clipboard owner messages */ +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 + +/* Clipboard viewer messages */ +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_SIZECLIPBOARD 0x030B +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D + +#endif /* NOCLIPBOARD */ + +/****** Mouse cursor support *************************************************/ + +HCURSOR WINAPI LoadCursor(HINSTANCE, LPCSTR); +HCURSOR WINAPI CreateCursor(HINSTANCE, int, int, int, int, const void FAR*, const void FAR*); +BOOL WINAPI DestroyCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI CopyCursor(HINSTANCE, HCURSOR); +#endif /* WINVER >= 0x030a */ + +int WINAPI ShowCursor(BOOL); + +void WINAPI SetCursorPos(int, int); +void WINAPI GetCursorPos(POINT FAR*); + +HCURSOR WINAPI SetCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI GetCursor(void); +#endif /* WINVER >= 0x030a */ + +void WINAPI ClipCursor(const RECT FAR*); +#if (WINVER >= 0x030a) +void WINAPI GetClipCursor(RECT FAR*); +#endif /* WINVER >= 0x030a */ + +/* Standard cursor resource IDs */ +#define IDC_ARROW MAKEINTRESOURCE(32512) +#define IDC_IBEAM MAKEINTRESOURCE(32513) +#define IDC_WAIT MAKEINTRESOURCE(32514) +#define IDC_CROSS MAKEINTRESOURCE(32515) +#define IDC_UPARROW MAKEINTRESOURCE(32516) +#define IDC_SIZE MAKEINTRESOURCE(32640) +#define IDC_ICON MAKEINTRESOURCE(32641) +#define IDC_SIZENWSE MAKEINTRESOURCE(32642) +#define IDC_SIZENESW MAKEINTRESOURCE(32643) +#define IDC_SIZEWE MAKEINTRESOURCE(32644) +#define IDC_SIZENS MAKEINTRESOURCE(32645) + +#define WM_SETCURSOR 0x0020 + +/****** Icon support *********************************************************/ + +HICON WINAPI LoadIcon(HINSTANCE, LPCSTR); +HICON WINAPI CreateIcon(HINSTANCE, int, int, BYTE, BYTE, const void FAR*, const void FAR*); +BOOL WINAPI DestroyIcon(HICON); + +#if (WINVER >= 0x030a) +HICON WINAPI CopyIcon(HINSTANCE, HICON); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DrawIcon(HDC, int, int, HICON); + +#ifndef NOICONS + +/* Standard icon resource IDs */ +#define IDI_APPLICATION MAKEINTRESOURCE(32512) +#define IDI_HAND MAKEINTRESOURCE(32513) +#define IDI_QUESTION MAKEINTRESOURCE(32514) +#define IDI_EXCLAMATION MAKEINTRESOURCE(32515) +#define IDI_ASTERISK MAKEINTRESOURCE(32516) + +#endif /* NOICONS */ + +/****** Message Box support *************************************************/ + +#ifndef NOMB + +int WINAPI MessageBox(HWND, LPCSTR, LPCSTR, UINT); +void WINAPI MessageBeep(UINT); + +#define MB_OK 0x0000 +#define MB_OKCANCEL 0x0001 +#define MB_ABORTRETRYIGNORE 0x0002 +#define MB_YESNOCANCEL 0x0003 +#define MB_YESNO 0x0004 +#define MB_RETRYCANCEL 0x0005 +#define MB_TYPEMASK 0x000F + +#define MB_ICONHAND 0x0010 +#define MB_ICONQUESTION 0x0020 +#define MB_ICONEXCLAMATION 0x0030 +#define MB_ICONASTERISK 0x0040 +#define MB_ICONMASK 0x00F0 + +#define MB_ICONINFORMATION MB_ICONASTERISK +#define MB_ICONSTOP MB_ICONHAND + +#define MB_DEFBUTTON1 0x0000 +#define MB_DEFBUTTON2 0x0100 +#define MB_DEFBUTTON3 0x0200 +#define MB_DEFMASK 0x0F00 + +#define MB_APPLMODAL 0x0000 +#define MB_SYSTEMMODAL 0x1000 +#define MB_TASKMODAL 0x2000 + +#define MB_NOFOCUS 0x8000 + + + +#endif /* NOMB */ + +/****** Caret support ********************************************************/ + +void WINAPI CreateCaret(HWND, HBITMAP, int, int); +void WINAPI DestroyCaret(void); + +void WINAPI SetCaretPos(int, int); +void WINAPI GetCaretPos(POINT FAR*); + +void WINAPI HideCaret(HWND); +void WINAPI ShowCaret(HWND); + +UINT WINAPI GetCaretBlinkTime(void); +void WINAPI SetCaretBlinkTime(UINT); + +/****** WM_SYSCOMMAND support ***********************************************/ + +#define WM_SYSCOMMAND 0x0112 + +#ifndef NOSYSCOMMANDS + +/* System Menu Command Values */ +#define SC_SIZE 0xF000 +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 + +/* Obsolete names */ +#define SC_ICON SC_MINIMIZE +#define SC_ZOOM SC_MAXIMIZE + + +#endif /* NOSYSCOMMANDS */ + +/****** MDI Support *********************************************************/ + +#ifndef NOMDI + +/* CreateWindow lpParams structure for creating MDI client */ +typedef struct tagCLIENTCREATESTRUCT +{ + HMENU hWindowMenu; + UINT idFirstChild; +} CLIENTCREATESTRUCT; +typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT; + +/* MDI client style bits */ +#if (WINVER >= 0x030a) +#define MDIS_ALLCHILDSTYLES 0x0001 +#endif /* WINVER >= 0x030a */ + +/* MDI messages */ +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 + +/* WM_MDICREATE message structure */ +typedef struct tagMDICREATESTRUCT +{ + LPCSTR szClass; + LPCSTR szTitle; + HINSTANCE hOwner; + int x; + int y; + int cx; + int cy; + DWORD style; + LPARAM lParam; +} MDICREATESTRUCT; +typedef MDICREATESTRUCT FAR* LPMDICREATESTRUCT; + +#if (WINVER >= 0x030a) +/* wParam values for WM_MDITILE and WM_MDICASCADE messages. */ +#define MDITILE_VERTICAL 0x0000 +#define MDITILE_HORIZONTAL 0x0001 +#define MDITILE_SKIPDISABLED 0x0002 +#endif /* WINVER >= 0x030a */ + +#define WM_CHILDACTIVATE 0x0022 + +LRESULT WINAPI DefFrameProc(HWND, HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI DefMDIChildProc(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG +BOOL WINAPI TranslateMDISysAccel(HWND, MSG FAR*); +#endif + +UINT WINAPI ArrangeIconicWindows(HWND); + +#endif /* NOMDI */ + +/****** Dialog and Control Management ***************************************/ + +#ifndef NOCTLMGR + +/* Dialog window class */ +#define WC_DIALOG (MAKEINTATOM(0x8002)) + +/* cbWndExtra bytes needed by dialog manager for dialog classes */ +#define DLGWINDOWEXTRA 30 + +/* Dialog styles */ +#define DS_ABSALIGN 0x01L +#define DS_SYSMODAL 0x02L +#define DS_LOCALEDIT 0x20L +#define DS_SETFONT 0x40L +#define DS_MODALFRAME 0x80L +#define DS_NOIDLEMSG 0x100L + +/* Dialog messages */ +#define DM_GETDEFID (WM_USER+0) +#define DM_SETDEFID (WM_USER+1) + +/* Returned in HIWORD() of DM_GETDEFID result if msg is supported */ +#define DC_HASDEFID 0x534B + +#endif /* NOCTLMGR */ + +/* Dialog notification messages */ +#define WM_INITDIALOG 0x0110 +#define WM_NEXTDLGCTL 0x0028 + +#define WM_PARENTNOTIFY 0x0210 + +#define WM_ENTERIDLE 0x0121 + + +#ifndef NOCTLMGR + +#ifdef STRICT +typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM); +#else +typedef FARPROC DLGPROC; +#endif + +/* Get/SetWindowWord/Long offsets for use with WC_DIALOG windows */ +#define DWL_MSGRESULT 0 +#define DWL_DLGPROC 4 +#define DWL_USER 8 + +#ifndef NOMSG +BOOL WINAPI IsDialogMessage(HWND, MSG FAR*); +#endif + +LRESULT WINAPI DefDlgProc(HWND, UINT, WPARAM, LPARAM); + +HWND WINAPI CreateDialog(HINSTANCE, LPCSTR, HWND, DLGPROC); +HWND WINAPI CreateDialogIndirect(HINSTANCE, const void FAR*, HWND, DLGPROC); +HWND WINAPI CreateDialogParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +HWND WINAPI CreateDialogIndirectParam(HINSTANCE, const void FAR*, HWND, DLGPROC, LPARAM); + +int WINAPI DialogBox(HINSTANCE, LPCSTR, HWND, DLGPROC); +int WINAPI DialogBoxIndirect(HINSTANCE, HGLOBAL, HWND, DLGPROC); +int WINAPI DialogBoxParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +int WINAPI DialogBoxIndirectParam(HINSTANCE, HGLOBAL, HWND, DLGPROC, LPARAM); + +void WINAPI EndDialog(HWND, int); + +int WINAPI GetDlgCtrlID(HWND); +HWND WINAPI GetDlgItem(HWND, int); +LRESULT WINAPI SendDlgItemMessage(HWND, int, UINT, WPARAM, LPARAM); + +void WINAPI SetDlgItemInt(HWND, int, UINT, BOOL); +UINT WINAPI GetDlgItemInt(HWND, int, BOOL FAR* , BOOL); + +void WINAPI SetDlgItemText(HWND, int, LPCSTR); +int WINAPI GetDlgItemText(HWND, int, LPSTR, int); + +void WINAPI CheckDlgButton(HWND, int, UINT); +void WINAPI CheckRadioButton(HWND, int, int, int); +UINT WINAPI IsDlgButtonChecked(HWND, int); + +HWND WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL); +HWND WINAPI GetNextDlgTabItem(HWND, HWND, BOOL); + +void WINAPI MapDialogRect(HWND, RECT FAR*); +DWORD WINAPI GetDialogBaseUnits(void); + +#define WM_GETDLGCODE 0x0087 + +/* dialog codes */ +#define DLGC_WANTARROWS 0x0001 +#define DLGC_WANTTAB 0x0002 +#define DLGC_WANTALLKEYS 0x0004 +#define DLGC_WANTMESSAGE 0x0004 +#define DLGC_HASSETSEL 0x0008 +#define DLGC_DEFPUSHBUTTON 0x0010 +#define DLGC_UNDEFPUSHBUTTON 0x0020 +#define DLGC_RADIOBUTTON 0x0040 +#define DLGC_WANTCHARS 0x0080 +#define DLGC_STATIC 0x0100 +#define DLGC_BUTTON 0x2000 + +#define WM_CTLCOLOR 0x0019 + +/* WM_CTLCOLOR control IDs */ +#define CTLCOLOR_MSGBOX 0 +#define CTLCOLOR_EDIT 1 +#define CTLCOLOR_LISTBOX 2 +#define CTLCOLOR_BTN 3 +#define CTLCOLOR_DLG 4 +#define CTLCOLOR_SCROLLBAR 5 +#define CTLCOLOR_STATIC 6 + +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 + +#endif /* NOCTLMGR */ + +/* Standard dialog button IDs */ +#define IDOK 1 +#define IDCANCEL 2 +#define IDABORT 3 +#define IDRETRY 4 +#define IDIGNORE 5 +#define IDYES 6 +#define IDNO 7 + +/****** Owner draw control support ******************************************/ + +/* Owner draw control types */ +#define ODT_MENU 1 +#define ODT_LISTBOX 2 +#define ODT_COMBOBOX 3 +#define ODT_BUTTON 4 + +/* Owner draw actions */ +#define ODA_DRAWENTIRE 0x0001 +#define ODA_SELECT 0x0002 +#define ODA_FOCUS 0x0004 + +/* Owner draw state */ +#define ODS_SELECTED 0x0001 +#define ODS_GRAYED 0x0002 +#define ODS_DISABLED 0x0004 +#define ODS_CHECKED 0x0008 +#define ODS_FOCUS 0x0010 + +#define WM_DRAWITEM 0x002B + +typedef struct tagDRAWITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemAction; + UINT itemState; + HWND hwndItem; + HDC hDC; + RECT rcItem; + DWORD itemData; +} DRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT; + +#define WM_MEASUREITEM 0x002C + +typedef struct tagMEASUREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemWidth; + UINT itemHeight; + DWORD itemData; +} MEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT; + +#define WM_DELETEITEM 0x002D + +typedef struct tagDELETEITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + HWND hwndItem; + DWORD itemData; +} DELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT; + +#define WM_COMPAREITEM 0x0039 + +typedef struct tagCOMPAREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + HWND hwndItem; + UINT itemID1; + DWORD itemData1; + UINT itemID2; + DWORD itemData2; +} COMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT; + +/****** Static control ******************************************************/ + +#ifndef NOCTLMGR + +/* Static Control Styles */ +#define SS_LEFT 0x00000000L +#define SS_CENTER 0x00000001L +#define SS_RIGHT 0x00000002L +#define SS_ICON 0x00000003L +#define SS_BLACKRECT 0x00000004L +#define SS_GRAYRECT 0x00000005L +#define SS_WHITERECT 0x00000006L +#define SS_BLACKFRAME 0x00000007L +#define SS_GRAYFRAME 0x00000008L +#define SS_WHITEFRAME 0x00000009L +#define SS_SIMPLE 0x0000000BL +#define SS_LEFTNOWORDWRAP 0x0000000CL +#define SS_NOPREFIX 0x00000080L + +#if (WINVER >= 0x030a) +#ifndef NOWINMESSAGES +/* Static Control Mesages */ +#define STM_SETICON (WM_USER+0) +#define STM_GETICON (WM_USER+1) +#endif /* NOWINMESSAGES */ +#endif /* WINVER >= 0x030a */ + +#endif /* NOCTLMGR */ + +/****** Button control *****************************************************/ + +#ifndef NOCTLMGR + +/* Button Control Styles */ +#define BS_PUSHBUTTON 0x00000000L +#define BS_DEFPUSHBUTTON 0x00000001L +#define BS_CHECKBOX 0x00000002L +#define BS_AUTOCHECKBOX 0x00000003L +#define BS_RADIOBUTTON 0x00000004L +#define BS_3STATE 0x00000005L +#define BS_AUTO3STATE 0x00000006L +#define BS_GROUPBOX 0x00000007L +#define BS_USERBUTTON 0x00000008L +#define BS_AUTORADIOBUTTON 0x00000009L +#define BS_OWNERDRAW 0x0000000BL +#define BS_LEFTTEXT 0x00000020L + +/* Button Control Messages */ +#define BM_GETCHECK (WM_USER+0) +#define BM_SETCHECK (WM_USER+1) +#define BM_GETSTATE (WM_USER+2) +#define BM_SETSTATE (WM_USER+3) +#define BM_SETSTYLE (WM_USER+4) + +/* User Button Notification Codes */ +#define BN_CLICKED 0 +#define BN_PAINT 1 +#define BN_HILITE 2 +#define BN_UNHILITE 3 +#define BN_DISABLE 4 +#define BN_DOUBLECLICKED 5 + +#endif /* NOCTLMGR */ + +/****** Edit control *******************************************************/ + +#ifndef NOCTLMGR + +/* Edit control styles */ +#ifndef NOWINSTYLES +#define ES_LEFT 0x00000000L +#define ES_CENTER 0x00000001L +#define ES_RIGHT 0x00000002L +#define ES_MULTILINE 0x00000004L +#define ES_UPPERCASE 0x00000008L +#define ES_LOWERCASE 0x00000010L +#define ES_PASSWORD 0x00000020L +#define ES_AUTOVSCROLL 0x00000040L +#define ES_AUTOHSCROLL 0x00000080L +#define ES_NOHIDESEL 0x00000100L +#define ES_OEMCONVERT 0x00000400L +#if (WINVER >= 0x030a) +#define ES_READONLY 0x00000800L +#define ES_WANTRETURN 0x00001000L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Edit control messages */ +#ifndef NOWINMESSAGES +#define EM_GETSEL (WM_USER+0) +#define EM_SETSEL (WM_USER+1) +#define EM_GETRECT (WM_USER+2) +#define EM_SETRECT (WM_USER+3) +#define EM_SETRECTNP (WM_USER+4) +#define EM_LINESCROLL (WM_USER+6) +#define EM_GETMODIFY (WM_USER+8) +#define EM_SETMODIFY (WM_USER+9) +#define EM_GETLINECOUNT (WM_USER+10) +#define EM_LINEINDEX (WM_USER+11) +#define EM_SETHANDLE (WM_USER+12) +#define EM_GETHANDLE (WM_USER+13) +#define EM_LINELENGTH (WM_USER+17) +#define EM_REPLACESEL (WM_USER+18) +#define EM_SETFONT (WM_USER+19) /* NOT IMPLEMENTED: use WM_SETFONT */ +#define EM_GETLINE (WM_USER+20) +#define EM_LIMITTEXT (WM_USER+21) +#define EM_CANUNDO (WM_USER+22) +#define EM_UNDO (WM_USER+23) +#define EM_FMTLINES (WM_USER+24) +#define EM_LINEFROMCHAR (WM_USER+25) +#define EM_SETWORDBREAK (WM_USER+26) /* NOT IMPLEMENTED: use EM_SETWORDBREAK */ +#define EM_SETTABSTOPS (WM_USER+27) +#define EM_SETPASSWORDCHAR (WM_USER+28) +#define EM_EMPTYUNDOBUFFER (WM_USER+29) +#if (WINVER >= 0x030a) +#define EM_GETFIRSTVISIBLELINE (WM_USER+30) +#define EM_SETREADONLY (WM_USER+31) +#define EM_SETWORDBREAKPROC (WM_USER+32) +#define EM_GETWORDBREAKPROC (WM_USER+33) +#define EM_GETPASSWORDCHAR (WM_USER+34) +#endif /* WINVER >= 0x030a */ +#endif /* NOWINMESSAGES */ + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code); + +/* EDITWORDBREAKPROC code values */ +#define WB_LEFT 0 +#define WB_RIGHT 1 +#define WB_ISDELIMITER 2 +#endif /* WINVER >= 0x030a */ + +/* Edit control notification codes */ +#define EN_SETFOCUS 0x0100 +#define EN_KILLFOCUS 0x0200 +#define EN_CHANGE 0x0300 +#define EN_UPDATE 0x0400 +#define EN_ERRSPACE 0x0500 +#define EN_MAXTEXT 0x0501 +#define EN_HSCROLL 0x0601 +#define EN_VSCROLL 0x0602 + +#endif /* NOCTLMGR */ + +/****** Scroll bar control *************************************************/ +/* Also see scrolling support */ + +#ifndef NOCTLMGR + +#ifndef NOWINSTYLES + +/* Scroll bar styles */ +#define SBS_HORZ 0x0000L +#define SBS_VERT 0x0001L +#define SBS_TOPALIGN 0x0002L +#define SBS_LEFTALIGN 0x0002L +#define SBS_BOTTOMALIGN 0x0004L +#define SBS_RIGHTALIGN 0x0004L +#define SBS_SIZEBOXTOPLEFTALIGN 0x0002L +#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L +#define SBS_SIZEBOX 0x0008L + +#endif /* NOWINSTYLES */ + +#endif /* NOCTLMGR */ + +/****** Listbox control ****************************************************/ + +#ifndef NOCTLMGR + +/* Listbox styles */ +#ifndef NOWINSTYLES +#define LBS_NOTIFY 0x0001L +#define LBS_SORT 0x0002L +#define LBS_NOREDRAW 0x0004L +#define LBS_MULTIPLESEL 0x0008L +#define LBS_OWNERDRAWFIXED 0x0010L +#define LBS_OWNERDRAWVARIABLE 0x0020L +#define LBS_HASSTRINGS 0x0040L +#define LBS_USETABSTOPS 0x0080L +#define LBS_NOINTEGRALHEIGHT 0x0100L +#define LBS_MULTICOLUMN 0x0200L +#define LBS_WANTKEYBOARDINPUT 0x0400L +#define LBS_EXTENDEDSEL 0x0800L +#if (WINVER >= 0x030a) +#define LBS_DISABLENOSCROLL 0x1000L +#endif /* WINVER >= 0x030a */ +#define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) +#endif /* NOWINSTYLES */ + +/* Listbox messages */ +#ifndef NOWINMESSAGES +#define LB_ADDSTRING (WM_USER+1) +#define LB_INSERTSTRING (WM_USER+2) +#define LB_DELETESTRING (WM_USER+3) +#define LB_RESETCONTENT (WM_USER+5) +#define LB_SETSEL (WM_USER+6) +#define LB_SETCURSEL (WM_USER+7) +#define LB_GETSEL (WM_USER+8) +#define LB_GETCURSEL (WM_USER+9) +#define LB_GETTEXT (WM_USER+10) +#define LB_GETTEXTLEN (WM_USER+11) +#define LB_GETCOUNT (WM_USER+12) +#define LB_SELECTSTRING (WM_USER+13) +#define LB_DIR (WM_USER+14) +#define LB_GETTOPINDEX (WM_USER+15) +#define LB_FINDSTRING (WM_USER+16) +#define LB_GETSELCOUNT (WM_USER+17) +#define LB_GETSELITEMS (WM_USER+18) +#define LB_SETTABSTOPS (WM_USER+19) +#define LB_GETHORIZONTALEXTENT (WM_USER+20) +#define LB_SETHORIZONTALEXTENT (WM_USER+21) +#define LB_SETCOLUMNWIDTH (WM_USER+22) +#define LB_SETTOPINDEX (WM_USER+24) +#define LB_GETITEMRECT (WM_USER+25) +#define LB_GETITEMDATA (WM_USER+26) +#define LB_SETITEMDATA (WM_USER+27) +#define LB_SELITEMRANGE (WM_USER+28) +#define LB_SETCARETINDEX (WM_USER+31) +#define LB_GETCARETINDEX (WM_USER+32) + +#if (WINVER >= 0x030a) +#define LB_SETITEMHEIGHT (WM_USER+33) +#define LB_GETITEMHEIGHT (WM_USER+34) +#define LB_FINDSTRINGEXACT (WM_USER+35) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Listbox notification codes */ +#define LBN_ERRSPACE (-2) +#define LBN_SELCHANGE 1 +#define LBN_DBLCLK 2 +#define LBN_SELCANCEL 3 +#define LBN_SETFOCUS 4 +#define LBN_KILLFOCUS 5 + +/* Listbox notification messages */ +#define WM_VKEYTOITEM 0x002E +#define WM_CHARTOITEM 0x002F + +/* Listbox message return values */ +#define LB_OKAY 0 +#define LB_ERR (-1) +#define LB_ERRSPACE (-2) + +#define LB_CTLCODE 0L + +/****** Dialog directory support ********************************************/ + +int WINAPI DlgDirList(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelect(HWND, LPSTR, int); + +int WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelectComboBox(HWND, LPSTR, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI DlgDirSelectEx(HWND, LPSTR, int, int); +BOOL WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int); +#endif /* WINVER >= 0x030a */ + + +/* DlgDirList, DlgDirListComboBox flags values */ +#define DDL_READWRITE 0x0000 +#define DDL_READONLY 0x0001 +#define DDL_HIDDEN 0x0002 +#define DDL_SYSTEM 0x0004 +#define DDL_DIRECTORY 0x0010 +#define DDL_ARCHIVE 0x0020 + +#define DDL_POSTMSGS 0x2000 +#define DDL_DRIVES 0x4000 +#define DDL_EXCLUSIVE 0x8000 + +#endif /* NOCTLMGR */ + +/****** Combo box control **************************************************/ + +#ifndef NOCTLMGR + +/* Combo box styles */ +#ifndef NOWINSTYLES +#define CBS_SIMPLE 0x0001L +#define CBS_DROPDOWN 0x0002L +#define CBS_DROPDOWNLIST 0x0003L +#define CBS_OWNERDRAWFIXED 0x0010L +#define CBS_OWNERDRAWVARIABLE 0x0020L +#define CBS_AUTOHSCROLL 0x0040L +#define CBS_OEMCONVERT 0x0080L +#define CBS_SORT 0x0100L +#define CBS_HASSTRINGS 0x0200L +#define CBS_NOINTEGRALHEIGHT 0x0400L +#if (WINVER >= 0x030a) +#define CBS_DISABLENOSCROLL 0x0800L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Combo box messages */ +#ifndef NOWINMESSAGES +#define CB_GETEDITSEL (WM_USER+0) +#define CB_LIMITTEXT (WM_USER+1) +#define CB_SETEDITSEL (WM_USER+2) +#define CB_ADDSTRING (WM_USER+3) +#define CB_DELETESTRING (WM_USER+4) +#define CB_DIR (WM_USER+5) +#define CB_GETCOUNT (WM_USER+6) +#define CB_GETCURSEL (WM_USER+7) +#define CB_GETLBTEXT (WM_USER+8) +#define CB_GETLBTEXTLEN (WM_USER+9) +#define CB_INSERTSTRING (WM_USER+10) +#define CB_RESETCONTENT (WM_USER+11) +#define CB_FINDSTRING (WM_USER+12) +#define CB_SELECTSTRING (WM_USER+13) +#define CB_SETCURSEL (WM_USER+14) +#define CB_SHOWDROPDOWN (WM_USER+15) +#define CB_GETITEMDATA (WM_USER+16) +#define CB_SETITEMDATA (WM_USER+17) +#if (WINVER >= 0x030a) +#define CB_GETDROPPEDCONTROLRECT (WM_USER+18) +#define CB_SETITEMHEIGHT (WM_USER+19) +#define CB_GETITEMHEIGHT (WM_USER+20) +#define CB_SETEXTENDEDUI (WM_USER+21) +#define CB_GETEXTENDEDUI (WM_USER+22) +#define CB_GETDROPPEDSTATE (WM_USER+23) +#define CB_FINDSTRINGEXACT (WM_USER+24) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Combo box notification codes */ +#define CBN_ERRSPACE (-1) +#define CBN_SELCHANGE 1 +#define CBN_DBLCLK 2 +#define CBN_SETFOCUS 3 +#define CBN_KILLFOCUS 4 +#define CBN_EDITCHANGE 5 +#define CBN_EDITUPDATE 6 +#define CBN_DROPDOWN 7 +#if (WINVER >= 0x030a) +#define CBN_CLOSEUP 8 +#define CBN_SELENDOK 9 +#define CBN_SELENDCANCEL 10 +#endif /* WINVER >= 0x030a */ + +/* Combo box message return values */ +#define CB_OKAY 0 +#define CB_ERR (-1) +#define CB_ERRSPACE (-2) + +#endif /* NOCTLMGR */ + +/******* Windows hook support **********************************************/ + +#ifndef NOWH + +DECLARE_HANDLE32(HHOOK); + +#ifdef STRICT +typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam); +#else +typedef FARPROC HOOKPROC; +#endif + +#ifdef STRICT +HHOOK WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*); +#else +HOOKPROC WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HOOKPROC FAR*); +#endif +BOOL WINAPI UnhookWindowsHook(int, HOOKPROC); + +#if (WINVER >= 0x030a) + +HHOOK WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hInstance, HTASK hTask); +BOOL WINAPI UnhookWindowsHookEx(HHOOK hHook); +LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam); + +#endif /* WINVER >= 0x030a */ + + +/* Standard hook code */ +#define HC_ACTION 0 + +/* Obsolete hook codes (NO LONGER SUPPORTED) */ +#define HC_GETLPLPFN (-3) +#define HC_LPLPFNNEXT (-2) +#define HC_LPFNNEXT (-1) + +#endif /* NOWH */ + +/****** Computer-based-training (CBT) support *******************************/ + +#define WM_QUEUESYNC 0x0023 + +#ifndef NOWH + +/* SetWindowsHook() code */ +#define WH_CBT 5 + +#define HCBT_MOVESIZE 0 +#define HCBT_MINMAX 1 +#define HCBT_QS 2 +#define HCBT_CREATEWND 3 +#define HCBT_DESTROYWND 4 +#define HCBT_ACTIVATE 5 +#define HCBT_CLICKSKIPPED 6 +#define HCBT_KEYSKIPPED 7 +#define HCBT_SYSCOMMAND 8 +#define HCBT_SETFOCUS 9 + +#if (WINVER >= 0x030a) +/* HCBT_CREATEWND parameters pointed to by lParam */ +typedef struct tagCBT_CREATEWND +{ + CREATESTRUCT FAR* lpcs; + HWND hwndInsertAfter; +} CBT_CREATEWND; +typedef CBT_CREATEWND FAR* LPCBT_CREATEWND; + +/* HCBT_ACTIVATE structure pointed to by lParam */ +typedef struct tagCBTACTIVATESTRUCT +{ + BOOL fMouse; + HWND hWndActive; +} CBTACTIVATESTRUCT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Hardware hook support ***********************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +#define WH_HARDWARE 8 + +typedef struct tagHARDWAREHOOKSTRUCT +{ + HWND hWnd; + UINT wMessage; + WPARAM wParam; + LPARAM lParam; +} HARDWAREHOOKSTRUCT; +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Shell support *******************************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +/* SetWindowsHook() Shell hook code */ +#define WH_SHELL 10 + +#define HSHELL_WINDOWCREATED 1 +#define HSHELL_WINDOWDESTROYED 2 +#define HSHELL_ACTIVATESHELLWINDOW 3 + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Journalling support *************************************************/ + +#ifndef NOWH +#define WH_JOURNALRECORD 0 +#define WH_JOURNALPLAYBACK 1 + +/* Journalling hook codes */ +#define HC_GETNEXT 1 +#define HC_SKIP 2 +#define HC_NOREMOVE 3 +#define HC_NOREM HC_NOREMOVE +#define HC_SYSMODALON 4 +#define HC_SYSMODALOFF 5 + +/* Journalling message structure */ +typedef struct tagEVENTMSG +{ + UINT message; + UINT paramL; + UINT paramH; + DWORD time; +} EVENTMSG; +typedef EVENTMSG *PEVENTMSG; +typedef EVENTMSG NEAR* NPEVENTMSG; +typedef EVENTMSG FAR* LPEVENTMSG; + +BOOL WINAPI EnableHardwareInput(BOOL); + +#endif /* NOWH */ + + +/****** Debugger support ****************************************************/ + +#if (WINVER >= 0x030a) +/* SetWindowsHook debug hook support */ +#define WH_DEBUG 9 + +typedef struct tagDEBUGHOOKINFO +{ + HMODULE hModuleHook; + LPARAM reserved; + LPARAM lParam; + WPARAM wParam; + int code; +} DEBUGHOOKINFO; +typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO; + +#ifndef NOMSG +BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg); +#endif /* NOMSG */ + +BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock); + +LONG WINAPI GetSystemDebugState(void); +/* Flags returned by GetSystemDebugState. + */ +#define SDS_MENU 0x0001 +#define SDS_SYSMODAL 0x0002 +#define SDS_NOTASKQUEUE 0x0004 +#define SDS_DIALOG 0x0008 +#define SDS_TASKLOCKED 0x0010 +#endif /* WINVER >= 0x030a */ + +/****** Help support ********************************************************/ + +#ifndef NOHELP + +BOOL WINAPI WinHelp(HWND hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData); + +/* WinHelp() commands */ +#define HELP_CONTEXT 0x0001 +#define HELP_QUIT 0x0002 +#define HELP_INDEX 0x0003 +#define HELP_CONTENTS 0x0003 +#define HELP_HELPONHELP 0x0004 +#define HELP_SETINDEX 0x0005 +#define HELP_SETCONTENTS 0x0005 +#define HELP_CONTEXTPOPUP 0x0008 +#define HELP_FORCEFILE 0x0009 +#define HELP_KEY 0x0101 +#define HELP_COMMAND 0x0102 +#define HELP_PARTIALKEY 0x0105 +#define HELP_MULTIKEY 0x0201 +#define HELP_SETWINPOS 0x0203 + +typedef struct tagMULTIKEYHELP +{ + UINT mkSize; + BYTE mkKeylist; + BYTE szKeyphrase[1]; +} MULTIKEYHELP; + + +typedef struct +{ + int wStructSize; + int x; + int y; + int dx; + int dy; + int wMax; + char rgchMember[2]; +} HELPWININFO; +typedef HELPWININFO NEAR* PHELPWININFO; +typedef HELPWININFO FAR* LPHELPWININFO; + +#endif /* NOHELP */ + +/****** Sound support ******************************************************/ + +#ifndef NOSOUND + +int WINAPI OpenSound(void); +void WINAPI CloseSound(void); + +int WINAPI StartSound(void); +int WINAPI StopSound(void); + +int WINAPI SetVoiceQueueSize(int, int); +int WINAPI SetVoiceNote(int, int, int, int); +int WINAPI SetVoiceAccent(int, int, int, int, int); +int WINAPI SetVoiceEnvelope(int, int, int); +int WINAPI SetVoiceSound(int, DWORD, int); + +int WINAPI SetVoiceThreshold(int, int); +int FAR* WINAPI GetThresholdEvent(void); +int WINAPI GetThresholdStatus(void); + +int WINAPI SetSoundNoise(int, int); + +/* SetSoundNoise() Sources */ +#define S_PERIOD512 0 +#define S_PERIOD1024 1 +#define S_PERIOD2048 2 +#define S_PERIODVOICE 3 +#define S_WHITE512 4 +#define S_WHITE1024 5 +#define S_WHITE2048 6 +#define S_WHITEVOICE 7 + +int WINAPI WaitSoundState(int); + +/* WaitSoundState() constants */ +#define S_QUEUEEMPTY 0 +#define S_THRESHOLD 1 +#define S_ALLTHRESHOLD 2 + +int WINAPI SyncAllVoices(void); +int WINAPI CountVoiceNotes(int); + +/* Accent Modes */ +#define S_NORMAL 0 +#define S_LEGATO 1 +#define S_STACCATO 2 + +/* Error return values */ +#define S_SERDVNA (-1) +#define S_SEROFM (-2) +#define S_SERMACT (-3) +#define S_SERQFUL (-4) +#define S_SERBDNT (-5) +#define S_SERDLN (-6) +#define S_SERDCC (-7) +#define S_SERDTP (-8) +#define S_SERDVL (-9) +#define S_SERDMD (-10) +#define S_SERDSH (-11) +#define S_SERDPT (-12) +#define S_SERDFQ (-13) +#define S_SERDDR (-14) +#define S_SERDSR (-15) +#define S_SERDST (-16) + +#endif /* NOSOUND */ + +/****** Comm support ******************************************************/ + +#ifndef NOCOMM + +#define NOPARITY 0 +#define ODDPARITY 1 +#define EVENPARITY 2 +#define MARKPARITY 3 +#define SPACEPARITY 4 + +#define ONESTOPBIT 0 +#define ONE5STOPBITS 1 +#define TWOSTOPBITS 2 + +#define IGNORE 0 +#define INFINITE 0xFFFF + +/* Error Flags */ +#define CE_RXOVER 0x0001 +#define CE_OVERRUN 0x0002 +#define CE_RXPARITY 0x0004 +#define CE_FRAME 0x0008 +#define CE_BREAK 0x0010 +#define CE_CTSTO 0x0020 +#define CE_DSRTO 0x0040 +#define CE_RLSDTO 0x0080 +#define CE_TXFULL 0x0100 +#define CE_PTO 0x0200 +#define CE_IOE 0x0400 +#define CE_DNS 0x0800 +#define CE_OOP 0x1000 +#define CE_MODE 0x8000 + +#define IE_BADID (-1) +#define IE_OPEN (-2) +#define IE_NOPEN (-3) +#define IE_MEMORY (-4) +#define IE_DEFAULT (-5) +#define IE_HARDWARE (-10) +#define IE_BYTESIZE (-11) +#define IE_BAUDRATE (-12) + +/* Events */ +#define EV_RXCHAR 0x0001 +#define EV_RXFLAG 0x0002 +#define EV_TXEMPTY 0x0004 +#define EV_CTS 0x0008 +#define EV_DSR 0x0010 +#define EV_RLSD 0x0020 +#define EV_BREAK 0x0040 +#define EV_ERR 0x0080 +#define EV_RING 0x0100 +#define EV_PERR 0x0200 +#define EV_CTSS 0x0400 +#define EV_DSRS 0x0800 +#define EV_RLSDS 0x1000 +#define EV_RingTe 0x2000 +#define EV_RINGTE EV_RingTe + +/* Escape Functions */ +#define SETXOFF 1 +#define SETXON 2 +#define SETRTS 3 +#define CLRRTS 4 +#define SETDTR 5 +#define CLRDTR 6 +#define RESETDEV 7 + +#define LPTx 0x80 + +#if (WINVER >= 0x030a) + +/* new escape functions */ +#define GETMAXLPT 8 +#define GETMAXCOM 9 +#define GETBASEIRQ 10 + +/* Comm Baud Rate indices */ +#define CBR_110 0xFF10 +#define CBR_300 0xFF11 +#define CBR_600 0xFF12 +#define CBR_1200 0xFF13 +#define CBR_2400 0xFF14 +#define CBR_4800 0xFF15 +#define CBR_9600 0xFF16 +#define CBR_14400 0xFF17 +#define CBR_19200 0xFF18 +#define CBR_38400 0xFF1B +#define CBR_56000 0xFF1F +#define CBR_128000 0xFF23 +#define CBR_256000 0xFF27 + +/* notifications passed in low word of lParam on WM_COMMNOTIFY messages */ +#define CN_RECEIVE 0x0001 +#define CN_TRANSMIT 0x0002 +#define CN_EVENT 0x0004 + +#endif /* WINVER >= 0x030a */ + +typedef struct tagDCB +{ + BYTE Id; + UINT BaudRate; + BYTE ByteSize; + BYTE Parity; + BYTE StopBits; + UINT RlsTimeout; + UINT CtsTimeout; + UINT DsrTimeout; + + UINT fBinary :1; + UINT fRtsDisable :1; + UINT fParity :1; + UINT fOutxCtsFlow :1; + UINT fOutxDsrFlow :1; + UINT fDummy :2; + UINT fDtrDisable :1; + + UINT fOutX :1; + UINT fInX :1; + UINT fPeChar :1; + UINT fNull :1; + UINT fChEvt :1; + UINT fDtrflow :1; + UINT fRtsflow :1; + UINT fDummy2 :1; + + char XonChar; + char XoffChar; + UINT XonLim; + UINT XoffLim; + char PeChar; + char EofChar; + char EvtChar; + UINT TxDelay; +} DCB; +typedef DCB FAR* LPDCB; + +#if (defined(STRICT) | (WINVER >= 0x030a)) + +typedef struct tagCOMSTAT +{ + BYTE status; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#define CSTF_CTSHOLD 0x01 +#define CSTF_DSRHOLD 0x02 +#define CSTF_RLSDHOLD 0x04 +#define CSTF_XOFFHOLD 0x08 +#define CSTF_XOFFSENT 0x10 +#define CSTF_EOF 0x20 +#define CSTF_TXIM 0x40 + +#else /* (STRICT | WINVER >= 0x030a) */ + +/* NOTE: This structure declaration is not ANSI compatible! */ +typedef struct tagCOMSTAT +{ + BYTE fCtsHold :1; + BYTE fDsrHold :1; + BYTE fRlsdHold :1; + BYTE fXoffHold :1; + BYTE fXoffSent :1; + BYTE fEof :1; + BYTE fTxim :1; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#endif /* !(STRICT | WINVER >= 0x030a */ + +int WINAPI BuildCommDCB(LPCSTR, DCB FAR*); + +int WINAPI OpenComm(LPCSTR, UINT, UINT); +int WINAPI CloseComm(int); + +int WINAPI ReadComm(int, void FAR*, int); +int WINAPI WriteComm(int, const void FAR*, int); +int WINAPI UngetCommChar(int, char); +int WINAPI FlushComm(int, int); +int WINAPI TransmitCommChar(int, char); + +int WINAPI SetCommState(const DCB FAR*); +int WINAPI GetCommState(int, DCB FAR*); +int WINAPI GetCommError(int, COMSTAT FAR* ); + +int WINAPI SetCommBreak(int); +int WINAPI ClearCommBreak(int); + +UINT FAR* WINAPI SetCommEventMask(int, UINT); +UINT WINAPI GetCommEventMask(int, int); + +LONG WINAPI EscapeCommFunction(int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI EnableCommNotification(int, HWND, int, int); + +#define WM_COMMNOTIFY 0x0044 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOMM */ + +/****** String formatting support *******************************************/ + +int WINAPI wvsprintf(LPSTR lpszOut, LPCSTR lpszFmt, const void FAR* lpParams); + +int FAR CDECL wsprintf(LPSTR lpszOut, LPCSTR lpszFmt, ...); + + +/****** Driver support ******************************************************/ + +#if (WINVER >= 0x030a) + +#ifndef NODRIVERS + +DECLARE_HANDLE(HDRVR); + +typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM); + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_EXITSESSION 0x000B +#define DRV_EXITAPPLICATION 0x000C +#define DRV_POWER 0x000F + +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO +{ + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR* LPDRVCONFIGINFO; + +/* Supported return values for DRV_CONFIGURE message */ +#define DRVCNF_CANCEL 0x0000 +#define DRVCNF_OK 0x0001 +#define DRVCNF_RESTART 0x0002 + +/* Supported lParam1 of DRV_EXITAPPLICATION notification */ +#define DRVEA_NORMALEXIT 0x0001 +#define DRVEA_ABNORMALEXIT 0x0002 + +LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2); + +HDRVR WINAPI OpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2); +LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); + +LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2); + +HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver); + +HDRVR WINAPI GetNextDriver(HDRVR, DWORD); + +/* GetNextDriver flags */ +#define GND_FIRSTINSTANCEONLY 0x00000001 + +#define GND_FORWARD 0x00000000 +#define GND_REVERSE 0x00000002 + +typedef struct tagDRIVERINFOSTRUCT +{ + UINT length; + HDRVR hDriver; + HINSTANCE hModule; + char szAliasName[128]; +} DRIVERINFOSTRUCT; +typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT; + +BOOL WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*); + +#endif /* !NODRIVERS */ +#endif /* WINVER >= 0x030a */ +#endif /* NOUSER */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* _INC_WINDOWS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/windows.inc b/private/oleauto/tools/win16/hdos/c800/include/windows.inc new file mode 100644 index 000000000..76f76eb62 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windows.inc @@ -0,0 +1,2343 @@ +;************************************************************************* +; +; WINDOWS.INC - Windows assembly language structures & constants +; +;************************************************************************* +; +; Conditional Block includes: (True states) +; NOTEXT - don't include TextMetric struc & text drawing modes & stock objs. +; NORASTOPS - don't include binary and ternary raster ops. +; NOVK - don't include virtual key definitions +; NOMB - don't include message box definitions +; NOWM - don't include window messages +; +; +FALSE = 0 +TRUE = 1 +NULL = 0 + +;******************************************************************* +; +; Rectangle +; +;******************************************************************* + +RECT struc + rcLeft dw ? + rcTop dw ? + rcRight dw ? + rcBottom dw ? +RECT ends + +;******************************************************************* +; +; Window Class structure +; +;******************************************************************* + +WNDCLASS struc + clsStyle dw ? ; class style + clsLpfnWndProc dd ? + clsCbClsExtra dw ? + clsCbWndExtra dw ? + clsHInstance dw ? ; instance handle + clsHIcon dw ? ; class icon handle + clsHCursor dw ? ; class cursor handle + clsHbrBackground dw ? ; class background brush + clsLpszMenuName dd ? ; menu name + clsLpszClassName dd ? ; far ptr to class name +WNDCLASS ends + +IFNDEF NOTEXT +TEXTMETRIC struc + tmHeight dw ? + tmAscent dw ? + tmDescent dw ? + tmIntLeading dw ? + tmExtLeading dw ? + tmAveCharWidth dw ? + tmMaxCharWidth dw ? + tmWeight dw ? + tmItalic db ? + tmUnderlined db ? + tmStruckOut db ? + tmFirstChar db ? + tmLastChar db ? + tmDefaultChar db ? + tmBreakChar db ? + tmPitch db ? + tmCharSet db ? + tmOverhang dw ? + tmAspectX dw ? + tmAspectY dw ? +TEXTMETRIC ends + +LF_FACESIZE EQU 32 + +LOGFONT struc + lfHeight dw ? + lfWidth dw ? + lfEscapement dw ? + lfOrientation dw ? + lfWeight dw ? + lfItalic db ? + lfUnderline db ? + lfStrikeOut db ? + lfCharSet db ? + lfOutPrecision db ? + lfClipPrecision db ? + lfQuality db ? + lfPitchAndFamily db ? + lfFaceName db LF_FACESIZE dup(?) +LOGFONT ends + +LOGBRUSH struc + lbStyle dw ? + lbColor dd ? + lbHatch dw ? +LOGBRUSH ends + +; +; Text Drawing modes +; +TRANSPARENT = 1 +OPAQUE = 2 +; +; Mapping Modes +; +MM_TEXT = 1 +MM_LOMETRIC = 2 +MM_HIMETRIC = 3 +MM_LOENGLISH = 4 +MM_HIENGLISH = 5 +MM_TWIPS = 6 +MM_ISOTROPIC = 7 +MM_ANISOTROPIC = 8 +; +; Coordinate Modes +; +ABSOLUTE = 1 +RELATIVE = 2 +; +; Stock Logical Objects +; +WHITE_BRUSH = 0 +LTGRAY_BRUSH = 1 +GRAY_BRUSH = 2 +DKGRAY_BRUSH = 3 +BLACK_BRUSH = 4 +NULL_BRUSH = 5 +HOLLOW_BRUSH = 5 +WHITE_PEN = 6 +BLACK_PEN = 7 +NULL_PEN = 8 +DOT_MARKER = 9 +OEM_FIXED_FONT = 10 +ANSI_FIXED_FONT = 11 +ANSI_VAR_FONT = 12 +SYSTEM_FONT = 13 +DEVICE_DEFAULT_FONT = 14 +DEFAULT_PALETTE = 15 +SYSTEM_FIXED_FONT = 16 +ENDIF +; +; Brush Styles +; +BS_SOLID = 0 +BS_NULL = 1 +BS_HOLLOW = BS_NULL +BS_HATCHED = 2 +BS_PATTERN = 3 +BS_INDEXED = 4 +BS_DIBPATTERN = 5 +; +; Hatch Styles +; +HS_HORIZONTAL = 0 ; ----- +HS_VERTICAL = 1 ; ||||| +HS_FDIAGONAL = 2 ; \\\\\ +HS_BDIAGONAL = 3 ; ///// +HS_CROSS = 4 ; +++++ +HS_DIAGCROSS = 5 ; xxxxx +; +; Pen Styles +; +PS_SOLID = 0 +PS_DASH = 1 ; ------- +PS_DOT = 2 ; ....... +PS_DASHDOT = 3 ; _._._._ +PS_DASHDOTDOT = 4 ; _.._.._ +PS_NULL = 5 +PS_INSIDEFRAME = 6 +; +; Device Parameters for GetDeviceCaps() +; +DRIVERVERSION =0 ; Device driver version +TECHNOLOGY =2 ; Device classification +HORZSIZE =4 ; Horizontal size in millimeters +VERTSIZE =6 ; Vertical size in millimeters +HORZRES =8 ; Horizontal width in pixels +VERTRES =10 ; Vertical width in pixels +BITSPIXEL =12 ; Number of bits per pixel +PLANES =14 ; Number of planes +NUMBRUSHES =16 ; Number of brushes the device has +NUMPENS =18 ; Number of pens the device has +NUMMARKERS =20 ; Number of markers the device has +NUMFONTS =22 ; Number of fonts the device has +NUMCOLORS =24 ; Number of colors the device supports +PDEVICESIZE =26 ; Size required for device descriptor +CURVECAPS =28 ; Curve capabilities +LINECAPS =30 ; Line capabilities +POLYGONALCAPS =32 ; Polygonal capabilities +TEXTCAPS =34 ; Text capabilities +CLIPCAPS =36 ; Clipping capabilities +RASTERCAPS =38 ; Bitblt capabilities +ASPECTX =40 ; Length of the X leg +ASPECTY =42 ; Length of the Y leg +ASPECTXY =44 ; Length of the hypotenuse + +LOGPIXELSX =88 ; Logical pixels/inch in X +LOGPIXELSY =90 ; Logical pixels/inch in Y + +SIZEPALETTE =104 ; Number of entries in physical palette +NUMRESERVED =106 ; Number of reserved entries in palette +COLORRES =108 ; Actual color resolution +; +ifndef NOGDICAPMASKS +; +; Device Capability Masks: +; +; Device Technologies +DT_PLOTTER = 0 ; /* Vector plotter */ +DT_RASDISPLAY = 1 ; /* Raster display */ +DT_RASPRINTER = 2 ; /* Raster printer */ +DT_RASCAMERA = 3 ; /* Raster camera */ +DT_CHARSTREAM = 4 ; /* Character-stream, PLP */ +DT_METAFILE = 5 ; /* Metafile, VDM */ +DT_DISPFILE = 6 ; /* Display-file */ +; +; Curve Capabilities +CC_NONE = 0 ; /* Curves not supported */ +CC_CIRCLES = 1 ; /* Can do circles */ +CC_PIE = 2 ; /* Can do pie wedges */ +CC_CHORD = 4 ; /* Can do chord arcs */ +CC_ELLIPSES = 8 ; /* Can do ellipese */ +CC_WIDE = 16 ; /* Can do wide lines */ +CC_STYLED = 32 ; /* Can do styled lines */ +CC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +CC_INTERIORS = 128; /* Can do interiors */ +; +; Line Capabilities +LC_NONE = 0 ; /* Lines not supported */ +LC_POLYLINE = 2 ; /* Can do polylines */ +LC_MARKER = 4 ; /* Can do markers */ +LC_POLYMARKER = 8 ; /* Can do polymarkers */ +LC_WIDE = 16 ; /* Can do wide lines */ +LC_STYLED = 32 ; /* Can do styled lines */ +LC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +LC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities +PC_NONE = 0 ; /* Polygonals not supported */ +PC_POLYGON = 1 ; /* Can do polygons */ +PC_RECTANGLE = 2 ; /* Can do rectangles */ +PC_WINDPOLYGON = 4 ; /* Can do winding polygons */ +PC_TRAPEZOID = 4 ; /* Can do trapezoids */ +PC_SCANLINE = 8 ; /* Can do scanlines */ +PC_WIDE = 16 ; /* Can do wide borders */ +PC_STYLED = 32 ; /* Can do styled borders */ +PC_WIDESTYLED = 64 ; /* Can do wide styled borders */ +PC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities */ +CP_NONE = 0 ; /* No clipping of output */ +CP_RECTANGLE = 1 ; /* Output clipped to rects */ +; +; Text Capabilities +TC_OP_CHARACTER = 0001h ; /* Can do OutputPrecision CHARACTER */ +TC_OP_STROKE = 0002h ; /* Can do OutputPrecision STROKE */ +TC_CP_STROKE = 0004h ; /* Can do ClipPrecision STROKE */ +TC_CR_90 = 0008h ; /* Can do CharRotAbility 90 */ +TC_CR_ANY = 0010h ; /* Can do CharRotAbility ANY */ +TC_SF_X_YINDEP = 0020h ; /* Can do ScaleFreedom X_YINDEPENDENT */ +TC_SA_DOUBLE = 0040h ; /* Can do ScaleAbility DOUBLE */ +TC_SA_INTEGER = 0080h ; /* Can do ScaleAbility INTEGER */ +TC_SA_CONTIN = 0100h ; /* Can do ScaleAbility CONTINUOUS */ +TC_EA_DOUBLE = 0200h ; /* Can do EmboldenAbility DOUBLE */ +TC_IA_ABLE = 0400h ; /* Can do ItalisizeAbility ABLE */ +TC_UA_ABLE = 0800h ; /* Can do UnderlineAbility ABLE */ +TC_SO_ABLE = 1000h ; /* Can do StrikeOutAbility ABLE */ +TC_RA_ABLE = 2000h ; /* Can do RasterFontAble ABLE */ +TC_VA_ABLE = 4000h ; /* Can do VectorFontAble ABLE */ +TC_RESERVED = 8000h +; +; Raster Capabilities +RC_BITBLT = 1 ; /* Can do standard BLT. */ +RC_BANDING = 2 ; /* Device requires banding support */ +RC_SCALING = 4 ; /* Device requires scaling support */ +RC_BITMAP64 = 8 ; /* Device can support >64K bitmap */ +RC_GDI20_OUTPUT = 0010h ; /* has 2.0 output calls */ +RC_DI_BITMAP = 0080h ; /* supports DIB to memory */ +RC_PALETTE = 0100h ; /* supports a palette */ +RC_DIBTODEV = 0200h ; /* supports DIBitsToDevice */ +RC_BIGFONT = 0400h ; /* supports >64K fonts */ +RC_STRETCHBLT = 0800h ; /* supports StretchBlt */ +RC_FLOODFILL = 1000h ; /* supports FloodFill */ +RC_STRETCHDIB = 2000h ; /* supports StretchDIBits */ + +endif ;NOGDICAPMASKS + +; palette entry flags +; +PC_RESERVED = 1 ;/* palette index used for animation */ +PC_EXPLICIT = 2 ;/* palette index is explicit to device */ +PC_NOCOLLAPSE = 4 ;/* do not match color to system palette */ + +; DIB color table identifiers +; +DIB_RGB_COLORS = 0 ;/* color table in RGBTriples */ +DIB_PAL_COLORS = 1 ;/* color table in palette indices */ +; + +;constants for Get/SetSystemPaletteUse() +; +SYSPAL_STATIC = 1 +SYSPAL_NOSTATIC = 2 + +; constants for CreateDIBitmap +CBM_INIT = 4 ;/* initialize bitmap */ +; +; Bitmap format constants +BI_RGB = 0 +BI_RLE8 = 1 +BI_RLE4 = 2 +; +; +ANSI_CHARSET = 0 +SYMBOL_CHARSET = 2 +OEM_CHARSET = 255 +; +; styles for CombineRgn +; +RGN_AND = 1 +RGN_OR = 2 +RGN_XOR = 3 +RGN_DIFF = 4 +RGN_COPY = 5 +; +; Predefined cursor & icon IDs +; +IDC_ARROW = 32512 +IDC_IBEAM = 32513 +IDC_WAIT = 32514 +IDC_CROSS = 32515 +IDC_UPARROW = 32516 +IDC_SIZE = 32640 +IDC_ICON = 32641 +IDC_SIZENWSE = 32642 +IDC_SIZENESW = 32643 +IDC_SIZEWE = 32644 +IDC_SIZENS = 32645 + +IDI_APPLICATION = 32512 +IDI_HAND = 32513 +IDI_QUESTION = 32514 +IDI_EXCLAMATION = 32515 +IDI_ASTERISK = 32516 + +; +; OEM Resource Ordinal Numbers */ +; +OBM_CLOSE = 32754 +OBM_UPARROW = 32753 +OBM_DNARROW = 32752 +OBM_RGARROW = 32751 +OBM_LFARROW = 32750 +OBM_REDUCE = 32749 +OBM_ZOOM = 32748 +OBM_RESTORE = 32747 +OBM_REDUCED = 32746 +OBM_ZOOMD = 32745 +OBM_RESTORED = 32744 +OBM_UPARROWD = 32743 +OBM_DNARROWD = 32742 +OBM_RGARROWD = 32741 +OBM_LFARROWD = 32740 +OBM_MNARROW = 32739 +OBM_COMBO = 32738 +OBM_UPARROWI = 32737 +OBM_DNARROWI = 32736 +OBM_RGARROWI = 32735 +OBM_LFARROWI = 32734 + +OBM_OLD_CLOSE = 32767 +OBM_SIZE = 32766 +OBM_OLD_UPARROW = 32765 +OBM_OLD_DNARROW = 32764 +OBM_OLD_RGARROW = 32763 +OBM_OLD_LFARROW = 32762 +OBM_BTSIZE = 32761 +OBM_CHECK = 32760 +OBM_CHECKBOXES = 32759 +OBM_BTNCORNERS = 32758 +OBM_OLD_REDUCE = 32757 +OBM_OLD_ZOOM = 32756 +OBM_OLD_RESTORE = 32755 + +OCR_NORMAL = 32512 +OCR_IBEAM = 32513 +OCR_WAIT = 32514 +OCR_CROSS = 32515 +OCR_UP = 32516 +OCR_SIZE = 32640 +OCR_ICON = 32641 +OCR_SIZENWSE = 32642 +OCR_SIZENESW = 32643 +OCR_SIZEWE = 32644 +OCR_SIZENS = 32645 +OCR_SIZEALL = 32646 +OCR_ICOCUR = 32647 + +OIC_SAMPLE = 32512 +OIC_HAND = 32513 +OIC_QUES = 32514 +OIC_BANG = 32515 +OIC_NOTE = 32516 + +; +; Scroll bar constants +; +SB_HORZ = 0 +SB_VERT = 1 +SB_CTL = 2 +SB_BOTH = 3 +; +; Scroll Commands +; +SB_LINEUP = 0 +SB_LINEDOWN = 1 +SB_PAGEUP = 2 +SB_PAGEDOWN = 3 +SB_THUMBPOSITION = 4 +SB_THUMBTRACK = 5 +SB_TOP = 6 +SB_BOTTOM = 7 +SB_ENDSCROLL = 8 +; +; MessageBox type flags +; +IFNDEF NOMB +MB_OK = 0000H +MB_OKCANCEL = 0001H +MB_ABORTRETRYIGNORE = 0002H +MB_YESNOCANCEL = 0003H +MB_YESNO = 0004H +MB_RETRYCANCEL = 0005H + +MB_ICONHAND = 0010H +MB_ICONQUESTION = 0020H +MB_ICONEXCLAMATION = 0030H +MB_ICONASTERISK = 0040H + +MB_DEFBUTTON1 = 0000H +MB_DEFBUTTON2 = 0100H +MB_DEFBUTTON3 = 0200H + +MB_APPLMODAL = 0000H +MB_SYSTEMMODAL = 1000H +MB_TASKMODAL = 2000H + +MB_NOFOCUS = 8000H + +; +; Conventional dialog box and message box command IDs +; +IDOK = 1 +IDCANCEL = 2 +IDABORT = 3 +IDRETRY = 4 +IDIGNORE = 5 +IDYES = 6 +IDNO = 7 +; +; Flags for OpenFile +; +OF_READ = 0000H +OF_WRITE = 0001H +OF_READWRITE = 0002H +OF_SHARE_COMPAT = 0000H +OF_SHARE_EXCLUSIVE = 0010H +OF_SHARE_DENY_WRITE = 0020H +OF_SHARE_DENY_READ = 0030H +OF_SHARE_DENY_NONE = 0040H +OF_PARSE = 0100H +OF_DELETE = 0200H +OF_VERIFY = 0400H ; Used with OF_REOPEN +OF_SEARCH = 0400H ; Used without OF_REOPEN +OF_CANCEL = 0800H +OF_CREATE = 1000H +OF_PROMPT = 2000H +OF_EXIST = 4000H +OF_REOPEN = 8000H + +TF_FORCEDRIVE = 80H + +OPENSTRUC STRUC +opLen db ? +opDisk db ? +opXtra dw ? +opDate dw ? +opTime dw ? +opFile db 120 dup (?) +OPENSTRUC ENDS +; +; DrawText format flags +; +DT_LEFT = 00H +DT_CENTER = 01H +DT_RIGHT = 02H +DT_TOP = 00H +DT_VCENTER = 04H +DT_BOTTOM = 08H +DT_WORDBREAK = 10H +DT_SINGLELINE = 20H +DT_EXPANDTABS = 40H +DT_TABSTOP = 80H +DT_NOCLIP = 0100H +DT_EXTERNALLEADING = 0200H +DT_CALCRECT = 0400H +DT_NOPREFIX = 0800H +DT_INTERNAL = 1000H +ENDIF + +; +; ExtFloodFill style flags +; +FLOODFILLBORDER = 0 +FLOODFILLSURFACE = 1 + +; +; Memory manager flags +; +LMEM_FIXED = 0000h +LMEM_MOVEABLE = 0002h +LMEM_NOCOMPACT = 0010H +LMEM_NODISCARD = 0020H +LMEM_ZEROINIT = 0040h +LMEM_MODIFY = 0080H +LMEM_DISCARDABLE= 0F00h +LHND = LMEM_MOVEABLE+LMEM_ZEROINIT +LPTR = LMEM_FIXED+LMEM_ZEROINIT +; Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) +LMEM_DISCARDED = 4000H +LMEM_LOCKCOUNT = 00FFH + +NONZEROLHND = LMEM_MOVEABLE +NONZEROLPTR = LMEM_FIXED + + + +GMEM_FIXED = 0000h +GMEM_MOVEABLE = 0002h +GMEM_NOCOMPACT = 0010h +GMEM_NODISCARD = 0020h +GMEM_ZEROINIT = 0040h +GMEM_MODIFY = 0080h +GMEM_DISCARDABLE= 0100h +GMEM_NOT_BANKED = 1000h +GMEM_DDESHARE = 2000h +GMEM_SHARE = 2000h +GMEM_NOTIFY = 4000h +GMEM_LOWER = GMEM_NOT_BANKED +GHND = GMEM_MOVEABLE+GMEM_ZEROINIT +GPTR = GMEM_FIXED+GMEM_ZEROINIT + +; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) +GMEM_DISCARDED = 4000h +GMEM_LOCKCOUNT = 00FFh + +; Flags returned by GetWinFlags + +WF_PMODE = 0001h +WF_CPU286 = 0002h +WF_CPU386 = 0004h +WF_CPU486 = 0008h +WF_STANDARD = 0010h +WF_WIN286 = 0010h +WF_ENHANCED = 0020h +WF_WIN386 = 0020h +WF_CPU086 = 0040h +WF_CPU186 = 0080h +WF_LARGEFRAME = 0100h +WF_SMALLFRAME = 0200h +WF_80x87 = 0400h +WF_PAGING = 0800h +WF_WLO = 8000h + +; WEP fSystemExit flag values +WEP_SYSTEM_EXIT = 1 +WEP_FREE_DLL = 0 + + +; Virtual Keys, Standard Set + +IFNDEF NOVK +VK_LBUTTON = 01H +VK_RBUTTON = 02H +VK_CANCEL = 03H +VK_BACK = 08H +VK_TAB = 09H +VK_CLEAR = 0cH +VK_RETURN = 0dH +VK_SHIFT = 10H +VK_CONTROL = 11H +VK_MENU = 12H +VK_PAUSE = 13H +VK_CAPITAL = 14H +VK_ESCAPE = 1bH +VK_SPACE = 20H + +VK_PRIOR = 21H +VK_NEXT = 22H +VK_END = 23H +VK_HOME = 24H +VK_LEFT = 25H +VK_UP = 26H +VK_RIGHT = 27H +VK_DOWN = 28H + +; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' +; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' + +VK_PRINT = 2aH +VK_EXECUTE = 2bH +VK_SNAPSHOT = 2ch ; Printscreen key.. +VK_INSERT = 2dH +VK_DELETE = 2eH +VK_HELP = 2fH + +VK_NUMPAD0 = 60H +VK_NUMPAD1 = 61H +VK_NUMPAD2 = 62H +VK_NUMPAD3 = 63H +VK_NUMPAD4 = 64H +VK_NUMPAD5 = 65H +VK_NUMPAD6 = 66H +VK_NUMPAD7 = 67H +VK_NUMPAD8 = 68H +VK_NUMPAD9 = 69H +VK_MULTIPLY = 6AH +VK_ADD = 6BH +VK_SEPARATER = 6CH +VK_SUBTRACT = 6DH +VK_DECIMAL = 6EH +VK_DIVIDE = 6FH + +VK_F1 = 70H +VK_F2 = 71H +VK_F3 = 72H +VK_F4 = 73H +VK_F5 = 74H +VK_F6 = 75H +VK_F7 = 76H +VK_F8 = 77H +VK_F9 = 78H +VK_F10 = 79H +VK_F11 = 7aH +VK_F12 = 7bH +VK_F13 = 7cH +VK_F14 = 7dH +VK_F15 = 7eH +VK_F16 = 7fH +VK_F17 = 80H +VK_F18 = 81H +VK_F19 = 82H +VK_F20 = 83H +VK_F21 = 84H +VK_F22 = 85H +VK_F23 = 86H +VK_F24 = 87H + +VK_NUMLOCK = 90H +VK_SCROLL = 91H +ENDIF + +IFNDEF NOWH + +; SetWindowsHook() codes +WH_MSGFILTER = (-1) +WH_JOURNALRECORD = 0 +WH_JOURNALPLAYBACK = 1 +WH_KEYBOARD = 2 +WH_GETMESSAGE = 3 +WH_CALLWNDPROC = 4 +IFNDEF NOWIN31 +WH_CBT = 5 +WH_SYSMSGFILTER = 6 +WH_MOUSE = 7 +WH_HARDWARE = 8 +WH_DEBUG = 9 +ENDIF +; +; Hook Codes +HC_GETLPLPFN = (-3) +HC_LPLPFNNEXT = (-2) +HC_LPFNNEXT = (-1) +HC_ACTION = 0 +HC_GETNEXT = 1 +HC_SKIP = 2 +HC_NOREM = 3 +HC_NOREMOVE = 3 +HC_SYSMODALON = 4 +HC_SYSMODALOFF = 5 +; +; CBT Hook Codes +HCBT_MOVESIZE = 0 +HCBT_MINMAX = 1 +HCBT_QS = 2 +HCBT_CREATEWND = 3 +HCBT_DESTROYWND = 4 +HCBT_ACTIVATE = 5 +HCBT_CLICKSKIPPED = 6 +HCBT_KEYSKIPPED = 7 +HCBT_SYSCOMMAND = 8 +HCBT_SETFOCUS = 9 + +; +; WH_MSGFILTER Filter Proc Codes +MSGF_DIALOGBOX = 0 +MSGF_MENU = 2 +MSGF_MOVE = 3 +MSGF_SIZE = 4 +MSGF_SCROLLBAR = 5 +MSGF_NEXTWINDOW = 6 +; +; Window Manager Hook Codes +WC_INIT = 1 +WC_SWP = 2 +WC_DEFWINDOWPROC = 3 +WC_MINMAX = 4 +WC_MOVE = 5 +WC_SIZE = 6 +WC_DRAWCAPTION = 7 +; + +; Message Structure used in Journaling +EVENTMSG struc + message dw ? + paramL dw ? + paramH dw ? + time dd ? +EVENTMSG ends + +ENDIF ;NOWH + +; Window field offsets for GetWindowLong() and GetWindowWord() +GWL_WNDPROC = (-4) +GWW_HINSTANCE = (-6) +GWW_HWNDPARENT = (-8) +GWW_ID = (-12) +GWL_STYLE = (-16) +GWL_EXSTYLE = (-20) + +; GetWindow() Constants +GW_HWNDFIRST = 0 +GW_HWNDLAST = 1 +GW_HWNDNEXT = 2 +GW_HWNDPREV = 3 +GW_OWNER = 4 +GW_CHILD = 5 + +; Class field offsets for GetClassLong() and GetClassWord() +GCL_MENUNAME = (-8) +GCW_HBRBACKGROUND = (-10) +GCW_HCURSOR = (-12) +GCW_HICON = (-14) +GCW_HMODULE = (-16) +GCW_CBWNDEXTRA = (-18) +GCW_CBCLSEXTRA = (-20) +GCL_WNDPROC = (-24) +GCW_STYLE = (-26) + +; WinWhere() Area Codes +HTERROR = (-2) +HTTRANSPARENT = (-1) +HTNOWHERE = 0 +HTCLIENT = 1 +HTCAPTION = 2 +HTSYSMENU = 3 +HTGROWBOX = 4 +HTSIZE = HTGROWBOX +HTMENU = 5 +HTHSCROLL = 6 +HTVSCROLL = 7 +HTREDUCE = 8 +HTZOOM = 9 +HTLEFT = 10 +HTRIGHT = 11 +HTTOP = 12 +HTTOPLEFT = 13 +HTTOPRIGHT = 14 +HTBOTTOM = 15 +HTBOTTOMLEFT = 16 +HTBOTTOMRIGHT = 17 +HTSIZEFIRST = HTLEFT +HTSIZELAST = HTBOTTOMRIGHT + + + +;************************************************************************* +; +; Misc structures & constants +; +;************************************************************************* + +IFNDEF NOMST +POINT struc + ptX dw ? + ptY dw ? +POINT ends + +LOGPEN struc + lopnStyle dw ? + lopnWidth db (SIZE POINT) DUP(?) + lopnColor dd ? +LOGPEN ends + + +BITMAP STRUC + bmType DW ? + bmWidth DW ? + bmHeight DW ? + bmWidthBytes DW ? + bmPlanes DB ? + bmBitsPixel DB ? + bmBits DD ? +BITMAP ENDS + +RGBTRIPLE struc + rgbBlue db ? + rgbGreen db ? + rgbRed db ? +RGBTRIPLE ends + +RGBQUAD struc + rgbqBlue db ? + rgbqGreen db ? + rgbqRed db ? + rgbqReserved db ? +RGBQUAD ends + +; structures for defining DIBs +BITMAPCOREHEADER struc + bcSize dd ? + bcWidth dw ? + bcHeight dw ? + bcPlanes dw ? + bcBitCount dw ? +BITMAPCOREHEADER ends + +BITMAPINFOHEADER struc + biSize dd ? + biWidth dd ? + biHeight dd ? + biPlanes dw ? + biBitCount dw ? + + biCompression dd ? + biSizeImage dd ? + biXPelsPerMeter dd ? + biYPelsPerMeter dd ? + biClrUsed dd ? + biClrImportant dd ? +BITMAPINFOHEADER ends + +BITMAPINFO struc + bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?) + bmiColors db ? ; array of RGBQUADs +BITMAPINFO ends + +BITMAPCOREINFO struc + bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?) + bmciColors db ? ; array of RGBTRIPLEs +BITMAPCOREINFO ends + +BITMAPFILEHEADER struc + bfType dw ? + bfSize dd ? + bfReserved1 dw ? + bfReserved2 dw ? + bfOffBits dd ? +BITMAPFILEHEADER ends + + +WNDSTRUC struc + WSwndStyle dd ? + WSwndID dw ? + WSwndText dw ? + WSwndParent dw ? + WSwndInstance dw ? + WSwndClassProc dd ? +WNDSTRUC ends +; +; Message structure +; +MSGSTRUCT struc +msHWND dw ? +msMESSAGE dw ? +msWPARAM dw ? +msLPARAM dd ? +msTIME dd ? +msPT dd ? +MSGSTRUCT ends + +NEWPARMS struc + nprmHwnd dw ? + nprmCmd db ? +NEWPARMS ends +ENDIF + +PAINTSTRUCT STRUC + PShdc DW ? + PSfErase DW ? + PSrcPaint DB size RECT dup(?) + PSfRestore DW ? + PSfIncUpdate DW ? + PSrgbReserved DB 16 dup(?) +PAINTSTRUCT ENDS + + +CREATESTRUCT struc + cs_lpCreateParams dd ? + cs_hInstance dw ? + cs_hMenu dw ? + cs_hwndParent dw ? + cs_cy dw ? + cs_cx dw ? + cs_y dw ? + cs_x dw ? + cs_style dd ? + cs_lpszName dd ? + cs_lpszClass dd ? + cs_dwExStyle dd ? +CREATESTRUCT ends +; +; PostError constants +; +WARNING = 0 ; command codes +MINOR_ERROR = 1 +FATAL_ERROR = 2 + +IGNORE = 0 ; response codes +RETRY = 1 +ABORT = 2 +; +; GDI-related constants & commands +; +ERRORREGION = 0 +NULLREGION = 1 +SIMPLEREGION = 2 +COMPLEXREGION = 3 + +IFNDEF NORASTOPS +; +; Binary raster ops +; +R2_BLACK = 1 +R2_NOTMERGEPEN = 2 +R2_MASKNOTPEN = 3 +R2_NOTCOPYPEN = 4 +R2_MASKPENNOT = 5 +R2_NOT = 6 +R2_XORPEN = 7 +R2_NOTMASKPEN = 8 +R2_MASKPEN = 9 +R2_NOTXORPEN = 10 +R2_NOP = 11 +R2_MERGENOTPEN = 12 +R2_COPYPEN = 13 +R2_MERGEPENNOT = 14 +R2_MERGEPEN = 15 +R2_WHITE = 16 +; +; Ternary raster ops +; +SRCCOPY_L = 0020h ;dest=source +SRCCOPY_H = 00CCh +SRCPAINT_L = 0086h ;dest=source OR dest +SRCPAINT_H = 00EEh +SRCAND_L = 00C6h ;dest=source AND dest +SRCAND_H = 0088h +SRCINVERT_L = 0046h ;dest= source XOR dest +SRCINVERT_H = 0066h +SRCERASE_L = 0328h ;dest= source AND (not dest ) +SRCERASE_H = 0044h +NOTSRCCOPY_L = 0008h ;dest= (not source) +NOTSRCCOPY_H = 0033h +NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest) +NOTSRCERASE_H = 0011h +MERGECOPY_L = 00CAh ;dest= (source AND pattern) +MERGECOPY_H = 00C0h +MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest +MERGEPAINT_H = 00BBh +PATCOPY_L = 0021h ;dest= pattern +PATCOPY_H = 00F0h +PATPAINT_L = 0A09h ;DPSnoo +PATPAINT_H = 00FBh +PATINVERT_L = 0049h ;dest= pattern XOR dest +PATINVERT_H = 005Ah +DSTINVERT_L = 0009h ;dest= (not dest) +DSTINVERT_H = 0055h +BLACKNESS_L = 0042h ;dest= BLACK +BLACKNESS_H = 0000h +WHITENESS_L = 0062h ;dest= WHITE +WHITENESS_H = 00FFh +; +; StretchBlt modes +; +BLACKONWHITE = 1 +WHITEONBLACK = 2 +COLORONCOLOR = 3 +; +; New StretchBlt modes +; +STRETCH_ANDSCANS = 1 +STRETCH_ORSCANS = 2 +STRETCH_DELETESCANS = 3 +; +; PolyFill modes +; +ALTERNATE = 1 +WINDING = 2 +ENDIF +; +; Text Alignment Options +; +TA_NOUPDATECP = 0 +TA_UPDATECP = 1 + +TA_LEFT = 0 +TA_RIGHT = 2 +TA_CENTER = 6 + +TA_TOP = 0 +TA_BOTTOM = 8 +TA_BASELINE = 24 + +ETO_GRAYED = 1 +ETO_OPAQUE = 2 +ETO_CLIPPED = 4 + +ASPECT_FILTERING = 1 + +ifndef NOMETAFILE + +; Metafile Functions */ +META_SETBKCOLOR = 0201h +META_SETBKMODE = 0102h +META_SETMAPMODE = 0103h +META_SETROP2 = 0104h +META_SETRELABS = 0105h +META_SETPOLYFILLMODE = 0106h +META_SETSTRETCHBLTMODE = 0107h +META_SETTEXTCHAREXTRA = 0108h +META_SETTEXTCOLOR = 0209h +META_SETTEXTJUSTIFICATION = 020Ah +META_SETWINDOWORG = 020Bh +META_SETWINDOWEXT = 020Ch +META_SETVIEWPORTORG = 020Dh +META_SETVIEWPORTEXT = 020Eh +META_OFFSETWINDOWORG = 020Fh +META_SCALEWINDOWEXT = 0400h +META_OFFSETVIEWPORTORG = 0211h +META_SCALEVIEWPORTEXT = 0412h +META_LINETO = 0213h +META_MOVETO = 0214h +META_EXCLUDECLIPRECT = 0415h +META_INTERSECTCLIPRECT = 0416h +META_ARC = 0817h +META_ELLIPSE = 0418h +META_FLOODFILL = 0419h +META_PIE = 081Ah +META_RECTANGLE = 041Bh +META_ROUNDRECT = 061Ch +META_PATBLT = 061Dh +META_SAVEDC = 001Eh +META_SETPIXEL = 041Fh +META_OFFSETCLIPRGN = 0220h +META_TEXTOUT = 0521h +META_BITBLT = 0922h +META_STRETCHBLT = 0B23h +META_POLYGON = 0324h +META_POLYLINE = 0325h +META_ESCAPE = 0626h +META_RESTOREDC = 0127h +META_FILLREGION = 0228h +META_FRAMEREGION = 0429h +META_INVERTREGION = 012Ah +META_PAINTREGION = 012Bh +META_SELECTCLIPREGION = 012Ch +META_SELECTOBJECT = 012Dh +META_SETTEXTALIGN = 012Eh +META_DRAWTEXT = 062Fh + +META_CHORD = 0830h +META_SETMAPPERFLAGS = 0231h +META_EXTTEXTOUT = 0a32h +META_SETDIBTODEV = 0d33h +META_SELECTPALETTE = 0234h +META_REALIZEPALETTE = 0035h +META_ANIMATEPALETTE = 0436h +META_SETPALENTRIES = 0037h +META_POLYPOLYGON = 0538h +META_RESIZEPALETTE = 0139h + +META_DIBBITBLT = 0940h +META_DIBSTRETCHBLT = 0b41h +META_DIBCREATEPATTERNBRUSH = 0142h +META_STRETCHDIB = 0f43h + +META_DELETEOBJECT = 01f0h + +META_CREATEPALETTE = 00f7h +META_CREATEBRUSH = 00F8h +META_CREATEPATTERNBRUSH = 01F9h +META_CREATEPENINDIRECT = 02FAh +META_CREATEFONTINDIRECT = 02FBh +META_CREATEBRUSHINDIRECT = 02FCh +META_CREATEBITMAPINDIRECT = 02FDh +META_CREATEBITMAP = 06FEh +META_CREATEREGION = 06FFh + +; /* Clipboard Metafile Picture Structure */ +HANDLETABLE struc + ht_objectHandle dw ? +HANDLETABLE ends + +METARECORD struc + mr_rdSize dd ? + mr_rdFunction dw ? + mr_rdParm dw ? +METARECORD ends + +METAFILEPICT struc + mfp_mm dw ? + mfp_xExt dw ? + mfp_yExt dw ? + mfp_hMF dw ? +METAFILEPICT ends + +METAHEADER struc + mtType dw ? + mtHeaderSize dw ? + mtVersion dw ? + mtSize dd ? + mtNoObjects dw ? + mtMaxRecord dd ? + mtNoParameters dw ? +METAHEADER ends + +endif ; NOMETAFILE + +; GDI Escapes +NEWFRAME = 1 +ABORTDOC = 2 +NEXTBAND = 3 +SETCOLORTABLE = 4 +GETCOLORTABLE = 5 +FLUSHOUTPUT = 6 +DRAFTMODE = 7 +QUERYESCSUPPORT = 8 +SETABORTPROC = 9 +STARTDOC = 10 +;; This value conflicts with a std WIN386 MACRO definition +;;ENDDOC = 11 +GETPHYSPAGESIZE = 12 +GETPRINTINGOFFSET = 13 +GETSCALINGFACTOR = 14 +MFCOMMENT = 15 +GETPENWIDTH = 16 +SETCOPYCOUNT = 17 +SELECTPAPERSOURCE = 18 +DEVICEDATA = 19 +PASSTHROUGH = 19 +GETTECHNOLGY = 20 +GETTECHNOLOGY = 20 +SETENDCAP = 21 +SETLINEJOIN = 22 +SETMITERLIMIT = 23 +BANDINFO = 24 +DRAWPATTERNRECT = 25 +GETVECTORPENSIZE = 26 +GETVECTORBRUSHSIZE = 27 +ENABLEDUPLEX = 28 +ENABLEMANUALFEED = 29 +GETSETPAPERBINS = 29 +GETSETPRINTORIENT = 30 +ENUMPAPERBINS = 31 + +GETEXTENDEDTEXTMETRICS = 256 +GETEXTENTTABLE = 257 +GETPAIRKERNTABLE = 258 +GETTRACKKERNTABLE = 259 + +EXTTEXTOUT = 512 + +ENABLERELATIVEWIDTHS = 768 +ENABLEPAIRKERNING = 769 +SETKERNTRACK = 770 +SETALLJUSTVALUES = 771 +SETCHARSET = 772 + +GETSETSCREENPARAMS = 3072 + +STRETCHBLT = 2048 + + +; Spooler Error Codes +SP_NOTREPORTED = 4000h +SP_ERROR = (-1) +SP_APPABORT = (-2) +SP_USERABORT = (-3) +SP_OUTOFDISK = (-4) +SP_OUTOFMEMORY = (-5) + +PR_JOBSTATUS = 0000 + +; Object Definitions for EnumObjects() +OBJ_PEN = 1 +OBJ_BRUSH = 2 + +; +; Menu flags for Change/Check/Enable MenuItem +; +MF_INSERT = 0000h +MF_CHANGE = 0080h +MF_APPEND = 0100h +MF_DELETE = 0200h +MF_REMOVE = 1000h + +MF_BYCOMMAND = 0000h +MF_BYPOSITION = 0400h + +MF_SEPARATOR = 0800h + +MF_ENABLED = 0000h +MF_GRAYED = 0001h +MF_DISABLED = 0002h + +MF_UNCHECKED = 0000h +MF_CHECKED = 0008h +MF_USECHECKBITMAPS= 0200h + +MF_STRING = 0000h +MF_BITMAP = 0004h +MF_OWNERDRAW = 0100h + +MF_POPUP = 0010h +MF_MENUBARBREAK = 0020h +MF_MENUBREAK = 0040h + +MF_UNHILITE = 0000h +MF_HILITE = 0080h + +MF_SYSMENU = 2000h +MF_HELP = 4000h +MF_MOUSESELECT = 8000h + + +; +; System Menu Command Values +; +SC_SIZE = 0F000h +SC_MOVE = 0F010h +SC_MINIMIZE = 0F020h +SC_MAXIMIZE = 0F030h +SC_NEXTWINDOW = 0F040h +SC_PREVWINDOW = 0F050h +SC_CLOSE = 0F060h +SC_VSCROLL = 0F070h +SC_HSCROLL = 0F080h +SC_MOUSEMENU = 0F090h +SC_KEYMENU = 0F100h +SC_ARRANGE = 0F110h +SC_RESTORE = 0F120h +SC_TASKLIST = 0F130h +SC_SCREENSAVE = 0F140h +SC_HOTKEY = 0F150h + +SC_ICON = SC_MINIMIZE +SC_ZOOM = SC_MAXIMIZE + +; +; Window State Messages +; +IFNDEF NOWM +WM_STATE = 0000H + +WM_NULL = 0000h +WM_CREATE = 0001h +WM_DESTROY = 0002h +WM_MOVE = 0003h +WM_SIZE = 0005h +WM_ACTIVATE = 0006h +WM_SETFOCUS = 0007h +WM_KILLFOCUS = 0008h +WM_ENABLE = 000Ah +WM_SETREDRAW = 000Bh +WM_SETTEXT = 000Ch +WM_GETTEXT = 000Dh +WM_GETTEXTLENGTH = 000Eh +WM_PAINT = 000Fh +WM_CLOSE = 0010h +WM_QUERYENDSESSION = 0011h +WM_QUIT = 0012h +WM_QUERYOPEN = 0013h +WM_ERASEBKGND = 0014h +WM_SYSCOLORCHANGE = 0015h +WM_ENDSESSION = 0016h +WM_SYSTEMERROR = 0017h +WM_SHOWWINDOW = 0018h +WM_CTLCOLOR = 0019h +WM_WININICHANGE = 001Ah +WM_DEVMODECHANGE = 001Bh +WM_ACTIVATEAPP = 001Ch +WM_FONTCHANGE = 001Dh +WM_TIMECHANGE = 001Eh +WM_CANCELMODE = 001Fh +WM_SETCURSOR = 0020h +WM_MOUSEACTIVATE = 0021h +WM_CHILDACTIVATE = 0022h +WM_QUEUESYNC = 0023h +WM_GETMINMAXINFO = 0024h +WM_PAINTICON = 0026h +WM_ICONERASEBKGND = 0027h +WM_NEXTDLGCTL = 0028h +WM_SPOOLERSTATUS = 002Ah +WM_DRAWITEM = 002Bh +WM_MEASUREITEM = 002Ch +WM_DELETEITEM = 002Dh +WM_VKEYTOITEM = 002Eh +WM_CHARTOITEM = 002Fh +WM_SETFONT = 0030h +WM_GETFONT = 0031h +WM_QUERYDRAGICON = 0037h +WM_COMPAREITEM = 0039h +WM_COMPACTING = 0041h +IFNDEF NOWIN31 +WM_COMMNOTIFY = 0044h +WM_WINDOWPOSCHANGING= 0046h +WM_WINDOWPOSCHANGED = 0047h +WM_POWER = 0048h +ENDIF + + +WM_NCCREATE = 0081h +WM_NCDESTROY = 0082h +WM_NCCALCSIZE = 0083h +WM_NCHITTEST = 0084h +WM_NCPAINT = 0085h +WM_NCACTIVATE = 0086h +WM_GETDLGCODE = 0087h +WM_NCMOUSEMOVE = 00A0h +WM_NCLBUTTONDOWN = 00A1h +WM_NCLBUTTONUP = 00A2h +WM_NCLBUTTONDBLCLK = 00A3h +WM_NCRBUTTONDOWN = 00A4h +WM_NCRBUTTONUP = 00A5h +WM_NCRBUTTONDBLCLK = 00A6h +WM_NCMBUTTONDOWN = 00A7h +WM_NCMBUTTONUP = 00A8h +WM_NCMBUTTONDBLCLK = 00A9h + +WM_KEYFIRST = 0100h +WM_KEYDOWN = 0100h +WM_KEYUP = 0101h +WM_CHAR = 0102h +WM_DEADCHAR = 0103h +WM_SYSKEYDOWN = 0104h +WM_SYSKEYUP = 0105h +WM_SYSCHAR = 0106h +WM_SYSDEADCHAR = 0107h +WM_KEYLAST = 0108h + +WM_INITDIALOG = 0110h +WM_COMMAND = 0111h +WM_SYSCOMMAND = 0112h +WM_TIMER = 0113h +WM_HSCROLL = 0114h +WM_VSCROLL = 0115h +WM_INITMENU = 0116h +WM_INITMENUPOPUP = 0117h +WM_MENUSELECT = 011Fh +WM_MENUCHAR = 0120h +WM_ENTERIDLE = 0121h + + +WM_MOUSEFIRST = 0200h +WM_MOUSEMOVE = 0200h +WM_LBUTTONDOWN = 0201h +WM_LBUTTONUP = 0202h +WM_LBUTTONDBLCLK = 0203h +WM_RBUTTONDOWN = 0204h +WM_RBUTTONUP = 0205h +WM_RBUTTONDBLCLK = 0206h +WM_MBUTTONDOWN = 0207h +WM_MBUTTONUP = 0208h +WM_MBUTTONDBLCLK = 0209h +WM_MOUSELAST = 0209h + +WM_PARENTNOTIFY = 0210h +WM_MDICREATE = 0220h +WM_MDIDESTROY = 0221h +WM_MDIACTIVATE = 0222h +WM_MDIRESTORE = 0223h +WM_MDINEXT = 0224h +WM_MDIMAXIMIZE = 0225h +WM_MDITILE = 0226h +WM_MDICASCADE = 0227h +WM_MDIICONARRANGE = 0228h +WM_MDIGETACTIVE = 0229h +WM_MDISETMENU = 0230h +WM_DROPFILES = 0233h + + +WM_CUT = 0300h +WM_COPY = 0301h +WM_PASTE = 0302h +WM_CLEAR = 0303h +WM_UNDO = 0304h +WM_RENDERFORMAT = 0305h +WM_RENDERALLFORMATS = 0306h +WM_DESTROYCLIPBOARD = 0307h +WM_DRAWCLIPBOARD = 0308h +WM_PAINTCLIPBOARD = 0309h +WM_VSCROLLCLIPBOARD = 030Ah +WM_SIZECLIPBOARD = 030Bh +WM_ASKCBFORMATNAME = 030Ch +WM_CHANGECBCHAIN = 030Dh +WM_HSCROLLCLIPBOARD = 030Eh +WM_QUERYNEWPALETTE = 030Fh +WM_PALETTEISCHANGING = 0310h +WM_PALETTECHANGED = 0311h + +IFNDEF NOWIN31 +WM_PENWINFIRST equ 0380h +WM_PENWINLAST equ 038Fh + + +WM_COALESCE_FIRST equ 0390h +WM_COALESCE_LAST equ 039Fh + + + + +ENDIF + + + +; private window messages start here +WM_USER = 0400H +ENDIF ; NOWM + +; WM_MOUSEACTIVATE Return Codes +MA_ACTIVATE = 1 +MA_ACTIVATEANDEAT = 2 +MA_NOACTIVATE = 3 + +; Size message commands +SIZENORMAL = 0 +SIZEICONIC = 1 +SIZEFULLSCREEN = 2 +SIZEZOOMSHOW = 3 +SIZEZOOMHIDE = 4 + +; ShowWindow() Commands +SW_HIDE = 0 +SW_SHOWNORMAL = 1 +SW_NORMAL = 1 +SW_SHOWMINIMIZED = 2 +SW_SHOWMAXIMIZED = 3 +SW_MAXIMIZE = 3 +SW_SHOWNOACTIVATE = 4 +SW_SHOW = 5 +SW_MINIMIZE = 6 +SW_SHOWMINNOACTIVE = 7 +SW_SHOWNA = 8 +SW_RESTORE = 9 + +; Old ShowWindow() Commands +HIDE_WINDOW = 0 +SHOW_OPENWINDOW = 1 +SHOW_ICONWINDOW = 2 +SHOW_FULLSCREEN = 3 +SHOW_OPENNOACTIVATE= 4 + +; identifiers for the WM_SHOWWINDOW message +SW_PARENTCLOSING = 1 +SW_OTHERZOOM = 2 +SW_PARENTOPENING = 3 +SW_OTHERUNZOOM = 4 +; +; Key state masks for mouse messages +; +MK_LBUTTON = 0001h +MK_RBUTTON = 0002h +MK_SHIFT = 0004h +MK_CONTROL = 0008h +MK_MBUTTON = 0010h +; +; Class styles +; +CS_VREDRAW = 0001h +CS_HREDRAW = 0002h +CS_KEYCVTWINDOW = 0004H +CS_DBLCLKS = 0008h +; 0010h reserved +CS_OWNDC = 0020h +CS_CLASSDC = 0040h +CS_PARENTDC = 0080h +CS_NOKEYCVT = 0100h +CS_SAVEBITS = 0800h +CS_NOCLOSE = 0200h +CS_BYTEALIGNCLIENT = 1000h +CS_BYTEALIGNWINDOW = 2000h +CS_GLOBALCLASS = 4000h ; Global window class + +; +; Special CreateWindow position value +; +CW_USEDEFAULT EQU 8000h + +; +; Windows styles (the high words) +; +WS_OVERLAPPED = 00000h +WS_ICONICPOPUP = 0C000h +WS_POPUP = 08000h +WS_CHILD = 04000h +WS_MINIMIZE = 02000h +WS_VISIBLE = 01000h +WS_DISABLED = 00800h +WS_CLIPSIBLINGS = 00400h +WS_CLIPCHILDREN = 00200h +WS_MAXIMIZE = 00100h +WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME +WS_BORDER = 00080h +WS_DLGFRAME = 00040h +WS_VSCROLL = 00020h +WS_HSCROLL = 00010h +WS_SYSMENU = 00008h +WS_THICKFRAME = 00004h +WS_HREDRAW = 00002h +WS_VREDRAW = 00001h +WS_GROUP = 00002h +WS_TABSTOP = 00001h +WS_MINIMIZEBOX = 00002h +WS_MAXIMIZEBOX = 00001h + +; Common Window Styles + +WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX +WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU +WS_CHILDWINDOW = WS_CHILD +WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW + +WS_TILED = WS_OVERLAPPED +WS_ICONIC = WS_MINIMIZE +WS_SIZEBOX = WS_THICKFRAME + +; Extended Window Styles (low words) +WS_EX_DLGMODALFRAME = 0001 +WS_EX_DRAGOBJECT = 0002 +WS_EX_NOPARENTNOTIFY = 0004 +WS_EX_TOPMOST = 0008 + +; +; predefined clipboard formats +; +CF_TEXT = 1 +CF_BITMAP = 2 +CF_METAFILEPICT = 3 +CF_SYLK = 4 +CF_DIF = 5 +CF_TIFF = 6 +CF_OEMTEXT = 7 +CF_DIB = 8 +CF_PALETTE = 9 +CF_PENDATA = 10 +CF_RIFF = 11 +CF_WAVE = 12 + +CF_OWNERDISPLAY = 80h ; owner display +CF_DSPTEXT = 81h ; display text +CF_DSPBITMAP = 82h ; display bitmap +CF_DSPMETAFILEPICT = 83h ; display metafile +; +; Private clipboard format range +; +CF_PRIVATEFIRST = 200h ; Anything in this range doesn't +CF_PRIVATELAST = 2ffh ; get GlobalFree'd +CF_GDIOBJFIRST = 300h ; Anything in this range gets +CF_GDIOBJLAST = 3ffh ; DeleteObject'ed + + +MAKEINTRESOURCE MACRO a + mov ax,a + xor dx,dx + ENDM +; +; Predefined resource types +; +RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE +RT_BITMAP = 2 +RT_ICON = 3 +RT_MENU = 4 +RT_DIALOG = 5 +RT_STRING = 6 +RT_FONTDIR = 7 +RT_FONT = 8 +RT_ACCELERATOR = 9 +RT_RCDATA = 10 + +;** NOTE: if any new resource types are introduced above this point, then the +;** value of DIFFERENCE must be changed. +;** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE +;** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE + +DIFFERENCE = 11 + +RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE +RT_GROUP_ICON = RT_ICON + DIFFERENCE + + + +IFNDEF NOMDI +MDICREATESTRUCT struc + szClass dd ? + szTitle dd ? + hOwner dw ? + x dw ? + y dw ? + cxc dw ? + cyc dw ? + style dd ? +MDICREATESTRUCT ends + +CLIENTCREATESTRUCT struc + hWindowMenu dw ? + idFirstChild dw ? +CLIENTCREATESTRUCT ends +ENDIF + +; NOMDI + + +PALETTEENTRY struc + peRed db ? + peGreen db ? + peBlue db ? + peFlags db ? +PALETTEENTRY ends + +; Logical Palette +LOGPALETTE struc + palVersion dw ? + palNumEntries dw ? + palPalEntry db ? ; array of PALETTEENTRY +LOGPALETTE ends + +; DRAWITEMSTRUCT for ownerdraw +DRAWITEMSTRUCT struc + drCtlType dw ? + drCtlID dw ? + dritemID dw ? + dritemAction dw ? + dritemState dw ? + drhwndItem dw ? + drhDC dw ? + drrcItem DB size RECT dup(?) + dritemData dd ? +DRAWITEMSTRUCT ends + +; DELETEITEMSTRUCT for ownerdraw +DELETEITEMSTRUCT struc + deCtlType dw ? + deCtlID dw ? + deitemID dw ? + dehwndItem dw ? + deitemData dd ? +DELETEITEMSTRUCT ends + +; MEASUREITEMSTRUCT for ownerdraw +MEASUREITEMSTRUCT struc + meCtlType dw ? + meCtlID dw ? + meitemID dw ? + meitemWidth dw ? + meitemHeight dw ? + meitemData dd ? +MEASUREITEMSTRUCT ends + +; COMPAREITEMSTUCT for ownerdraw sorting +COMPAREITEMSTRUCT struc + coCtlType dw ? + coCtlID dw ? + cohwndItem dw ? + coitemID1 dw ? + coitemData1 dd ? + coitemID2 dw ? + coitemData2 dd ? +COMPAREITEMSTRUCT ends + +; Owner draw control types +ODT_MENU = 1 +ODT_LISTBOX = 2 +ODT_COMBOBOX = 3 +ODT_BUTTON = 4 + +; Owner draw actions +ODA_DRAWENTIRE = 1 +ODA_SELECT = 2 +ODA_FOCUS = 4 + +; Owner draw state +ODS_SELECTED = 0001h +ODS_GRAYED = 0002h +ODS_DISABLED = 0004h +ODS_CHECKED = 0008h +ODS_FOCUS = 0010h + +; PeekMessage() Options +PM_NOREMOVE = 0000h +PM_REMOVE = 0001h +PM_NOYIELD = 0002h + +; SetWindowPos Flags +SWP_NOSIZE = 0001h +SWP_NOMOVE = 0002h +SWP_NOZORDER = 0004h +SWP_NOREDRAW = 0008h +SWP_NOACTIVATE = 0010h +SWP_DRAWFRAME = 0020h +SWP_SHOWWINDOW = 0040h +SWP_HIDEWINDOW = 0080h +SWP_NOCOPYBITS = 0100h +SWP_NOREPOSITION = 0200h + + +IFNDEF NOWINMESSAGES + +; Listbox messages +LB_ADDSTRING = (WM_USER+1) +LB_INSERTSTRING = (WM_USER+2) +LB_DELETESTRING = (WM_USER+3) +LB_RESETCONTENT = (WM_USER+5) +LB_SETSEL = (WM_USER+6) +LB_SETCURSEL = (WM_USER+7) +LB_GETSEL = (WM_USER+8) +LB_GETCURSEL = (WM_USER+9) +LB_GETTEXT = (WM_USER+10) +LB_GETTEXTLEN = (WM_USER+11) +LB_GETCOUNT = (WM_USER+12) +LB_SELECTSTRING = (WM_USER+13) +LB_DIR = (WM_USER+14) +LB_GETTOPINDEX = (WM_USER+15) +LB_FINDSTRING = (WM_USER+16) +LB_GETSELCOUNT = (WM_USER+17) +LB_GETSELITEMS = (WM_USER+18) +LB_SETTABSTOPS = (WM_USER+19) +LB_GETHORIZONTALEXTENT = (WM_USER+20) +LB_SETHORIZONTALEXTENT = (WM_USER+21) +LB_SETTOPINDEX = (WM_USER+24) +LB_GETITEMRECT = (WM_USER+25) +LB_GETITEMDATA = (WM_USER+26) +LB_SETITEMDATA = (WM_USER+27) +LB_SELITEMRANGE = (WM_USER+28) +LB_SETCARETINDEX = (WM_USER+31) +LB_GETCARETINDEX = (WM_USER+32) +IFNDEF NOWIN31 +LB_SETITEMHEIGHT = (WM_USER+33) +LB_GETITEMHEIGHT = (WM_USER+34) +LB_FINDSTRINGEXACT = (WM_USER+35) +ENDIF + +ENDIF +; NOWINMESSAGES + +; Listbox Styles +LBS_NOTIFY = 0001h +LBS_SORT = 0002h +LBS_NOREDRAW = 0004h +LBS_MULTIPLESEL = 0008h +LBS_OWNERDRAWFIXED = 0010h +LBS_OWNERDRAWVARIABLE = 0020h +LBS_HASSTRINGS = 0040h +LBS_USETABSTOPS = 0080h +LBS_NOINTEGRALHEIGHT = 0100h +LBS_MULTICOLUMN = 0200h +LBS_WANTKEYBOARDINPUT = 0400h +LBS_EXTENDEDSEL = 0800h +LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER +LBS_DISABLENOSCROLL = 1000h + +; Listbox Notification Codes +LBN_ERRSPACE = (-2) +LBN_SELCHANGE = 1 +LBN_DBLCLK = 2 +LBN_SELCANCEL = 3 +LBN_SETFOCUS = 4 +LBN_KILLFOCUS = 5 + +IFNDEF NOWINMESSAGES + +; Edit Control Messages +EM_GETSEL = (WM_USER+0) +EM_SETSEL = (WM_USER+1) +EM_GETRECT = (WM_USER+2) +EM_SETRECT = (WM_USER+3) +EM_SETRECTNP = (WM_USER+4) +EM_SCROLL = (WM_USER+5) +EM_LINESCROLL = (WM_USER+6) +EM_GETMODIFY = (WM_USER+8) +EM_SETMODIFY = (WM_USER+9) +EM_GETLINECOUNT = (WM_USER+10) +EM_LINEINDEX = (WM_USER+11) +EM_SETHANDLE = (WM_USER+12) +EM_GETHANDLE = (WM_USER+13) +EM_LINELENGTH = (WM_USER+17) +EM_REPLACESEL = (WM_USER+18) +EM_SETFONT = (WM_USER+19) +EM_GETLINE = (WM_USER+20) +EM_LIMITTEXT = (WM_USER+21) +EM_CANUNDO = (WM_USER+22) +EM_UNDO = (WM_USER+23) +EM_FMTLINES = (WM_USER+24) +EM_LINEFROMCHAR = (WM_USER+25) +EM_SETWORDBREAK = (WM_USER+26) +EM_SETTABSTOPS = (WM_USER+27) +EM_SETPASSWORDCHAR = (WM_USER+28) +EM_EMPTYUNDOBUFFER = (WM_USER+29) +IFNDEF NOWIN31 +EM_GETFIRSTVISIBLELINE = (WM_USER+30) +EM_SETREADONLY = (WM_USER+31) +EM_SETWORDBREAKPROC = (WM_USER+32) +EM_GETWORDBREAKPROC = (WM_USER+33) +EM_GETPASSWORDCHAR = (WM_USER+34) +ENDIF + +ENDIF +; NOWINMESSAGES + + +; Edit Control Styles (low word) +ES_LEFT = 0000h +ES_CENTER = 0001h +ES_RIGHT = 0002h +ES_MULTILINE = 0004h +ES_UPPERCASE = 0008h +ES_LOWERCASE = 0010h +ES_PASSWORD = 0020h +ES_AUTOVSCROLL = 0040h +ES_AUTOHSCROLL = 0080h +ES_NOHIDESEL = 0100h +ES_OEMCONVERT = 0400h +IFNDEF NOWIN31 +ES_READONLY = 0800h +ES_WANTRETURN = 1000h +ENDIF + + +; Edit Control Notification Codes +EN_SETFOCUS = 0100h +EN_KILLFOCUS = 0200h +EN_CHANGE = 0300h +EN_UPDATE = 0400h +EN_ERRSPACE = 0500h +EN_MAXTEXT = 0501h +EN_HSCROLL = 0601h +EN_VSCROLL = 0602h + +IFNDEF NOWINMESSAGES + +; Button Control Messages +BM_GETCHECK = (WM_USER+0) +BM_SETCHECK = (WM_USER+1) +BM_GETSTATE = (WM_USER+2) +BM_SETSTATE = (WM_USER+3) +BM_SETSTYLE = (WM_USER+4) + +ENDIF +; NOWINMESSAGES + +; Button Control Styles (low word) +BS_PUSHBUTTON = 00h +BS_DEFPUSHBUTTON = 01h +BS_CHECKBOX = 02h +BS_AUTOCHECKBOX = 03h +BS_RADIOBUTTON = 04h +BS_3STATE = 05h +BS_AUTO3STATE = 06h +BS_GROUPBOX = 07h +BS_USERBUTTON = 08h +BS_AUTORADIOBUTTON = 09h +BS_OWNERDRAW = 0Bh +BS_LEFTTEXT = 20h + +; User Button Notification Codes +BN_CLICKED = 0 +BN_PAINT = 1 +BN_HILITE = 2 +BN_UNHILITE = 3 +BN_DISABLE = 4 +BN_DOUBLECLICKED = 5 + +; Dialog Styles (low words) +DS_ABSALIGN = 01h +DS_SYSMODAL = 02h +DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */ +DS_SETFONT = 40h ;/* User specified font for Dlg controls */ +DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */ +DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */ + +IFNDEF NOWINMESSAGES + +; Dialog box messages +DM_GETDEFID = (WM_USER+0) +DM_SETDEFID = (WM_USER+1) + +ENDIF ;NOWINMESSAGES + +; Dialog Codes +DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */ +DLGC_WANTTAB = 0002h ; /* Control wants tab keys */ +DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */ +DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */ +DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */ +DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */ +DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */ +DLGC_RADIOBUTTON = 0040h ; /* Radio button */ +DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */ +DLGC_STATIC = 0100h ; /* Static item: don't include */ +DLGC_BUTTON = 2000h ; /* Button item: can be checked */ + +; Combo Box return Values +CB_OKAY = 0 +CB_ERR = (-1) +CB_ERRSPACE = (-2) + +; Combo Box Notification Codes +CBN_ERRSPACE = (-1) +CBN_SELCHANGE = 1 +CBN_DBLCLK = 2 +CBN_SETFOCUS = 3 +CBN_KILLFOCUS = 4 +CBN_EDITCHANGE = 5 +CBN_EDITUPDATE = 6 +CBN_DROPDOWN = 7 + +; Combo Box styles (low words) +CBS_SIMPLE = 0001h +CBS_DROPDOWN = 0002h +CBS_DROPDOWNLIST = 0003h +CBS_OWNERDRAWFIXED = 0010h +CBS_OWNERDRAWVARIABLE= 0020h +CBS_AUTOHSCROLL = 0040h +CBS_OEMCONVERT = 0080h +CBS_SORT = 0100h +CBS_HASSTRINGS = 0200h +CBS_NOINTEGRALHEIGHT = 0400h + +IFNDEF NOWINMESSAGES + +; Combo Box messages +CB_GETEDITSEL = (WM_USER+0) +CB_LIMITTEXT = (WM_USER+1) +CB_SETEDITSEL = (WM_USER+2) +CB_ADDSTRING = (WM_USER+3) +CB_DELETESTRING = (WM_USER+4) +CB_DIR = (WM_USER+5) +CB_GETCOUNT = (WM_USER+6) +CB_GETCURSEL = (WM_USER+7) +CB_GETLBTEXT = (WM_USER+8) +CB_GETLBTEXTLEN = (WM_USER+9) +CB_INSERTSTRING = (WM_USER+10) +CB_RESETCONTENT = (WM_USER+11) +CB_FINDSTRING = (WM_USER+12) +CB_SELECTSTRING = (WM_USER+13) +CB_SETCURSEL = (WM_USER+14) +CB_SHOWDROPDOWN = (WM_USER+15) +CB_GETITEMDATA = (WM_USER+16) +CB_SETITEMDATA = (WM_USER+17) +IFNDEF NOWIN31 +CB_GETDROPPEDCONTROLRECT = (WM_USER+18) +CB_SETITEMHEIGHT = (WM_USER+19) +CB_GETITEMHEIGHT = (WM_USER+20) +CB_SETEXTENDEDUI = (WM_USER+21) +CB_GETEXTENDEDUI = (WM_USER+22) +CB_GETDROPPEDSTATE = (WM_USER+23) +CB_FINDSTRINGEXACT = (WM_USER+24) +ENDIF + +ENDIF ; NOWINMESSAGES + +; Static Control styles (low word) +SS_LEFT = 00h +SS_CENTER = 01h +SS_RIGHT = 02h +SS_ICON = 03h +SS_BLACKRECT = 04h +SS_GRAYRECT = 05h +SS_WHITERECT = 06h +SS_BLACKFRAME = 07h +SS_GRAYFRAME = 08h +SS_WHITEFRAME = 09h +SS_SIMPLE = 0Bh +SS_LEFTNOWORDWRAP = 0Ch +SS_NOPREFIX = 80h ; Don't do "&" character translation + +IFNDEF NOWIN31 +IFNDEF NOWINMESSAGES + +;Static Control Messages +STM_SETICON = (WM_USER+0) +STM_GETICON = (WM_USER+1) +ENDIF +ENDIF + +; Scroll Bar Styles (low word) +SBS_HORZ = 0000h +SBS_VERT = 0001h +SBS_TOPALIGN = 0002h +SBS_LEFTALIGN = 0002h +SBS_BOTTOMALIGN = 0004h +SBS_RIGHTALIGN = 0004h +SBS_SIZEBOXTOPLEFTALIGN = 0002h +SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h +SBS_SIZEBOX = 0008h + +IFNDEF NOSYSMETRICS + +; GetSystemMetrics() codes +SM_CXSCREEN = 0 +SM_CYSCREEN = 1 +SM_CXVSCROLL = 2 +SM_CYHSCROLL = 3 +SM_CYCAPTION = 4 +SM_CXBORDER = 5 +SM_CYBORDER = 6 +SM_CXDLGFRAME = 7 +SM_CYDLGFRAME = 8 +SM_CYVTHUMB = 9 +SM_CXHTHUMB = 10 +SM_CXICON = 11 +SM_CYICON = 12 +SM_CXCURSOR = 13 +SM_CYCURSOR = 14 +SM_CYMENU = 15 +SM_CXFULLSCREEN = 16 +SM_CYFULLSCREEN = 17 +SM_CYKANJIWINDOW = 18 +SM_MOUSEPRESENT = 19 +SM_CYVSCROLL = 20 +SM_CXHSCROLL = 21 +SM_DEBUG = 22 +SM_SWAPBUTTON = 23 +SM_RESERVED1 = 24 +SM_RESERVED2 = 25 +SM_RESERVED3 = 26 +SM_RESERVED4 = 27 +SM_CXMIN = 28 +SM_CYMIN = 29 +SM_CXSIZE = 30 +SM_CYSIZE = 31 +SM_CXFRAME = 32 +SM_CYFRAME = 33 +SM_CXMINTRACK = 34 +SM_CYMINTRACK = 35 +IFNDEF NOWIN31 +SM_CXDOUBLECLK = 36 +SM_CYDOUBLECLK = 37 +SM_CXICONSPACING = 38 +SM_CYICONSPACING = 39 +SM_MENUDROPALIGNMENT = 40 +SM_PENWINDOWS = 41 +SM_DBCSENABLED = 42 +ENDIF +SM_CMETRICSMAX = 43 + +ENDIF ;NOSYSMETRICS + +IFNDEF NOCOLOR + +COLOR_SCROLLBAR = 0 +COLOR_BACKGROUND = 1 +COLOR_ACTIVECAPTION = 2 +COLOR_INACTIVECAPTION = 3 +COLOR_MENU = 4 +COLOR_WINDOW = 5 +COLOR_WINDOWFRAME = 6 +COLOR_MENUTEXT = 7 +COLOR_WINDOWTEXT = 8 +COLOR_CAPTIONTEXT = 9 +COLOR_ACTIVEBORDER = 10 +COLOR_INACTIVEBORDER = 11 +COLOR_APPWORKSPACE = 12 +COLOR_HIGHLIGHT = 13 +COLOR_HIGHLIGHTTEXT = 14 +COLOR_BTNFACE = 15 +COLOR_BTNSHADOW = 16 +COLOR_GRAYTEXT = 17 +COLOR_BTNTEXT = 18 +IFNDEF NOWIN31 +COLOR_INACTIVECAPTIONTEXT = 19 +COLOR_BTNHILIGHT = 20 +ENDIF +ENDIF ;NOCOLOR + +; Commands to pass WinHelp() +HELP_CONTEXT =0001h ;/* Display topic in ulTopic */ +HELP_QUIT =0002h ;/* Terminate help */ +HELP_INDEX =0003h ;/* Display index */ +HELP_HELPONHELP =0004h ;/* Display help on using help */ +HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */ +HELP_KEY =0101h ;/* Display topic for keyword in offabData */ + +IFNDEF NOCOMM + +NOPARITY = 0 +ODDPARITY = 1 +EVENPARITY = 2 +MARKPARITY = 3 +SPACEPARITY = 4 + +ONESTOPBIT = 0 +ONE5STOPBITS = 1 +TWOSTOPBITS = 2 + +IGNORE = 0 ; /* Ignore signal */ +INFINITE = 0FFFFh ; /* Infinite timeout */ + +; Error Flags +CE_RXOVER = 0001h ; /* Receive Queue overflow */ +CE_OVERRUN = 0002h ; /* Receive Overrun Error */ +CE_RXPARITY = 0004h ; /* Receive Parity Error */ +CE_FRAME = 0008h ; /* Receive Framing error */ +CE_BREAK = 0010h ; /* Break Detected */ +CE_CTSTO = 0020h ; /* CTS Timeout */ +CE_DSRTO = 0040h ; /* DSR Timeout */ +CE_RLSDTO = 0080h ; /* RLSD Timeout */ +CE_TXFULL = 0100h ; /* TX Queue is full */ +CE_PTO = 0200h ; /* LPTx Timeout */ +CE_IOE = 0400h ; /* LPTx I/O Error */ +CE_DNS = 0800h ; /* LPTx Device not selected */ +CE_OOP = 1000h ; /* LPTx Out-Of-Paper */ +CE_MODE = 8000h ; /* Requested mode unsupported */ + +IE_BADID = (-1) ; /* Invalid or unsupported id */ +IE_OPEN = (-2) ; /* Device Already Open */ +IE_NOPEN = (-3) ; /* Device Not Open */ +IE_MEMORY = (-4) ; /* Unable to allocate queues */ +IE_DEFAULT = (-5) ; /* Error in default parameters */ +IE_HARDWARE = (-10) ; /* Hardware Not Present */ +IE_BYTESIZE = (-11) ; /* Illegal Byte Size */ +IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */ + +; Events +EV_RXCHAR = 0001h ; /* Any Character received */ +EV_RXFLAG = 0002h ; /* Received certain character */ +EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */ +EV_CTS = 0008h ; /* CTS changed state */ +EV_DSR = 0010h ; /* DSR changed state */ +EV_RLSD = 0020h ; /* RLSD changed state */ +EV_BREAK = 0040h ; /* BREAK received */ +EV_ERR = 0080h ; /* Line status error occurred */ +EV_RING = 0100h ; /* Ring signal detected */ +EV_PERR = 0200h ; /* Printer error occured */ +EV_CTSS = 0400h ; /* CTS state */ +EV_DSRS = 0800h ; /* DSR state */ +EV_RLSDS = 1000h ; /* RLSD state */ +EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */ + + +; Escape Functions +SETXOFF = 1 ; /* Simulate XOFF received */ +SETXON = 2 ; /* Simulate XON received */ +SETRTS = 3 ; /* Set RTS high */ +CLRRTS = 4 ; /* Set RTS low */ +SETDTR = 5 ; /* Set DTR high */ +CLRDTR = 6 ; /* Set DTR low */ +RESETDEV = 7 ; /* Reset device if possible */ + +LPTx = 80h ; /* Set if ID is for LPT device */ + +IFNDEF NOWIN31 +; new escape functions +GETMAXLPT equ 8 ; Max supported LPT id +GETMAXCOM equ 9 ; Max supported COM id +GETBASEIRQ equ 10 ; Get port base & irq for a port + +; Comm Baud Rate indices +CBR_110 equ 0FF10h +CBR_300 equ 0FF11h +CBR_600 equ 0FF12h +CBR_1200 equ 0FF13h +CBR_2400 equ 0FF14h +CBR_4800 equ 0FF15h +CBR_9600 equ 0FF16h +CBR_14400 equ 0FF17h +CBR_19200 equ 0FF18h +; 0FF19h (reserved) +; 0FF1Ah (reserved) +CBR_38400 equ 0FF1Bh +; 0FF1Ch (reserved) +; 0FF1Dh (reserved) +; 0FF1Eh (reserved) +CBR_56000 equ 0FF1Fh +; 0FF20h (reserved) +; 0FF21h (reserved) +; 0FF22h (reserved) +CBR_128000 equ 0FF23h +; 0FF24h (reserved) +; 0FF25h (reserved) +; 0FF26h (reserved) +CBR_256000 equ 0FF27h + +; notifications passed in low word of lParam on WM_COMMNOTIFY messages +CN_RECEIVE equ 1 ; bytes are available in the input queue +CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still + ; remain in the output queue waiting + ; to be transmitted. +CN_EVENT equ 4 ; an enabled event has occurred + +ENDIF + + +DCB struc + DCB_Id db ? ; /* Internal Device ID */ + DCB_BaudRate dw ? ; /* Baudrate at which runing */ + DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */ + DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */ + DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */ + DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */ + DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */ + DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */ + + DCB_BitMask1 db ? + + ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */ + ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */ + ; BYTE fParity: 1; /* Enable parity checking */ + ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */ + ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */ + ; BYTE fDummy: 2; /* Reserved */ + ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */ + + DCB_BitMask2 db ? + + ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */ + ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */ + ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */ + ; BYTE fNull: 1; /* Enable Null stripping */ + ; BYTE fChEvt: 1; /* Enable Rx character event. */ + ; BYTE fDtrflow: 1; /* DTR handshake on input */ + ; BYTE fRtsflow: 1; /* RTS handshake on input */ + ; BYTE fDummy2: 1; + + DCB_XonChar db ? ; /* Tx and Rx X-ON character */ + DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */ + DCB_XonLim dw ? ; /* Transmit X-ON threshold */ + DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */ + DCB_PeChar db ? ; /* Parity error replacement char */ + DCB_EofChar db ? ; /* End of Input character */ + DCB_EvtChar db ? ; /* Recieved Event character */ + DCB_TxDelay dw ? ; /* Amount of time between chars */ +DCB ends + +COMSTAT struc + COMS_BitMask1 db ? + +; BYTE fCtsHold: 1; /* Transmit is on CTS hold */ +; BYTE fDsrHold: 1; /* Transmit is on DSR hold */ +; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */ +; BYTE fXoffHold: 1; /* Received handshake */ +; BYTE fXoffSent: 1; /* Issued handshake */ +; BYTE fEof: 1; /* End of file character found */ +; BYTE fTxim: 1; /* Character being transmitted */ + + + COMS_cbInQue dw ? ; /* count of characters in Rx Queue */ + COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */ +COMSTAT ends + +ENDIF ;NOCOM + +; +; Installable Driver Support +; +; Driver Messages +DRV_LOAD = 0001h +DRV_ENABLE = 0002h +DRV_OPEN = 0003h +DRV_CLOSE = 0004h +DRV_DISABLE = 0005h +DRV_FREE = 0006h +DRV_CONFIGURE = 0007h +DRV_QUERYCONFIGURE = 0008h +DRV_INSTALL = 0009h +DRV_REMOVE = 000Ah +DRV_EXITSESSION = 000Bh +DRV_POWER = 000Fh +DRV_RESERVED = 0800h +DRV_USER = 4000h + +;LPARAM of DRV_CONFIGURE message and return values +DRVCONFIGINFO struc + DRVCNF_dwDCISize dw ? + DRVCNF_lpszDCISectionName dd ? + DRVCNF_lpszDCIAliasName dd ? +DRVCONFIGINFO ends + +DRVCNF_CANCEL = 0000h +DRVCNF_OK = 0001h +DRVCNF_RESTART = 0002h + + +IFNDEF NOKERNEL +; +; Common Kernel errors +; +ERR_GALLOC = 01030h ; GlobalAlloc Failed +ERR_GREALLOC = 01031h ; GlobalReAlloc Failed +ERR_GLOCK = 01032h ; GlobalLock Failed +ERR_LALLOC = 01033h ; LocalAlloc Failed +ERR_LREALLOC = 01034h ; LocalReAlloc Failed +ERR_LLOCK = 01035h ; LocalLock Failed +ERR_ALLOCRES = 01036h ; AllocResource Failed +ERR_LOCKRES = 01037h ; LockResource Failed +ERR_LOADMODULE = 01038h ; LoadModule failed + +; +; Common User Errors +; +ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */ +ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure due to CreateWindow Failure */ +ERR_REGISTERCLASS = 01047h ; /* RegisterClass failure due to Class already registered */ +ERR_DCBUSY = 01048h ; /* DC Cache is full */ +ERR_CREATEWND = 01049h ; /* Create Wnd failed due to class not found */ +ERR_STRUCEXTRA = 01050h ; /* Unallocated Extra space is used */ +ERR_LOADSTR = 01051h ; /* LoadString() failed */ +ERR_LOADMENU = 01052h ; /* LoadMenu Failed */ +ERR_NESTEDBEGINPAINT = 01053h ; /* Nested BeginPaint() calls */ +ERR_BADINDEX = 01054h ; /* Bad index to Get/Set Class/Window Word/Long */ +ERR_CREATEMENU = 01055h ; /* Error creating menu */ + +; +; Common GDI Errors +; +ERR_CREATEDC = 01070h ; /* CreateDC/CreateIC etc., failure */ +ERR_CREATEMETA = 01071h ; /* CreateMetafile failure */ +ERR_DELOBJSELECTED = 01072h ; /* Bitmap being deleted is selected into DC */ +ERR_SELBITMAP = 01073h ; /* Bitmap being selected is already selected elsewhere */ + +ENDIF ;NOKERNEL diff --git a/private/oleauto/tools/win16/hdos/c800/include/windowsx.h b/private/oleauto/tools/win16/hdos/c800/include/windowsx.h new file mode 100644 index 000000000..d86138ad6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windowsx.h @@ -0,0 +1,1109 @@ +/*****************************************************************************\ +* * +* windowsx.h - Macro APIs, window message crackers, and control APIs * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWSX +#define _INC_WINDOWSX + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** KERNEL Macro APIs ****************************************************/ + +#define GetInstanceModule(hInstance) \ + GetModuleHandle((LPCSTR)MAKELP(0, hInstance)) + +#define GlobalPtrHandle(lp) \ + ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp)))) + +#define GlobalLockPtr(lp) \ + ((BOOL)SELECTOROF(GlobalLock(GlobalPtrHandle(lp)))) +#define GlobalUnlockPtr(lp) \ + GlobalUnlock(GlobalPtrHandle(lp)) + +#define GlobalAllocPtr(flags, cb) \ + (GlobalLock(GlobalAlloc((flags), (cb)))) +#define GlobalReAllocPtr(lp, cbNew, flags) \ + (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) +#define GlobalFreePtr(lp) \ + (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) + +/****** GDI Macro APIs *******************************************************/ + +#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen)) +#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen))) +#define GetStockPen(i) ((HPEN)GetStockObject(i)) + +#define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr)) +#define SelectBrush(hdc, hbr) ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr))) +#define GetStockBrush(i) ((HBRUSH)GetStockObject(i)) + +#define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn)) + +#define CopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY) +#define IntersectRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_AND) +#define SubtractRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_DIFF) +#define UnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR) +#define XorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR) + +#define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal)) + +#define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont)) +#define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont))) +#define GetStockFont(i) ((HFONT)GetStockObject(i)) + +#define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm)) +#define SelectBitmap(hdc, hbm) ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm))) + +#define InsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy)) + +/****** USER Macro APIs ******************************************************/ + +#define GetWindowInstance(hwnd) ((HINSTANCE)GetWindowWord(hwnd, GWW_HINSTANCE)) + +#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE)) +#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE)) + +#define GetWindowOwner(hwnd) GetWindow(hwnd, GW_OWNER) + +#define GetFirstChild(hwnd) GetTopWindow(hwnd) +#define GetFirstSibling(hwnd) GetWindow(hwnd, GW_HWNDFIRST) +#define GetLastSibling(hwnd) GetWindow(hwnd, GW_HWNDLAST) +#define GetNextSibling(hwnd) GetWindow(hwnd, GW_HWNDNEXT) +#define GetPrevSibling(hwnd) GetWindow(hwnd, GW_HWNDPREV) + +#define GetWindowID(hwnd) GetDlgCtrlID(hwnd) + +#define SetWindowRedraw(hwnd, fRedraw) \ + ((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L)) + +#define SubclassWindow(hwnd, lpfn) \ + ((WNDPROC)SetWindowLong((hwnd), GWL_WNDPROC, (LPARAM)(WNDPROC)(lpfn))) + +#define IsMinimized(hwnd) IsIconic(hwnd) +#define IsMaximized(hwnd) IsZoomed(hwnd) +#define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0L) + +#define SetWindowFont(hwnd, hfont, fRedraw) FORWARD_WM_SETFONT((hwnd), (hfont), (fRedraw), SendMessage) + +#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd), SendMessage) + +#if (WINVER >= 0x030a) +#define MapWindowRect(hwndFrom, hwndTo, lprc) \ + MapWindowPoints((hwndFrom), (hwndTo), (POINT FAR*)(lprc), 2) +#endif /* WINVER >= 0x030a */ + +#define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0) +#define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0) +#define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0) + +#define SubclassDialog(hwndDlg, lpfn) \ + ((DLGPROC)SetWindowLong(hwndDlg, DWL_DLGPROC, (LPARAM)(DLGPROC)(lpfn))) + +#define SetDlgMsgResult(hwnd, msg, result) \ + (((msg) == WM_CTLCOLOR || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || \ + (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG) \ + ? (BOOL)LOWORD(result) : (SetWindowLong((hwnd), DWL_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE)) + +#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \ + (*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam)) + +#define CheckDefDlgRecursion(pfRecursion) \ + if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; } + +/****** Message crackers ****************************************************/ + +#define HANDLE_MSG(hwnd, message, fn) \ + case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) + +/* void Cls_OnCompacting(HWND hwnd, UINT compactRatio); */ +#define HANDLE_WM_COMPACTING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_COMPACTING(hwnd, compactRatio, fn) \ + (void)(fn)((hwnd), WM_COMPACTING, (WPARAM)(UINT)(compactRatio), 0L) + +/* void Cls_OnWinIniChange(HWND hwnd, LPCSTR lpszSectionName); */ +#define HANDLE_WM_WININICHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_WININICHANGE(hwnd, lpszSectionName, fn) \ + (void)(fn)((hwnd), WM_WININICHANGE, 0, (LPARAM)(LPCSTR)(lpszSectionName)) + +/* void Cls_OnSysColorChange(HWND hwnd); */ +#define HANDLE_WM_SYSCOLORCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_SYSCOLORCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_SYSCOLORCHANGE, 0, 0L) + +/* BOOL Cls_OnQueryNewPalette(HWND hwnd); */ +#define HANDLE_WM_QUERYNEWPALETTE(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYNEWPALETTE(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYNEWPALETTE, 0, 0L) + +/* void Cls_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTEISCHANGING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTEISCHANGING(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTEISCHANGING, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTECHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTECHANGED(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTECHANGED, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnFontChange(HWND hwnd); */ +#define HANDLE_WM_FONTCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_FONTCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_FONTCHANGE, 0, 0L) + +/* void Cls_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue); */ +#define HANDLE_WM_SPOOLERSTATUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SPOOLERSTATUS(hwnd, status, cJobInQueue, fn) \ + (void)(fn)((hwnd), WM_SPOOLERSTATUS, (WPARAM)(status), MAKELPARAM((UINT)(cJobInQueue), 0)) + +/* void Cls_OnDevModeChange(HWND hwnd, LPCSTR lpszDeviceName); */ +#define HANDLE_WM_DEVMODECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_DEVMODECHANGE(hwnd, lpszDeviceName, fn) \ + (void)(fn)((hwnd), WM_DEVMODECHANGE, 0,(LPARAM)(LPCSTR)(lpszDeviceName)) + +/* void Cls_OnTimeChange(HWND hwnd); */ +#define HANDLE_WM_TIMECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_TIMECHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_TIMECHANGE, 0, 0L) + +/* void Cls_OnPower(HWND hwnd, int code); */ +#define HANDLE_WM_POWER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_POWER(hwnd, code, fn) \ + (void)(fn)((hwnd), WM_POWER, (WPARAM)(code), 0L) + +/* BOOL Cls_OnQueryEndSession(HWND hwnd); */ +#define HANDLE_WM_QUERYENDSESSION(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYENDSESSION(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYENDSESSION, 0, 0L) + +/* void Cls_OnEndSession(HWND hwnd, BOOL fEnding); */ +#define HANDLE_WM_ENDSESSION(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENDSESSION(hwnd, fEnding, fn) \ + (void)(fn)((hwnd), WM_ENDSESSION, (WPARAM)(BOOL)(fEnding), 0L) + +/* void Cls_OnQuit(HWND hwnd, int exitCode); */ +#define HANDLE_WM_QUIT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_QUIT(hwnd, exitCode, fn) \ + (void)(fn)((hwnd), WM_QUIT, (WPARAM)(exitCode), 0L) + +/* void Cls_OnSystemError(HWND hwnd, int errCode); */ +#define HANDLE_WM_SYSTEMERROR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_SYSTEMERROR(hwnd, errCode, fn) \ + (void)(fn)((hwnd), WM_SYSTEMERROR, (WPARAM)(errCode), 0L) + +/* BOOL Cls_OnCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_CREATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) ? 0L : (LRESULT)-1L) +#define FORWARD_WM_CREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_CREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* BOOL Cls_OnNCCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_NCCREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_NCCREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCCREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* void Cls_OnDestroy(HWND hwnd); */ +#define HANDLE_WM_DESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROY, 0, 0L) + +/* void Cls_OnNCDestroy(HWND hwnd); */ +#define HANDLE_WM_NCDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_NCDESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_NCDESTROY, 0, 0L) + +/* void Cls_OnShowWindow(HWND hwnd, BOOL fShow, UINT status); */ +#define HANDLE_WM_SHOWWINDOW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_SHOWWINDOW(hwnd, fShow, status, fn) \ + (void)(fn)((hwnd), WM_SHOWWINDOW, (WPARAM)(BOOL)(fShow), MAKELPARAM((UINT)(status), 0)) + +/* void Cls_OnSetRedraw(HWND hwnd, BOOL fRedraw); */ +#define HANDLE_WM_SETREDRAW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_SETREDRAW(hwnd, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETREDRAW, (WPARAM)(fRedraw), 0L) + +/* void Cls_OnEnable(HWND hwnd, BOOL fEnable); */ +#define HANDLE_WM_ENABLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENABLE(hwnd, fEnable, fn) \ + (void)(fn)((hwnd), WM_ENABLE, (WPARAM)(BOOL)(fEnable), 0L) + +/* void Cls_OnSetText(HWND hwnd, LPCSTR lpszText); */ +#define HANDLE_WM_SETTEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_SETTEXT(hwnd, lpszText, fn) \ + (void)(fn)((hwnd), WM_SETTEXT, 0, (LPARAM)(LPCSTR)(lpszText)) + +/* INT Cls_OnGetText(HWND hwnd, int cchTextMax, LPSTR lpszText) */ +#define HANDLE_WM_GETTEXT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (int)(wParam), (LPSTR)(lParam)) +#define FORWARD_WM_GETTEXT(hwnd, cchTextMax, lpszText, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXT, (WPARAM)(int)(cchTextMax), (LPARAM)(LPSTR)(lpszText)) + +/* INT Cls_OnGetTextLength(HWND hwnd); */ +#define HANDLE_WM_GETTEXTLENGTH(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)(hwnd) +#define FORWARD_WM_GETTEXTLENGTH(hwnd, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXTLENGTH, 0, 0L) + +/* BOOL Cls_OnWindowPosChanging(HWND hwnd, WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (WINDOWPOS FAR*)(lParam)) +#define FORWARD_WM_WINDOWPOSCHANGING(hwnd, lpwpos, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_WINDOWPOSCHANGING, 0, (LPARAM)(WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnWindowPosChanged(HWND hwnd, const WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const WINDOWPOS FAR*)(lParam)), 0L) +#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn) \ + (void)(fn)((hwnd), WM_WINDOWPOSCHANGED, 0, (LPARAM)(const WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnMove(HWND hwnd, int x, int y); */ +#define HANDLE_WM_MOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_MOVE(hwnd, x, y, fn) \ + (void)(fn)((hwnd), WM_MOVE, 0, MAKELPARAM((int)(x), (int)(y))) + +/* void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy); */ +#define HANDLE_WM_SIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SIZE(hwnd, state, cx, cy, fn) \ + (void)(fn)((hwnd), WM_SIZE, (WPARAM)(UINT)(state), MAKELPARAM((int)(cx), (int)(cy))) + +/* void Cls_OnClose(HWND hwnd); */ +#define HANDLE_WM_CLOSE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLOSE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLOSE, 0, 0L) + +/* BOOL Cls_OnQueryOpen(HWND hwnd); */ +#define HANDLE_WM_QUERYOPEN(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYOPEN(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYOPEN, 0, 0L) + +/* void Cls_OnGetMinMaxInfo(HWND hwnd, MINMAXINFO FAR* lpMinMaxInfo); */ +#define HANDLE_WM_GETMINMAXINFO(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MINMAXINFO FAR*)(lParam)), 0L) +#define FORWARD_WM_GETMINMAXINFO(hwnd, lpMinMaxInfo, fn) \ + (void)(fn)((hwnd), WM_GETMINMAXINFO, 0, (LPARAM)(MINMAXINFO FAR*)(lpMinMaxInfo)) + +/* void Cls_OnPaint(HWND hwnd); */ +#define HANDLE_WM_PAINT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PAINT(hwnd, fn) \ + (void)(fn)((hwnd), WM_PAINT, 0, 0L) + +/* BOOL Cls_OnEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* BOOL Cls_OnIconEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ICONERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ICONERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ICONERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* void Cls_OnNCPaint(HWND hwnd, HRGN hrgn); */ +#define HANDLE_WM_NCPAINT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HRGN)(wParam)), 0L) +#define FORWARD_WM_NCPAINT(hwnd, hrgn, fn) \ + (void)(fn)((hwnd), WM_NCPAINT, (WPARAM)(HRGN)(hrgn), 0L) + +/* UINT Cls_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS FAR* lpcsp) */ +#define HANDLE_WM_NCCALCSIZE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (NCCALCSIZE_PARAMS FAR*)(lParam)) +#define FORWARD_WM_NCCALCSIZE(hwnd, fCalcValidRects, lpcsp, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCCALCSIZE, (WPARAM)(fCalcValidRects), (LPARAM)(NCCALCSIZE_PARAMS FAR*)(lpcsp)) + +/* UINT Cls_OnNCHitTest(HWND hwnd, int x, int y); */ +#define HANDLE_WM_NCHITTEST(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCHITTEST, 0, MAKELPARAM((int)(x), (int)(y))) + +/* HICON Cls_OnQueryDragIcon(HWND hwnd); */ +#define HANDLE_WM_QUERYDRAGICON(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_QUERYDRAGICON(hwnd, fn) \ + (HICON)(UINT)(DWORD)(fn)((hwnd), WM_QUERYDRAGICON, 0, 0L) + +#ifdef _INC_SHELLAPI +/* void Cls_OnDropFiles(HWND hwnd, HDROP hdrop); */ +#define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HDROP)(wParam)), 0L) +#define FORWARD_WM_DROPFILES(hwnd, hdrop, fn) \ + (void)(fn)((hwnd), WM_DROPFILES, (WPARAM)(hdrop), 0L) +#endif /* _INC_SHELLAPI */ + +/* void Cls_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_ACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATE(hwnd, state, hwndActDeact, fMinimized, fn) \ + (void)(fn)((hwnd), WM_ACTIVATE, (WPARAM)(UINT)(state), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnActivateApp(HWND hwnd, BOOL fActivate, HTASK htaskActDeact); */ +#define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HTASK)LOWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATEAPP(hwnd, fActivate, htaskActDeact, fn) \ + (void)(fn)((hwnd), WM_ACTIVATEAPP, (WPARAM)(BOOL)(fActivate), MAKELPARAM((htaskActDeact),0)) + +/* BOOL Cls_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_NCACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)) +#define FORWARD_WM_NCACTIVATE(hwnd, fActive, hwndActDeact, fMinimized, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCACTIVATE, (WPARAM)(BOOL)(fActive), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnSetFocus(HWND hwnd, HWND hwndOldFocus) */ +#define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_SETFOCUS(hwnd, hwndOldFocus, fn) \ + (void)(fn)((hwnd), WM_SETFOCUS, (WPARAM)(HWND)(hwndOldFocus), 0L) + +/* void Cls_OnKillFocus(HWND hwnd, HWND hwndNewFocus); */ +#define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_KILLFOCUS(hwnd, hwndNewFocus, fn) \ + (void)(fn)((hwnd), WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_CHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_DEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_DEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnSysDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSDEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSDEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MOUSEMOVE(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MOUSEMOVE, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnRButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_RBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnMButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMOUSEMOVE(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMOUSEMOVE, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCLBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCRBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* int Cls_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_MOUSEACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)) +#define FORWARD_WM_MOUSEACTIVATE(hwnd, hwndTopLevel, codeHitTest, msg, fn) \ + (int)(DWORD)(fn)((hwnd), WM_MOUSEACTIVATE, (WPARAM)(HWND)(hwndTopLevel), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnCancelMode(HWND hwnd); */ +#define HANDLE_WM_CANCELMODE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CANCELMODE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CANCELMODE, 0, 0L) + +/* void Cls_OnTimer(HWND hwnd, UINT id); */ +#define HANDLE_WM_TIMER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_TIMER(hwnd, id, fn) \ + (void)(fn)((hwnd), WM_TIMER, (WPARAM)(UINT)(id), 0L) + +/* void Cls_OnInitMenu(HWND hwnd, HMENU hMenu); */ +#define HANDLE_WM_INITMENU(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam)), 0L) +#define FORWARD_WM_INITMENU(hwnd, hMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENU, (WPARAM)(HMENU)(hMenu), 0L) + +/* void Cls_OnInitMenuPopup(HWND hwnd, HMENU hMenu, int item, BOOL fSystemMenu); */ +#define HANDLE_WM_INITMENUPOPUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam), (int)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_INITMENUPOPUP(hwnd, hMenu, item, fSystemMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENUPOPUP, (WPARAM)(HMENU)(hMenu), MAKELPARAM((item),(fSystemMenu))) + +/* void Cls_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags); */ +#define HANDLE_WM_MENUSELECT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)HIWORD(lParam), (LOWORD(lParam) & MF_POPUP) ? 0 : (int)(wParam), \ + (LOWORD(lParam) & MF_POPUP) ? (HMENU)(wParam) : 0, LOWORD(lParam)), 0L) +#define FORWARD_WM_MENUSELECT(hwnd, hmenu, item, hmenuPopup, flags, fn) \ + (void)(fn)((hwnd), WM_MENUSELECT, ((flags) & MF_POPUP) ? (WPARAM)(HMENU)(hmenuPopup) : (WPARAM)(int)(item), MAKELPARAM((flags), (hmenu))) + +/* DWORD Cls_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu); */ +#define HANDLE_WM_MENUCHAR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam), LOWORD(lParam), (HMENU)HIWORD(lParam)); +#define FORWARD_WM_MENUCHAR(hwnd, ch, flags, hmenu, fn) \ + (DWORD)(fn)((hwnd), WM_MENUCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((flags), (UINT)(hmenu))) + +/* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify); */ +#define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \ + (void)(fn)((hwnd), WM_COMMAND, (WPARAM)(int)(id), MAKELPARAM((UINT)(hwndCtl), (codeNotify))) + +/* void Cls_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnCut(HWND hwnd); */ +#define HANDLE_WM_CUT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CUT(hwnd, fn) \ + (void)(fn)((hwnd), WM_CUT, 0, 0L) + +/* void Cls_OnCopy(HWND hwnd); */ +#define HANDLE_WM_COPY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_COPY(hwnd, fn) \ + (void)(fn)((hwnd), WM_COPY, 0, 0L) + +/* void Cls_OnPaste(HWND hwnd); */ +#define HANDLE_WM_PASTE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PASTE(hwnd, fn) \ + (void)(fn)((hwnd), WM_PASTE, 0, 0L) + +/* void Cls_OnClear(HWND hwnd); */ +#define HANDLE_WM_CLEAR(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLEAR(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLEAR, 0, 0L) + +/* void Cls_OnUndo(HWND hwnd); */ +#define HANDLE_WM_UNDO(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_UNDO(hwnd, fn) \ + (void)(fn)((hwnd), WM_UNDO, 0, 0L) + +/* HANDLE Cls_OnRenderFormat(HWND hwnd, UINT fmt); */ +#define HANDLE_WM_RENDERFORMAT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HANDLE)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_RENDERFORMAT(hwnd, fmt, fn) \ + (HANDLE)(UINT)(DWORD)(fn)((hwnd), WM_RENDERFORMAT, (WPARAM)(UINT)(fmt), 0L) + +/* void Cls_OnRenderAllFormats(HWND hwnd); */ +#define HANDLE_WM_RENDERALLFORMATS(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_RENDERALLFORMATS(hwnd, fn) \ + (void)(fn)((hwnd), WM_RENDERALLFORMATS, 0, 0L) + +/* void Cls_OnDestroyClipboard(HWND hwnd); */ +#define HANDLE_WM_DESTROYCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROYCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROYCLIPBOARD, 0, 0L) + +/* void Cls_OnDrawClipboard(HWND hwnd); */ +#define HANDLE_WM_DRAWCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DRAWCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DRAWCLIPBOARD, 0, 0L) + +/* void Cls_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const PAINTSTRUCT FAR* lpPaintStruct) */ +#define HANDLE_WM_PAINTCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const PAINTSTRUCT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_PAINTCLIPBOARD(hwnd, hwndCBViewer, lpPaintStruct, fn) \ + (void)(fn)((hwnd), WM_PAINTCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lpPaintStruct)) + +/* void Cls_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const RECT FAR* lprc); */ +#define HANDLE_WM_SIZECLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const RECT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SIZECLIPBOARD(hwnd, hwndCBViewer, lprc, fn) \ + (void)(fn)((hwnd), WM_SIZECLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lprc)) + +/* void Cls_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_VSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_HSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnAskCBFormatName(HWND hwnd, int cchMax, LPSTR rgchName); */ +#define HANDLE_WM_ASKCBFORMATNAME(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (LPSTR)(lParam)), 0L) +#define FORWARD_WM_ASKCBFORMATNAME(hwnd, cchMax, rgchName, fn) \ + (void)(fn)((hwnd), WM_ASKCBFORMATNAME, (WPARAM)(int)(cchMax), (LPARAM)(rgchName)) + +/* void Cls_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext); */ +#define HANDLE_WM_CHANGECBCHAIN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHANGECBCHAIN(hwnd, hwndRemove, hwndNext, fn) \ + (void)(fn)((hwnd), WM_CHANGECBCHAIN, (WPARAM)(HWND)(hwndRemove), MAKELPARAM((UINT)(hwndNext), 0)) + +/* BOOL Cls_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_SETCURSOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); +#define FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_SETCURSOR, (WPARAM)(HWND)(hwndCursor), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnSysCommand(HWND hwnd, UINT cmd, int x, int y); */ +#define HANDLE_WM_SYSCOMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSCOMMAND(hwnd, cmd, x, y, fn) \ + (void)(fn)((hwnd), WM_SYSCOMMAND, (WPARAM)(UINT)(cmd), MAKELPARAM((x), (y))) + +/* HWND Cls_MDICreate(HWND hwnd, const MDICREATESTRUCT FAR* lpmcs); */ +#define HANDLE_WM_MDICREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (MDICREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_MDICREATE(hwnd, lpmcs, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDICREATE, 0, (LPARAM)(lpmcs)) + +/* void Cls_MDIDestroy(HWND hwnd, HWND hwndDestroy); */ +#define HANDLE_WM_MDIDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIDESTROY(hwnd, hwndDestroy, fn) \ + (void)(fn)((hwnd), WM_MDIDESTROY, (WPARAM)(hwndDestroy), 0L) + +/* NOTE: Usable only by MDI client windows */ +/* void Cls_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate); */ +#define HANDLE_WM_MDIACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (HWND)HIWORD(lParam)), 0L) +#define FORWARD_WM_MDIACTIVATE(hwnd, fActive, hwndActivate, hwndDeactivate, fn) \ + (void)(fn)(hwnd, WM_MDIACTIVATE, (WPARAM)(fActive), MAKELPARAM((hwndActivate), (hwndDeactivate))) + +/* void Cls_MDIRestore(HWND hwnd, HWND hwndRestore); */ +#define HANDLE_WM_MDIRESTORE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIRESTORE(hwnd, hwndRestore, fn) \ + (void)(fn)((hwnd), WM_MDIRESTORE, (WPARAM)(hwndRestore), 0L) + +/* HWND Cls_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev); */ +#define HANDLE_WM_MDINEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_MDINEXT(hwnd, hwndCur, fPrev, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDINEXT, (WPARAM)(hwndCur), MAKELPARAM((fPrev), 0)) + +/* void Cls_MDIMaximize(HWND hwnd, HWND hwndMaximize); */ +#define HANDLE_WM_MDIMAXIMIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIMAXIMIZE(hwnd, hwndMaximize, fn) \ + (void)(fn)((hwnd), WM_MDIMAXIMIZE, (WPARAM)(hwndMaximize), 0L) + +/* BOOL Cls_MDITile(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDITILE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDITILE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDITILE, (WPARAM)(cmd), 0L) + +/* BOOL Cls_MDICascade(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDICASCADE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDICASCADE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDICASCADE, (WPARAM)(cmd), 0L) + +/* void Cls_MDIIconArrange(HWND hwnd); */ +#define HANDLE_WM_MDIICONARRANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_MDIICONARRANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_MDIICONARRANGE, 0, 0L) + +/* HWND Cls_MDIGetActive(HWND hwnd); */ +#define HANDLE_WM_MDIGETACTIVE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_MDIGETACTIVE(hwnd, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDIGETACTIVE, 0, 0L) + +/* HMENU Cls_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow); */ +#define HANDLE_WM_MDISETMENU(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (HMENU)LOWORD(lParam), (HMENU)HIWORD(lParam)) +#define FORWARD_WM_MDISETMENU(hwnd, fRefresh, hmenuFrame, hmenuWindow, fn) \ + (HMENU)(UINT)(DWORD)(fn)((hwnd), WM_MDISETMENU, (WPARAM)(fRefresh), MAKELPARAM((hmenuFrame), (hmenuWindow))) + +/* void Cls_OnChildActivate(HWND hwnd); */ +#define HANDLE_WM_CHILDACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CHILDACTIVATE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CHILDACTIVATE, 0, 0L) + +/* BOOL Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam); */ +#define HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd), (HWND)(wParam), lParam); +#define FORWARD_WM_INITDIALOG(hwnd, hwndFocus, lParam, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_INITDIALOG, (WPARAM)(HWND)(hwndFocus), (lParam)) + +/* HWND Cls_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext) */ +#define HANDLE_WM_NEXTDLGCTL(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)) +#define FORWARD_WM_NEXTDLGCTL(hwnd, hwndSetFocus, fNext, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_NEXTDLGCTL, (WPARAM)(HWND)(hwndSetFocus), MAKELPARAM((fNext), 0)) + +/* void Cls_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild); */ +#define HANDLE_WM_PARENTNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_PARENTNOTIFY(hwnd, msg, hwndChild, idChild, fn) \ + (void)(fn)((hwnd), WM_PARENTNOTIFY, (WPARAM)(UINT)(msg), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(idChild))) + +/* void Cls_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource); */ +#define HANDLE_WM_ENTERIDLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_ENTERIDLE(hwnd, source, hwndSource, fn) \ + (void)(fn)((hwnd), WM_ENTERIDLE, (WPARAM)(UINT)(source), MAKELPARAM((UINT)(HWND)(hwndSource), 0)) + +/* UINT Cls_OnGetDlgCode(HWND hwnd, MSG FAR* lpmsg); */ +#define HANDLE_WM_GETDLGCODE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd, (MSG FAR*)(lParam)) +#define FORWARD_WM_GETDLGCODE(hwnd, lpmsg, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_GETDLGCODE, (SELECTOROF(lpmsg) ? lpmsg->wParam : 0), (LPARAM)(lpmsg)) + +/* HBRUSH Cls_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type); */ +#define HANDLE_WM_CTLCOLOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)LOWORD(lParam), (int)(HIWORD(lParam))) +#define FORWARD_WM_CTLCOLOR(hwnd, hdc, hwndChild, type, fn) \ + (HBRUSH)(UINT)(DWORD)(fn)((hwnd), WM_CTLCOLOR, (WPARAM)(HDC)(hdc), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(int)(type))) + +/* void Cls_OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw); */ +#define HANDLE_WM_SETFONT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HFONT)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SETFONT(hwnd, hfont, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETFONT, (WPARAM)(HFONT)(hfont), MAKELPARAM((UINT)(BOOL)(fRedraw), 0)) + +/* HFONT Cls_OnGetFont(HWND hwnd); */ +#define HANDLE_WM_GETFONT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HFONT)(fn)(hwnd) +#define FORWARD_WM_GETFONT(hwnd, fn) \ + (HFONT)(UINT)(DWORD)(fn)((hwnd), WM_GETFONT, 0, 0L) + +/* void Cls_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT FAR* lpDrawItem); */ +#define HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DRAWITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \ + (void)(fn)((hwnd), WM_DRAWITEM, 0, (LPARAM)(const DRAWITEMSTRUCT FAR*)(lpDrawItem)) + +/* void Cls_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT FAR* lpMeasureItem); */ +#define HANDLE_WM_MEASUREITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MEASUREITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_MEASUREITEM(hwnd, lpMeasureItem, fn) \ + (void)(fn)((hwnd), WM_MEASUREITEM, 0, (LPARAM)(MEASUREITEMSTRUCT FAR*)(lpMeasureItem)) + +/* void Cls_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT FAR* lpDeleteItem) */ +#define HANDLE_WM_DELETEITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DELETEITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DELETEITEM(hwnd, lpDeleteItem, fn) \ + (void)(fn)((hwnd), WM_DELETEITEM, 0, (LPARAM)(const DELETEITEMSTRUCT FAR*)(lpDeleteItem)) + +/* int Cls_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT FAR* lpCompareItem); */ +#define HANDLE_WM_COMPAREITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (const COMPAREITEMSTRUCT FAR*)(lParam)) +#define FORWARD_WM_COMPAREITEM(hwnd, lpCompareItem, fn) \ + (int)(DWORD)(fn)((hwnd), WM_COMPAREITEM, 0, (LPARAM)(const COMPAREITEMSTRUCT FAR*)(lpCompareItem)) + +/* int Cls_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_VKEYTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_VKEYTOITEM(hwnd, vk, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_VKEYTOITEM, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* int Cls_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_CHARTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_CHARTOITEM(hwnd, ch, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_CHARTOITEM, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* void Cls_OnQueueSync(HWND hwnd); */ +#define HANDLE_WM_QUEUESYNC(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_QUEUESYNC(hwnd, fn) \ + (void)(fn)((hwnd), WM_QUEUESYNC, 0, 0L) + +/* void Cls_OnCommNotify(HWND hwnd, int cid, UINT flags); */ +#define HANDLE_WM_COMMNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_COMMNOTIFY(hwnd, cid, flags, fn) \ + (void)(fn)((hwnd), WM_COMMNOTIFY, (WPARAM)(cid), MAKELPARAM((flags), 0)) + +/****** Static control message APIs ******************************************/ + +#define Static_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Static_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Static_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Static_SetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_SETICON, (WPARAM)(HICON)(hIcon), 0L)) +#define Static_GetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_GETICON, 0, 0L)) + +/****** Button control message APIs ******************************************/ + +#define Button_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Button_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Button_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETCHECK, 0, 0L)) +#define Button_SetCheck(hwndCtl, check) ((void)SendMessage((hwndCtl), BM_SETCHECK, (WPARAM)(int)(check), 0L)) + +#define Button_GetState(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETSTATE, 0, 0L)) +#define Button_SetState(hwndCtl, state) ((UINT)(DWORD)SendMessage((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L)) + +#define Button_SetStyle(hwndCtl, style, fRedraw) ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0))) + +/****** Edit control message APIs ********************************************/ + +#define Edit_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Edit_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Edit_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Edit_LimitText(hwndCtl, cchMax) ((void)SendMessage((hwndCtl), EM_LIMITTEXT, (WPARAM)(cchMax), 0L)) + +#define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINECOUNT, 0, 0L)) +#define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((int FAR*)(lpch)) = (cchMax)), ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPSTR)(lpch)))) + +#define Edit_GetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_GETRECT, 0, (LPARAM)(RECT FAR*)(lprc))) +#define Edit_SetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECT, 0, (LPARAM)(const RECT FAR*)(lprc))) +#define Edit_SetRectNoPaint(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECTNP, 0, (LPARAM)(const RECT FAR*)(lprc))) + +#define Edit_GetSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), EM_GETSEL, 0, 0L)) +#define Edit_SetSel(hwndCtl, ichStart, ichEnd) ((void)SendMessage((hwndCtl), EM_SETSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) +#define Edit_ReplaceSel(hwndCtl, lpszReplace) ((void)SendMessage((hwndCtl), EM_REPLACESEL, 0, (LPARAM)(LPCSTR)(lpszReplace))) + +#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_GETMODIFY, 0, 0L)) +#define Edit_SetModify(hwndCtl, fModified) ((void)SendMessage((hwndCtl), EM_SETMODIFY, (WPARAM)(UINT)(fModified), 0L)) + +#define Edit_LineFromChar(hwndCtl, ich) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEFROMCHAR, (WPARAM)(int)(ich), 0L)) +#define Edit_LineIndex(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEINDEX, (WPARAM)(int)(line), 0L)) +#define Edit_LineLength(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINELENGTH, (WPARAM)(int)(line), 0L)) + +#define Edit_Scroll(hwndCtl, dv, dh) ((void)SendMessage((hwndCtl), EM_LINESCROLL, 0, MAKELPARAM((dv), (dh)))) + +#define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_CANUNDO, 0, 0L)) +#define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_UNDO, 0, 0L)) +#define Edit_EmptyUndoBuffer(hwndCtl) ((void)SendMessage((hwndCtl), EM_EMPTYUNDOBUFFER, 0, 0L)) + +#define Edit_SetPasswordChar(hwndCtl, ch) ((void)SendMessage((hwndCtl), EM_SETPASSWORDCHAR, (WPARAM)(UINT)(ch), 0L)) + +#define Edit_SetTabStops(hwndCtl, cTabs, lpTabs) ((void)SendMessage((hwndCtl), EM_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(const int FAR*)(lpTabs))) + +#define Edit_FmtLines(hwndCtl, fAddEOL) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_FMTLINES, (WPARAM)(BOOL)(fAddEOL), 0L)) + +#define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl), EM_GETHANDLE, 0, 0L)) +#define Edit_SetHandle(hwndCtl, h) ((void)SendMessage((hwndCtl), EM_SETHANDLE, (WPARAM)(UINT)(HLOCAL)(h), 0L)) + +#if (WINVER >= 0x030a) +#define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETFIRSTVISIBLELINE, 0, 0L)) + +#define Edit_SetReadOnly(hwndCtl, fReadOnly) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_SETREADONLY, (WPARAM)(BOOL)(fReadOnly), 0L)) + +#define Edit_GetPasswordChar(hwndCtl) ((char)(DWORD)SendMessage((hwndCtl), EM_GETPASSWORDCHAR, 0, 0L)) + +#define Edit_SetWordBreakProc(hwndCtl, lpfnWordBreak) ((void)SendMessage((hwndCtl), EM_SETWORDBREAKPROC, 0, (LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak))) +#define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SendMessage((hwndCtl), EM_GETWORDBREAKPROC, 0, 0L)) +#endif /* WINVER >= 0x030a */ + +/****** ScrollBar control message APIs ***************************************/ + +/* NOTE: flags parameter is a collection of ESB_* values, NOT a boolean! */ +#define ScrollBar_Enable(hwndCtl, flags) EnableScrollBar((hwndCtl), SB_CTL, (flags)) + +#define ScrollBar_Show(hwndCtl, fShow) ShowWindow((hwndCtl), (fShow) ? SW_SHOWNORMAL : SW_HIDE) + +#define ScrollBar_SetPos(hwndCtl, pos, fRedraw) SetScrollPos((hwndCtl), SB_CTL, (pos), (fRedraw)) +#define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl), SB_CTL) + +#define ScrollBar_SetRange(hwndCtl, posMin, posMax, fRedraw) SetScrollRange((hwndCtl), SB_CTL, (posMin), (posMax), (fRedraw)) +#define ScrollBar_GetRange(hwndCtl, lpposMin, lpposMax) GetScrollRange((hwndCtl), SB_CTL, (lpposMin), (lpposMax)) + +/****** ListBox control message APIs *****************************************/ + +#define ListBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ListBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCOUNT, 0, 0L)) +#define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_RESETCONTENT, 0, 0L)) + +#define ListBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ListBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ListBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(data))) +#define ListBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ListBox_GetTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ListBox_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ListBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ListBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETSEL, (WPARAM)(BOOL)(fSelect), MAKELPARAM((index), 0))) +#define ListBox_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SendMessage((hwndCtl), LB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last)))) + +#define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCURSEL, 0, 0L)) +#define ListBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ListBox_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_GetSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSEL, (WPARAM)(int)(index), 0L)) +#define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0, 0L)) +#define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTOPINDEX, 0, 0L)) +#define ListBox_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int FAR*)(lpItems))) + +#define ListBox_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SendMessage((hwndCtl), LB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L)) + +#define ListBox_SetColumnWidth(hwndCtl, cxColumn) ((void)SendMessage((hwndCtl), LB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L)) +#define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0, 0L)) +#define ListBox_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SendMessage((hwndCtl), LB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L)) + +#define ListBox_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int FAR*)(lpTabs))) + +#define ListBox_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT FAR*)(lprc))) + +#define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L)) +#define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCARETINDEX, 0, 0L)) + + +#if (WINVER >= 0x030a) +#define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0))) +#define ListBox_GetItemHeight(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L)) +#endif /* WINVER >= 0x030a */ + +#define ListBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), LB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +/****** ComboBox control message APIs ****************************************/ + +#define ComboBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ComboBox_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define ComboBox_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define ComboBox_LimitText(hwndCtl, cchLimit) ((int)(DWORD)SendMessage((hwndCtl), CB_LIMITTEXT, (WPARAM)(int)(cchLimit), 0L)) + +#define ComboBox_GetEditSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), CB_GETEDITSEL, 0, 0L)) +#define ComboBox_SetEditSel(hwndCtl, ichStart, ichEnd) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEDITSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) + +#define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCOUNT, 0, 0L)) +#define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_RESETCONTENT, 0, 0L)) + +#define ComboBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ComboBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ComboBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(data))) +#define ComboBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetLBTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ComboBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), CB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ComboBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ComboBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCURSEL, 0, 0L)) +#define ComboBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ComboBox_SelectString(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszSelect))) +#define ComboBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), CB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +#define ComboBox_ShowDropdown(hwndCtl, fShow) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_SHOWDROPDOWN, (WPARAM)(BOOL)(fShow), 0L)) + +#if (WINVER >= 0x030a) +#define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_GETDROPPEDSTATE, 0, 0L)) +#define ComboBox_GetDroppedControlRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)(RECT FAR*)(lprc))) + +#define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETITEMHEIGHT, 0, 0L)) +#define ComboBox_SetItemHeight(hwndCtl, cyItem) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMHEIGHT, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SendMessage((hwndCtl), CB_GETEXTENDEDUI, 0, 0L)) +#define ComboBox_SetExtendedUI(hwndCtl, flags) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEXTENDEDUI, (WPARAM)(UINT)(flags), 0L)) +#endif /* WINVER >= 0x030a */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* !_INC_WINDOWSX */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/winmem32.h b/private/oleauto/tools/win16/hdos/c800/include/winmem32.h new file mode 100644 index 000000000..f07941c7a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/winmem32.h @@ -0,0 +1,32 @@ +/* + * Function protypes and general defines for WINMEM32 DLL + * Version 1.00 + * + * NOTE that WINDOWS.H must be included before this file. + * + */ + +/* + * + * The functions + * + */ +WORD FAR PASCAL GetWinMem32Version(void); +WORD FAR PASCAL Global32Alloc(DWORD, LPWORD, DWORD, WORD); +WORD FAR PASCAL Global32Realloc(WORD, DWORD, WORD); +WORD FAR PASCAL Global32Free(WORD, WORD); +WORD FAR PASCAL Global16PointerAlloc(WORD, DWORD, LPDWORD, DWORD, WORD); +WORD FAR PASCAL Global16PointerFree(WORD, DWORD, WORD); +WORD FAR PASCAL Global32CodeAlias(WORD, LPWORD, WORD); +WORD FAR PASCAL Global32CodeAliasFree(WORD, WORD, WORD); + +/* + * + * Error Codes + * + */ +#define WM32_Invalid_Func 0001 +#define WM32_Invalid_Flags 0002 +#define WM32_Invalid_Arg 0003 +#define WM32_Insufficient_Sels 0004 +#define WM32_Insufficient_Mem 0005 diff --git a/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm b/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm new file mode 100644 index 000000000..67db1564e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm @@ -0,0 +1,91 @@ + page ,132 + title libentry - Windows dynamic link library entry routine +;*** +;libentry.asm - Windows dynamic link library entry routine +; +; Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +; +;Purpose: +; +; This module generates a code segment called INIT_TEXT. +; It initialises the local heap if one exists and then calls +; the C routine LibMain() which should have the form: +; +; BOOL FAR PASCAL LibMain(HANDLE hModule, +; WORD wDataSeg, +; WORD cbHeap, +; LPSTR lpszCmdLine); +; +; The result of the call to LibMain is returned to Windows. +; LibMain should return TRUE if it completes initialisation +; successfully, FALSE if some error occurs. +; +; NOTES: +; +; (1) This module is not needed if you use the C 7.0 Win 3.x +; libraries; they perform this operation automatically. You may, +; however, need this module when using the "No C Runtime" build +; option. +; +; (2) The last parameter to LibMain is included for compatibility +; reasons. Applications that wish to modify this file and remove the +; parameter from LibMain may do so by simply removing the two +; "push" instructions below marked with "****". +; +;******************************************************************************* + + extrn LibMain:far ; the C routine to be called + extrn LocalInit:far ; Windows heap init routine + extrn __acrtused:abs ; Force in C segment definitions, etc. + + public LibEntry ; entry point for the DLL + +;INIT_TEXT segment byte public 'CODE' +; assume cs:INIT_TEXT +_TEXT segment byte public 'CODE' + assume cs:_TEXT + +LibEntry proc far + +ifndef _NOTWLO + ; Include the special startup code that makes WIN DLLs + ; compatible with WLO. This code MUST be the first sequence + ; in the DLL startup. + +; include convdll.inc +endif + + push di ; handle of the module instance + push ds ; library data segment + push cx ; heap size + push es ; **** command line ptr (always NULL) + push si ; **** + + ; if we have some heap then initialise it + jcxz callc ; jump if no heap specified + + ; call the Windows function LocalInit() to set up the heap + ; LocalInit((LPSTR)start, WORD cbHeap); + + push ds ; Heap segment + xor ax,ax + push ax ; Heap start offset in segment + push cx ; Heap end offset in segment + call LocalInit ; try to initialise it + or ax,ax ; did it do it ok ? + jz exit ; quit if it failed + + ; invoke the C routine to do any special initialisation + +callc: + call LibMain ; invoke the 'C' routine (result in AX) + +exit: + ret ; return the result + +LibEntry endp + +;INIT_TEXT ends +_TEXT ends + + end LibEntry diff --git a/private/oleauto/tools/win16/os2/bin/c1.err b/private/oleauto/tools/win16/os2/bin/c1.err new file mode 100644 index 000000000..27d7b71e0 --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/c1.err @@ -0,0 +1,1029 @@ + + + + +4001 "nonstandard extension '%Fs' was used" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "incorrect construction after 'defined'" +4005 "'%Fs' : macro redefinition" +4006 "#undef expected an identifier" +4007 "'%Fs' : must be '%Fs'" +4008 "'%Fs' : '%Fs' attribute ignored" +4009 "string too big; trailing characters truncated" +4010 "single-line comment contains line-continuation character" +4011 "'%Fs' : identifier was truncated to '%d' characters" +4012 "float constant in a cross compilation" +4013 "'%Fs' undefined; assuming extern returning int" +4014 "concatenating mismatched wide strings" +4015 "'%Fs' : type of bit field must be integral" +4016 "'%s' : no function return type; using 'int' as default" +4017 "cast of 'int' expression to far pointer" +4018 "'%Fs' : signed/unsigned mismatch" +4019 "empty statement at global scope" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch for actual parameter %d" +4023 "'%Fs' : based pointer passed to unprototyped function : parameter %d" +4024 "'%Fs' : different types for formal and actual parameter %d" +4025 "'%Fs' : based pointer passed to function with variable arguments: parameter %d" +4026 "function declared with formal parameter list" +4027 "function declared without formal parameter list" +4028 "formal parameter %d different from declaration" +4029 "declared formal parameter list different from definition" +4030 "first formal parameter list longer than the second list" +4031 "second formal parameter list longer than the first list" +4032 "formal parameter %d has different type when promoted" +4033 "'%Fs' must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unnamed %Fs as actual parameter" +4037 "conflicting ambient class modifiers" +4038 "'%Fs' : illegal ambient class modifier" +4039 "ambient class modifier on reference ignored" +4040 "memory attribute on '%Fs' ignored" +4041 "illegal modifier for 'this' pointer" +4042 "'%Fs' : has bad storage class" +4043 "function specifier used more than once" +4044 "specifier __huge on '%Fs' ignored; can only be applied to array" +4045 "'%Fs' : array bounds overflow" +4046 "'%Fs' : unsized array treated as %Fs" +4047 "'%Fs' : different levels of indirection" +4048 "different declared array subscripts" +4049 "'%Fs' : indirection to different types" +4050 "'%Fs' : different code attributes" +4051 "type conversion; possible loss of data" +4052 "function declarations different; one contains variable arguments" +4053 "one void operand for '?:'" +4054 "function pointer cast to a data pointer" +4055 "data pointer cast to a function pointer" +4056 "overflow in floating point constant arithmetic" +4057 "'%Fs' : indirection to slightly different base types" +4058 "unions are now aligned on alignment requirement, not size" + +4067 "unexpected characters following '%Fs' directive - newline expected" +4068 "unknown pragma" + +4070 "return of a 'void' expression" +4071 "'%Fs' : no function prototype given" +4072 "'%Fs' : no function prototype on __fastcall function" +4073 "initializers put in library initialization area" +4074 "initializers put in compiler reserved initialization area" +4075 "initializers put in unrecognized initialization area" +4076 "'%Fs' : may be used on integral types only" +4077 "unknown check_stack option" +4078 "case constant '%ld' too big for the type of the switch expression" +4079 "unexpected token '%Fs'" +4080 "expected identifier for segment name; found '%Fs'" +4081 "expected a comma; found '%Fs'" +4082 "expected an identifier; found '%Fs'" +4083 "expected '('; found '%Fs'" +4084 "expected a pragma directive; found '%Fs'" +4085 "expected 'on' or 'off'" +4086 "expected '1', '2', '4', or '8'" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch in actual parameter %d, formal parameter %d" +4089 "'%Fs' : different types in actual parameter %d, formal parameter %d" +4090 "'%Fs' : different const or volatile qualifiers" +4091 "no symbols were declared" +4092 "sizeof returns 'unsigned long'" +4093 "unescaped newline in character constant in inactive code" +4094 "untagged '%Fs' declared no symbols" +4095 "expected ')'; found '%Fs'" +4096 "'%Fs' must be used with '%Fs'" +4097 "nonstandard extension : typedef-name '%Fs' used as synonym for class-name '%Fs'" +4098 "'%Fs' : 'void' function returning a value" +4099 "type declared with '%Fs' is defined with '%Fs'" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : used #pragma pack to change alignment" +4104 "'%Fs' : near data in same_seg pragma; ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires an integer between 1 and 127" +4107 "pragma requires an integer between 15 and 255" +4108 "pragma requires an integer between 79 and 132" +4109 "unexpected identifier '%Fs'" +4110 "unexpected token 'number'" +4111 "unexpected token 'string'" +4112 "#line requires an integer between 1 and 32767" +4113 "function parameter lists differed" +4114 "same type qualifier used more than once" +4115 "'%Fs' : named type definition in parentheses" +4116 "unnamed type definition in parentheses" +4117 "macro name '%Fs' is reserved, '%Fs' ignored" +4118 "pragma not supported" +4119 "different bases '%Fs' and '%Fs' specified" +4120 "based/unbased mismatch" +4121 "'%Fs' : alignment of a member was sensitive to packing" +4122 "'%Fs' : alloc_text applicable only to functions with C linkage" +4123 "different base expressions specified" +4124 "__fastcall with stack checking is inefficient" +4125 "decimal digit terminates octal escape sequence" +4126 "'%c' : unknown memory-model command-line option" +4127 "conditional expression is constant" +4128 "storage-class specifier after type" +4129 "'%c' : unrecognized character escape sequence" +4130 "'%Fs' : logical operation on address of string constant" +4131 "'%Fs' : uses old-style declarator" +4132 "'%Fs' : const object should be initialized" +4133 "'%Fs' : incompatible types - 'void' pointer combined with non-'void' pointer" +4134 "conversion between pointers to members of same class" +4135 "conversion between different integral types" +4136 "conversion between different floating-point types" +4137 "'%Fs' : no return value from floating-point function" +4138 "'*/' found outside of comment" +4139 "'0x%lx' : hex escape sequence is out of range" +4140 "'%Fs' : redefined, preceding references may be invalid" +4141 "'%Fs' : used more than once" +4142 "benign redefinition of type" +4143 "pragma 'same_seg' not supported; use __based allocation" +4144 "'%Fs' : relational expression as switch expression" +4145 "'%Fs' : relational expression as switch expression; possible confusion with '%Fs'" + +4146 "unary minus operator applied to unsigned type, result still unsigned" +4147 "'%Fs' : '%Fs' ignored on pointer and reference declarations" +4148 "'%Fs' : DS != SS for '__near' '%Fs'" +4149 "'%Fs' : different ambient model than base class '%Fs'" +4150 "deletion of pointer to incomplete type '%Fs'; no destructor called" +4151 "'%Fs' : operator should be explicitly '%Fs'" +4152 "non standard extension, function/data ptr conversion in expression" +4153 "function/data ptr conversion in expression" +4154 "deletion of an array expression; conversion to pointer supplied" +4155 "deletion of an array expression without using the array form of 'delete'" +4156 "deletion of an array expression without using the array form of 'delete'; array form substituted" + +4184 "near call to thunk for '%Fs' in a different segment" + +4241 "'%Fs' : member access is restricted" + +4245 "'friend' specified for nonexistent function '%Fs'" + +4247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +4248 "'%Fs' : cannot access '%Fs' member declared in class '%Fs'" +4249 "'%Fs' : no path to '%Fs' member declared in virtual base '%Fs'" +4250 "'%Fs' : inherits '%Fs::%Fs' via dominance" +4251 "'%Fs' : base type '%Fs' should be exported to export %Fs '%Fs'" +4252 "'%Fs' is not defined; cannot specify CV information." + +4260 "no override, '%Fs::%Fs' has %Fs 'this' memory model whereas '%Fs::%Fs' has %Fs 'this' memory model" +4261 "no override, '%Fs::%Fs' has %Fs calling convention whereas '%Fs::%Fs' has %Fs calling convention" + +4300 "conversion of pointer to nonintegral type" +4301 "truncation during conversion of pointer to integral type" +4302 "truncation during conversion of pointer to function" +4303 "truncation during conversion of pointer to function to pointer to object" +4304 "truncation during pointer conversion" +4305 "truncation during conversion of integral type to pointer" +4306 "conversion of integral type to pointer of greater size" +4307 "'%Fs' : integral constant overflow; result truncated" +4308 "negative integral constant converted to unsigned type" +4309 "'%Fs' : truncation of constant value" + +4341 "signed value out of range for enum constant" +4342 "precision lost in initialization of enum constant" + +4354 "'%Fs' : initialization of reference to member requires a temporary variable" +4355 "'this' : used in base member initializer list" + +4385 "%Fs the '%Fs' in base '%Fs'" +4386 "%Fs to the '%Fs' in base '%Fs'" + +4401 "'%Fs' : member is bit field" +4402 "must use PTR operator" +4403 "illegal PTR operator" +4404 "period on directive ignored" +4405 "'%Fs' : identifier is reserved word" +4406 "operand on directive ignored" + +4409 "illegal instruction size" +4410 "illegal size for operand" +4411 "'%Fs' : symbol resolves to displacement register" + +4414 "'%Fs' : short jump to function converted to near" + +4500 "'%Fs' : class has private/protected data members; user-defined constructor advised" +4501 "'%Fs' : use of '::' unnecessary here" +4502 "'linkage' requires use of keyword 'extern'" + +4505 "'%Fs' : unreferenced local function has been removed" +4506 "no definition for inline function '%Fs'" +4507 "explicit linkage specified after default linkage was used" +4508 "'%Fs' : function should return a value; 'void' return type assumed" + +4510 "'%Fs' : default constructor could not be generated" +4511 "'%Fs' : copy constructor could not be generated" +4512 "'%Fs' : assignment operator could not be generated" +4513 "'%Fs' : destructor could not be generated" + +4520 "'%Fs' : multiple default constructors specified" +4521 "'%Fs' : multiple copy constructors specified" +4522 "'%Fs' : multiple assignment operators specified" +4523 "'%Fs' : multiple destructors specified" +4524 "'%Fs' : redundant use of 'friend' on destructor" +4525 "'%Fs' : redundant use of 'friend' on constructor" + +4527 "instances of %Fs '%Fs' can never be destroyed - user-defined destructor required" +4528 "illegal 'pure' syntax, must be '= 0'" + +4607 "'%Fs' : must be initialized in constructor base/member initializer list" + +4610 "%Fs '%Fs' can never be instantiated - user defined constructor required" + +4612 "bad #pragma syntax, pragma ignored" +4613 "'%Fs' : class of segment cannot be changed" +4614 "'%Fs' : varargs parameters with this type were promoted" +4615 "#pragma warning : unknown user warning type" +4616 "#pragma warning : warning number '%d' out of range, must be between '%d' and '%d'" +4617 "#pragma warning : invalid warning number" + +4620 "no postfix form of 'operator ++' found for type '%Fs', using prefix form" +4621 "no postfix form of 'operator --' found for type '%Fs', using prefix form" +4622 "Overwriting debug information formed during creation of the precompiled header in object file: '%s'" + +4630 "'%Fs' : '%Fs' storage class specifier illegal on member definition" + +4650 "debugging information not in precompiled header; only global symbols from the header will be available" +4651 "'/D%s' specified for precompiled header but not for current compile" +4652 "command-line option '%Fs' inconsistant with precompiled header; PCH option ignored" + +4706 "assignment within conditional expression" + +4710 "'%Fs' : function not expanded" + +4726 "'%c' : unknown memory model command-line option" +4727 "conditional expression is constant" + +4741 "/Oq option ignored for __fastcall function '%Fs'" + +4746 "'%Fs' : unsized array given size %Fs" + +4756 "overflow in constant arithmetic" + +4758 "address of automatic (local) variable taken, DS != SS" +4759 "segment lost in conversion" + +4761 "integral size mismatch in argument : conversion supplied" +4762 "near/far mismatch in argument : conversion supplied" + +4769 "conversion of near pointer to long integer" + +4785 "near call to '%Fs' in different segment" + +4788 "'%Fs' : identifier was truncated to '%d' characters" + +4793 "native code generated for p-code function '%Fs' with inline assembly" + +4900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" + + + + + + + + + + + + + + + + + + + + + + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" + + +2001 "newline in constant" +2002 "invalid wide-character constant" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%Fs'" +2006 "#include expected a file name, found '%Fs'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%Fs'" +2010 "'%c' : unexpected in macro formal parameter list" +2011 "'%Fs' : '%Fs' type redefinition" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first nonwhite space" +2015 "too many characters in constant" +2016 "no closing single quotation mark" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor directive, found '%c'" +2020 "'%Fs' : '%Fs' member redefinition" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for character" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" +2026 "string too big, trailing characters truncated" +2027 "use of undefined type '%Fs'" +2028 "struct/union member must be inside a struct/union" +2029 "left of '%s' specifies undefined class/struct/union '%Fs'" +2030 "'%Fs' : struct/union member redefinition" +2031 "'%Fs' : function cannot be struct/union member" +2032 "'%Fs' : function cannot be member of %Fs '%Fs'" +2033 "'%Fs' : bit field cannot have indirection" +2034 "'%Fs' : type of bit field too small for number of bits" +2035 "struct/union '%Fs' : unknown size" +2036 "'%Fs' : unknown size" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" +2039 "'%Fs' : is not a member of '%Fs'" +2040 "'%Fs' : different levels of indirection" +2041 "illegal digit '%c' for base '%d'" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%Fs' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2049 "case value '%ld' already used" +2050 "nonintegral switch expression" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "'%Fs' : wide string mismatch" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%Fs'" +2060 "syntax error : end-of-file found" +2061 "syntax error : identifier '%Fs'" +2062 "type '%Fs' unexpected" +2063 "'%Fs' : not a function" +2064 "term does not evaluate to a function" +2065 "'%Fs' : undeclared identifier" +2066 "cast to function type is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast" +2069 "cast of 'void' term to non-'void'" +2070 "illegal sizeof operand" +2071 "'%Fs' : illegal storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : partially initialized array requires a default constructor" +2074 "'%Fs' : '%Fs' initialization needs curly braces" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" +2077 "nonscalar field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined class/struct/union '%Fs'" +2080 "illegal __far __fastcall function or __saveregs function" +2081 "'%Fs' : name in formal parameter list illegal" +2082 "redefinition of formal parameter '%Fs'" +2083 "%Fs comparison illegal" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "'%Fs' : illegal for %Fs" +2089 "'%Fs' : '%Fs' too large" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "cannot use address of automatic variable as static initializer" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual has type 'void' : parameter %d" +2096 "struct/union comparison illegal" +2097 "illegal initialization" +2098 "nonaddress expression" +2099 "nonconstant initializer" +2100 "illegal indirection" +2101 "'%Fs' on constant" +2102 "'%Fs' requires lvalue" +2103 "'%Fs' on register variable" +2104 "'%Fs' on bit field ignored" +2105 "'%Fs' needs lvalue" +2106 "'%Fs' : left operand must be lvalue" +2107 "illegal index, indirection not allowed" +2108 "nonintegral index" +2109 "subscript on nonarray" +2110 "pointer + pointer" +2111 "pointer + nonintegral value" +2112 "illegal pointer subtraction" +2113 "pointer subtracted from nonpointer" +2114 "'%Fs' : pointer on left; needs integral value on right" +2115 "'%Fs' : incompatible types" +2116 "function parameter lists differed" +2117 "'%Fs' : array bounds overflow" +2118 "negative subscript" +2119 "typedef types both define indirection" +2120 "'void' illegal with all types" +2121 "'%Fs' : bad %Fs operand" +2122 "'%Fs' : prototype parameter in name list illegal" +2123 "'%Fs' : cannot call __fastcall function '%Fs' from p-code" +2124 "divide or mod by zero" +2125 "'%Fs' : allocation exceeds 64K" +2126 "'%Fs' : incorrect operand" +2127 "parameter allocation exceeds 32K" +2128 "'%Fs' : alloc_text/same_seg applicable only to functions with C linkage" +2129 "static function '%Fs' declared but not defined" +2130 "#line expected a string containing the file name, found '%Fs'" +2131 "more than one memory attribute" +2132 "syntax error : unexpected identifier" +2133 "'%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" +2135 "'%Fs' : illegal bit field operation" +2136 "'%Fs' : prototype must have parameter types" +2137 "empty character constant" +2138 "illegal to define an enumeration without any members" +2139 "type following '%s' is illegal" +2140 "parameter cannot be function type" +2141 "value out of range for enum constant" +2142 "function declarations differ, variable parameters specified only in one of them" +2143 "syntax error : missing '%Fs' before '%Fs'" +2144 "syntax error : missing '%Fs' before type '%Fs'" +2145 "syntax error : missing '%Fs' before identifier" +2146 "syntax error : missing '%Fs' before identifier '%Fs'" +2147 "'%Fs' : const array must be fully initialized" +2148 "array too large" +2149 "'%Fs' : named bit field cannot have zero width" +2150 "'%Fs' : bit field must have type 'int', 'signed int', or 'unsigned int'" +2151 "more than one language attribute" +2152 "'%Fs' : pointers to functions with different attributes" +2153 "hex constants must have at least one hex digit" +2154 "'%Fs' : does not refer to a segment name" + +2156 "pragma must be outside function" +2157 "'%Fs' : must be declared before use in pragma list" +2158 "'%Fs' : is a function" +2159 "more than one storage class specified" +2160 "## cannot occur at the beginning of a macro definition" +2161 "## cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%Fs' : not available as an intrinsic function" +2164 "'%Fs' : intrinsic function not declared" +2165 "'%Fs' : cannot modify pointers to data" +2166 "lvalue specifies const object" +2167 "'%Fs' : too many actual parameters for intrinsic function" +2168 "'%Fs' : too few actual parameters for intrinsic function" +2169 "'%Fs' : intrinsic function, cannot be defined" +2170 "'%Fs' : not declared as a function, cannot be intrinsic" +2171 "'%Fs' : illegal operand" +2172 "'%Fs' : actual parameter is not a pointer : parameter %d" +2173 "'%Fs' : actual parameter is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual parameter has type 'void' : parameter %d, parameter list %d" + +2176 "static huge data not supported by '%Fs'" +2177 "constant too big" +2178 "'%Fs' : storage class for same_seg variables must be extern" +2179 "'%Fs' : was used in same_seg, but storage class is no longer extern" +2180 "controlling expression has type 'void'" + +2182 "'%Fs' : has type 'void'" + +2184 "illegal return of a 'void' value" +2185 "'%Fs' : illegal based allocation" +2186 "'%Fs' : illegal operand of type 'void'" +2187 "cast of near function pointer to far function pointer" +2188 "'%ld' : too big for wide character" +2189 "#error : %Fs" +2190 "first parameter list longer than second" +2191 "second parameter list longer than first" +2192 "parameter '%d' declaration different" +2193 "'%Fs' : already in a segment" +2194 "'%Fs' : is a text segment" +2195 "'%Fs' : is a data segment" +2197 "'%Fs' : too many actual parameters" +2198 "'%Fs' : too few actual parameters" +2199 "syntax error : found '%Fs (' at global scope. (was a declaration intended?)" +2200 "'%Fs' : function has already been defined" +2201 "'%Fs' : cannot export static declarations" +2202 "'%Fs' : not all control paths return a value" +2203 "delete operator cannot specify bounds for an array" +2204 "'%Fs' : parenthesized type definition" +2205 "'%Fs' : cannot initialize extern block scoped variables" +2206 "'%Fs' : typedef cannot be used for function definition" +2207 "'%Fs' in struct/union '%Fs' has a zero-sized array" +2208 "'%Fs' : no members defined using this type" +2209 "type cast in __based construct must be (__segment)" +2210 "'%Fs' : must be near/far data pointer" +2211 "(__segment) applied to function identifier '%Fs'" +2212 "'%Fs' : __based not available for pointers to functions" +2213 "'%Fs' : illegal argument to __based" +2214 "pointers based on 'void' require the use of :>" +2215 ":> operator only for objects based on 'void'" +2216 "'%Fs' cannot be used with '%Fs'" +2217 "'%Fs' must be used with '%Fs'" +2218 "type in __based construct must be 'void'" +2219 "syntax error : type qualifier must be after '*'" +2220 "warning treated as error - no object file generated" +2221 "'.' : left operand points to class/struct/union, use '->'" +2222 "'->' : left operand has struct/union type, use '.'" +2223 "left of '->%Fs' must point to class/struct/union" +2224 "left of '.%Fs' must have class/struct/union type" +2225 "'%Fs' : function allocation must be in a named segment" +2226 "syntax error : unexpected type '%Fs'" +2227 "left of '->%Fs' must point to class/struct/union" +2228 "left of '.%Fs' must have class/struct/union type" +2229 "%Fs '%Fs' has an illegal zero-sized array" +2230 "'%Fs' : indirection to different types" +2231 "'.' : left operand points to '%Fs', use '->'" +2232 "'->' : left operand has '%Fs' type, use '.'" + +2234 "arrays of references are illegal" +2235 "';' in formal parameter list" +2236 "unexpected '%Fs' '%Fs'" +2237 "unexpected %Fs '%Fs'" +2238 "unexpected token[s] preceding '%s'" +2239 "unexpected token '%Fs' following declaration of '%Fs'" +2240 "unexpected '%Fs' following formal list. (only modifiers are allowed.)" +2241 "'%Fs' : member access is restricted" + +2244 "'%Fs' : unable to resolve function overload" +2245 "nonexistent function '%Fs' specified as friend" +2246 "'%Fs' : illegal static data member in locally defined class" +2247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +2248 "'%Fs' : cannot access '%Fs' member declared in class '%Fs'" +2249 "'%Fs' : no accessible path to '%Fs' member declared in virtual base '%Fs'" +2250 "'%Fs' : ambiguous inheritance of '%Fs::%Fs'" + +2252 "'%Fs' : pure specifier can only be specified for functions" +2253 "'%Fs' : pure specifier only applies to virtual function -- specifier ignored" +2254 "'%Fs' : pure specifier not allowed on friend functions" +2255 "'%Fs' : a friend function can only be declared in a class" +2256 "illegal use of friend specifier on '%Fs'" +2257 "p-code generation pragma not allowed without /Oq" +2258 "illegal pure syntax, must be '= 0'" +2259 "'%Fs' : illegal attempt to instantiate abstract class" +2260 "function pointer cast to a data pointer " +2261 "data pointer cast to a function pointer" +2262 "'%Fs' : cannot be destroyed" +2263 "function returns pointer based on __self" +2264 "'%Fs' : error in function definition or declaration; function not called" +2265 "'%Fs' : reference to a zero sized array is illegal" +2266 "'%Fs' : reference to a nonconstant bounded array is illegal" +2267 "'%Fs' : block scoped static functions are illegal" +2268 "'%Fs' : different const or volatile qualifiers" +2269 "'%Fs' : different ambient model than base class '%Fs'" +2270 "'%Fs' : modifiers not allowed on nonmember functions" +2271 "'%Fs' : new/delete cannot have formal list modifiers" +2272 "'%Fs' : modifiers not allowed on static member functions" +2273 "'%Fs' : illegal as right side of '->' operator" +2274 "'%Fs' : illegal as right side of '.' operator" +2275 "'%Fs' : illegal use of this type as an expression" +2276 "illegal address of bound member function expression" +2277 "'%Fs' : cannot take the address of a constructor" +2278 "'%Fs' : no function with C linkage found" +2279 "cannot use braces to initialize default arguments" +2280 "missing '{' before identifier '%Fs'?" +2281 "'%Fs' : is not a function, but contains <function returning>. '%Fs' is unexpected." +2282 "'%Fs' is followed by '%Fs'. (missing ','?)" +2283 "'%Fs' : pure specifier not allowed on un-named %Fs" + +2290 "C++ '%Fs' syntax is reserved for future use" + +2350 "'%Fs' is not a static member" +2351 "obsolete C++ constructor initialization syntax" +2352 "'%Fs::%Fs' : illegal call of non-static member function" +2353 "'%Fs' : improper use of constructor initializers" +2354 "'%Fs' : initialization of reference member requires a temporary variable" +2355 "'this' : can only be referenced inside non-static member functions" +2356 "initialization segment must not change during translation unit" + +2360 "Initialization of '%Fs' is skipped by 'case' label" +2361 "Initialization of '%Fs' is skipped by 'default' label" +2362 "Initialization of '%Fs' is skipped by 'goto %Fs'" + +2370 "'%Fs' : redefinition; different storage class" +2371 "'%Fs' : redefinition; different basic types" +2372 "'%Fs' : redefinition; different types of indirection" +2373 "'%Fs' : redefinition; different type modifiers" +2374 "'%Fs' : redefinition; multiple initialization" +2375 "'%Fs' : redefinition; different linkage" + +2377 "'%Fs' : redefinition; typedef cannot be overloaded with any other symbol" +2378 "'%Fs' : redefinition; symbol cannot be overloaded with a typedef" +2379 "formal parameter %d has different type when promoted" +2380 "type[s] preceding '%Fs'. (constructor with return type, or illegal redefinition of current class-name?)" + +2385 "'%Fs::%Fs' is ambiguous" +2386 "ambiguous conversion from '%Fs*' to '%Fs*'" +2387 "ambiguous conversion from '%Fs&' to '%Fs&'" + +2390 "'%Fs' : incorrect storage class '%Fs'" + +2400 "inline syntax error in '%Fs'; found '%Fs'" +2401 "'%Fs' : register must be base in '%Fs'" +2402 "'%Fs' : register must be index in '%Fs'" +2403 "'%Fs' : register must be base/index in '%Fs'" +2404 "'%Fs' : illegal register in '%Fs'" +2405 "illegal short forward reference with offset" +2406 "'%Fs' : name undefined in '%Fs'" +2407 "illegal 'float' register in '%Fs'" +2408 "illegal type on PTR operator in '%Fs'" +2409 "illegal type used as operator in '%s'" +2410 "'%Fs' : ambiguous member name in '%Fs'" +2411 "'%Fs' : illegal struct/union member in '%Fs'" +2412 "'%Fs' : case-insensitive label redefined" +2413 "'%Fs' : illegal align size" +2414 "illegal number of operands" +2415 "improper operand type" +2416 "'%Fs' : illegal opcode for processor" +2417 "divide by zero in '%Fs'" +2418 "'%Fs' : not in a register" +2419 "mod by zero in '%Fs'" +2420 "'%Fs' : illegal symbol in %Fs" +2421 "PTR operator used with register in '%Fs'" +2422 "illegal segment override in '%Fs'" +2423 "'%ld' : illegal scale" +2424 "'%Fs' : improper expression in '%Fs'" +2425 "'%Fs' : nonconstant expression in '%Fs'" +2426 "'%Fs' : illegal operator in '%Fs'" +2427 "'%Fs' : jump referencing label is out of range" + +2429 "'%Fs' : illegal far label reference" +2430 "more than one index register in '%Fs'" +2431 "illegal index register in '%Fs'" +2432 "illegal reference to 16-bit data in '%Fs'" +2433 "'%Fs' : '%Fs' not permitted on data declarations" +2434 "'%Fs' : cannot convert default argument from '%Fs' to '%Fs'" + +2436 "'%Fs' : cannot initialize member functions" +2437 "'%Fs' : already initialized" +2438 "'%Fs' : cannot initialize static class data via constructor" +2439 "'%Fs' : member could not be initialized" +2440 "'%Fs' : cannot convert from '%Fs' to '%Fs'" + +2442 "p-code expression too complex for setjmp or Catch" +2443 "operand size conflict" + +2446 "'%Fs' : no conversion between '%Fs' and '%Fs'" +2447 "missing function header (old-style formal list?)" +2448 "'%Fs' : function-style initializer appears to be a function definition" + +2450 "switch expression of type '%Fs' is illegal" +2451 "conditional expression of type '%Fs' is illegal" + +2458 "'%Fs' : redefinition within definition" +2459 "'%Fs' : is being defined; cannot add as an anonymous member" +2460 "'%Fs' : uses '%Fs', which is being defined" +2461 "'%Fs' : constructor syntax missing formal parameters" +2462 "'%Fs' : cannot define a type in a 'new-expression'" +2463 "cannot define an anonymous type in a 'new-expression'" +2464 "'%Fs' : cannot use 'new' to allocate a reference" +2465 "cannot define an anonymous type inside parentheses" +2466 "cannot allocate an array of constant size 0" +2467 "illegal declaration of anonymous '%Fs'" + +2500 "'%Fs' : '%Fs' is already a direct base class" +2501 "'%Fs' : missing decl-specifiers" +2502 "'%Fs' : too many access modifiers on the base class" +2503 "'%Fs' : base classes cannot contain zero-sized arrays" +2504 "'%Fs' : base class undefined" +2505 "'%Fs' : is not a legal base class" +2506 "'%Fs::%Fs' : ambiguous" +2507 "'%Fs' : too many virtual modifiers on the base class" +2508 "'%Fs' : access denied" +2509 "'%Fs' : member function not declared in '%Fs'" +2510 "'%Fs' : left of '::' must be a class/struct/union" +2511 "'%Fs' : overloaded member function not found in '%Fs'" +2512 "'%Fs' : no appropriate default constructor available" +2513 "'%Fs' : decl-specifier is missing a declarator before '='" +2514 "'%Fs' : class has no constructors" +2515 "'%Fs' : not in class '%Fs'" + +2517 "'%Fs' : right of '::' is undefined" + +2519 "cannot convert '%Fs *' to '%Fs *'" + +2523 "'%Fs::~%Fs' : destructor tag mismatch" +2524 "'%Fs' : destructors must have a 'void' formal parameter list" + +2527 "'%Fs' : array of references must be fully initialized" +2528 "illegal pointer to reference" +2529 "illegal reference to a reference" +2530 "'%Fs' : references must be initialized" +2531 "'%Fs' : reference to a bit field illegal" +2532 "'%s' : cannot modify references" +2533 "'%Fs' : constructors not allowed a return type" +2534 "'%Fs' : constructor cannot return a value" +2535 "'%Fs' : member function already defined or declared" +2536 "'%Fs::%Fs' : cannot specify explicit initializer for arrays" +2537 "'%Fs' : illegal linkage specification" +2538 "new : cannot specify initializer for arrays" +2539 "new : '%Fs' no default constructor to initialize arrays of objects" +2540 "nonconstant expression as array bound" +2541 "delete : cannot delete nonpointer objects" +2542 "'%Fs' : class object has no constructor for initialization" +2543 "expected ']' for operator '[]'" +2544 "expected ')' for operator '()'" +2545 "'%Fs' : unable to find overloaded operator" +2546 "'%Fs' : illegal mix of 'void' pointer with non-'void' pointer" +2547 "illegal cast of overloaded function" +2548 "'%Fs::%Fs' : missing default parameter for parameter %s" +2549 "user-defined conversion cannot specify a return type" + +2551 "'void *' type needs explicit cast to non-'void' pointer type" +2552 "'%Fs' : non-aggregates cannot be initialized with initializer list" +2553 "no legal conversion of return value to return type '%Fs'" +2555 "'%Fs::%Fs' : overriding virtual function differs from '%Fs::%Fs' only by return type" +2556 "'%Fs' : overloaded functions only differ by return type" +2557 "'%Fs' : non-public members cannot be initialized without a constructor" +2558 "'%Fs' : no copy constructor available" +2559 "'%Fs' : no match for specified operator" +2560 "'%Fs' : overloaded function differs only by calling convention/memory model" +2561 "'%Fs' : function must return a value" +2562 "'%Fs' : 'void' function returning a value" +2563 "mismatch in formal parameter list" +2564 "formal/actual parameters mismatch in call through pointer to function" +2565 "'::%Fs' was previously declared as a global function" +2566 "overloaded function in conditional expression" + +2568 "'%Fs' : unable to resolve function overload '%Fs'" +2569 "'%Fs' : union cannot be used as a base class" +2570 "'%Fs' : union cannot have base classes" +2571 "'%Fs' : union cannot have virtual function '%Fs'" +2572 "'%Fs::%Fs' : redefinition of default parameter : parameter %s" +2573 "'%Fs' : simple type cast must have exactly one expression" +2574 "'%Fs' : illegal static destructor declaration" +2575 "'%Fs' : only member functions and bases can be virtual" +2576 "'%Fs' : virtual used for static member function" +2577 "'%Fs' : destructor cannot return a value" + +2579 "'%Fs::%Fs(%s)' : parameter list not sufficiently different to '%Fs::%Fs(%s)'" +2580 "redefinition of class name '%Fs'" +2581 "'%Fs' : static 'operator =' function is illegal" +2582 "'%Fs' : 'operator =' function is unavailable" +2583 "'%Fs' : illegal const/volatile 'this' pointer used for constructors/destructors" +2584 "'%Fs' : direct base '%Fs' is inaccessible; already a base of '%Fs'" +2585 "explicit conversion to '%Fs' is ambiguous" +2586 "incorrect user-defined conversion syntax : illegal indirections" +2587 "'%Fs' : illegal use of local variable as default parameter" +2588 "'::~%Fs' : illegal global destructor" +2589 "'%Fs' : illegal token on right side of '::'" +2590 "'%Fs' : ambiguous user-defined conversions in switch expression" +2591 "'%Fs' : ambiguous user-defined conversions in conditional expression" +2592 "no legal conversion of initialization expression to type '%Fs'" +2593 "'operator %Fs' is ambiguous" +2594 "'%Fs' : ambiguous conversions from '%Fs' to '%Fs'" +2595 "'%Fs' : qualified name already has a constructor" +2596 "'%Fs' : qualified name already has a destructor" +2597 "'%Fs' : does not specify an object" +2598 "linkage specification must be at global scope" +2599 "'%Fs' : local functions are not supported" +2601 "functions cannot be defined in local classes" +2602 "'%Fs::%Fs' is not a member of a base of '%Fs'" +2603 "illegal access declaration: '%Fs' is not a direct base of '%Fs'" +2604 "cannot declare %Fs access to %Fs member '%Fs::%Fs'" +2605 "overloaded functions '%Fs::%Fs' do not have same access" +2606 "'%Fs::%Fs': illegal private access declaration" +2607 "'%Fs' : cannot implicitly convert a '%Fs' to a non-const '%Fs'" +2608 "illegal reference cast - operand not an lvalue" + +2610 "%Fs '%Fs' can never be instantiated; user defined constructor is required" +2611 "'%Fs' : illegal following '~' (expected identifier)" +2612 "trailing '%Fs' illegal in base/member initializer list" +2613 "trailing '%Fs' illegal in base class list" +2614 "'%Fs' : illegal member initialization: '%Fs' is not a base or member" +2615 "memory attribute must appear before class name in pointer to member" +2617 "'%Fs' : inconsistent return statement" +2618 "'%Fs' : inconsistent return statement" +2619 "union '%Fs' : can not have static member variable '%Fs'" +2620 "union '%Fs' : member '%Fs' has default constructor" +2621 "union '%Fs' : member '%Fs' has copy constructor" +2622 "union '%Fs' : member '%Fs' has assignment operator" +2623 "union '%Fs' : member '%Fs' has destructor" +2624 "'%Fs' : references to 'void' are illegal" +2625 "anonymous union did not declare any non-static data members" +2626 "anonymous union defines %Fs member '%Fs'" +2627 "member function defined in unnamed class" +2628 "'%Fs' followed by '%Fs' is illegal. (did you forget a ';'?)" +2629 "unexpected '%s ('" +2630 "'%Fs' found in what should be a comma separated list" +2631 "'%Fs' : destructors not allowed a return type" +2632 "'%Fs' followed by '%Fs' is illegal" +2633 "'%Fs' : 'inline' is the only legal storage class for constructors" +2634 "'&%Fs::%Fs' : pointer to reference member is illegal" +2635 "cannot convert a '%Fs*' to a '%Fs*'; conversion from a virtual base class is implied" +2636 "pointer to reference member is illegal" +2637 "'%s' : cannot modify pointers to data members" +2638 "'%Fs' : memory model modifier illegal on pointer to data member" +2639 "cannot use pointer to member expression &%Fs::%Fs - base '%Fs' is inherited as virtual" +2640 "cannot convert a pointer to member across a virtual inheritance path" +2641 "illegal pointer to member cast across virtual inheritance path" +2642 "cast to pointer to member must be from related pointer to member" +2643 "illegal cast from pointer to member" +2644 "basis class '%Fs' for pointer to member has not been defined" +2645 "no qualified name for pointer to member (found ':: *')" +2646 "global anonymous unions must be declared static" +2647 "'%Fs' : cannot dereference a '%Fs' on a '%Fs'" +2648 "'%Fs' : use of non-static member as default parameter" +2649 "'%Fs' : is not a '%Fs'" +2650 "'%Fs' : cannot be a virtual function" + +2652 "'%Fs' : illegal copy constructor: first parameter must not be a '%Fs'" +2653 "'%Fs' : is not a class name" +2654 "'%Fs' : attempt to access member outside a member function" +2655 "'%Fs' : definition or redeclaration illegal in current scope" +2656 "'%Fs' : function not allowed as a bit field" +2657 "'%Fs::*' found a the start of a statement. (did you forget to specify a type?)" +2658 "multiple conversions : %Fs(%Fs) and %Fs::operator %Fs()" +2659 "'%Fs' : overloaded function as left operand" +2660 "'%Fs' : function does not take %d parameters" +2661 "'%Fs' : no overloaded function takes %d parameters" +2662 "'%Fs' : cannot convert 'this' pointer from '%Fs' to '%Fs'" +2663 "'%Fs' : %d overloads have no legal conversion for 'this' pointer" +2664 "'%Fs' : cannot convert parameter %d from '%Fs' to '%Fs'" +2665 "'%Fs' : %d overloads have no legal conversion for parameter %d" +2666 "'%Fs' : %d overloads have similar conversions" +2667 "'%Fs' : none of %d overload have a best conversion" +2668 "'%Fs' : ambiguous call to overloaded function" + +2671 "'%Fs' : static member functions do not have 'this' pointers" +2672 "'%Fs' : new/delete member functions do not have 'this' pointers" +2673 "'%Fs' : global functions do not have 'this' pointers" +2674 "'%Fs' : no acceptable conversions from '%Fs' to '%Fs'" +2675 "unary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the builtin operator" +2676 "binary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the builtin operator" +2677 "binary '%Fs' : no global operator defined which takes type '%Fs' (or there is no acceptable conversion)" + +2701 "'%Fs' : __oldcall function defined with varargs" +2702 "'%Fs' : __try may not appear in termination block" + +2704 "'%Fs' : __va_start intrinsic only allowed in varargs" +2705 "'%Fs' : illegal jump into __try scope" + +2707 "'%Fs' : bad context for intrinsic function" + +2710 "cannot delete a pointer to a const object" +2711 "cannot delete a pointer to a function" + +2720 "'%Fs' : '%Fs' storage class specifier illegal on members" +2721 "'%Fs' : storage class specifier illegal between operator keyword and type" +2722 "'::%Fs' : illegal following operator command; use 'operator %Fs'" +2723 "'%Fs' : '%Fs' storage class specifier illegal on function definition" + +2730 "'%Fs' : cannot be a base class of itself" + +2732 "linkage specification contradicts earlier specification for %Fs" +2733 "second C linkage of overloaded function '%Fs' not allowed" +2734 "'%Fs' : non-extern const object must be initialized" +2735 "'%Fs' keyword is not permitted in formal parameter type specifier" +2736 "'%Fs' keyword is not permitted in cast" +2737 "'%Fs' : base class '%Fs' must be exported" + +2750 "'%Fs' : 'const T' to 'T' : '%Fs' to '%Fs'" +2751 "'%Fs' : 'volatile T' to 'T' : '%Fs' to '%Fs'" +2752 "'%Fs' : 'const T *' to 'T *' : '%Fs' to '%Fs'" +2753 "'%Fs' : 'volatile T *' to 'T *' : '%Fs' to '%Fs'" +2754 "'%Fs' : 'const T **' to 'T **' : '%Fs' to '%Fs'" +2755 "'%Fs' : 'volatile T **' to 'T **' : '%Fs' to '%Fs'" +2756 "'%Fs' : 'memory model mismatch' : '%Fs' to '%Fs'" +2757 "'%Fs' : 'language modifier mismatch: '%Fs' to '%Fs'" +2758 "'%Fs' : must be initialized in constructor base/member initializer list" + +2800 "'operator %Fs' cannot be overloaded" +2801 "'operator %Fs' must be a%Fs member" +2802 "static member 'operator %Fs' has no formal parameters" +2803 "'operator %Fs' must have at least one formal parameter of class type" +2804 "binary 'operator %Fs' has too many parameters" +2805 "binary 'operator %Fs' has too few parameters" +2806 "'operator %Fs' has too many formal parameters" +2807 "the second formal parameter to postfix 'operator %Fs' must be 'int'" +2808 "unary 'operator %Fs' has too many formal parameters" +2809 "'operator %Fs' has no formal parameters" +2810 "second formal parameter for 'operator delete' must be 'unsigned int'" +2811 "too many formal parameters for based form of 'operator delete'" +2812 "second formal parameter required for based form of 'operator delete'" +2813 "too many formal parameters for non-based 'operator delete'" +2814 "second actual parameter for based form of 'operator delete' must be '__based(void)*'" +2815 "first actual parameter for based form of 'operator delete' must be '__segment'" +2816 "alternative form of 'operator delete' must be a member" +2817 "return type for 'operator delete' must be 'void'" +2818 "incorrect return type for 'operator ->'" +2819 "recursive return type for 'operator ->'" +2820 "second formal parameter required for based form of 'operator new'" +2821 "first formal parameter to 'operator new' must be 'unsigned int'" +2822 "second formal parameter for __huge form of 'operator new' must be 'unsigned int'" +2823 "return type for based form of 'operator new' must be 'void __based(void)*'" +2824 "return type for 'operator new' must be 'void *'" +2825 "first formal parameter for huge form of 'operator new' must be 'unsigned long'" +2826 "second formal parameter required for __huge form of 'operator new'" +2827 "'operator %s' cannot be globally overridden with unary form" +2828 "'operator %s' cannot be globally overridden with binary form" +2829 "'operator %Fs' cannot have a variable parameter list" +2830 "only placement parameters to 'operator new' can have default values" +2831 "'operator %Fs' may not have default parameters" + +2833 "'operator %Fs' is not a recognized operator or type" +2834 "'operator %Fs' must be globally qualified" +2835 "user-defined conversion '%Fs' takes no formal parameters" +2836 "cannot export '%Fs': a previous declaration did not export it" +2837 "'%Fs' : illegal local static variable in exported inline function" +2838 "illegal qualified name in member declaration" + +2850 "#pragma hdrstop cannot be nested in a function or definition" +2851 "#pragma hdrstop required for /Yu command-line option without filename" +2852 "'%Fs' is not a valid precompiled header file" +2853 "'%Fs' is not a precompiled header file created with this compiler" +2854 "syntax error in #pragma hdrstop" +2855 "command-line option '%Fs' inconsistant with precompiled header" +2856 "#pragma hdrstop cannot be inside an #if block" +2857 "'#include' statement specified with the /Yc%Fs command-line option was not found in the source file" + +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + + +1001 "INTERNAL COMPILER ERROR\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Product Support Services" + +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end of file found" +1005 "string too big for buffer" +1006 "write error on compiler-generated file" +1007 "unrecognized flag '%Fs' in '%Fs'" +1008 "no input file specified" +1009 "compiler limit : macros nested too deeply" +1010 "unexpected end of file while looking for precompiled header directive" +1011 "compiler limit : '%Fs' : macro definition too big" +1012 "unmatched parenthesis : missing '%c'" +1013 "compiler limit : too many open parentheses" +1014 "too many include files : depth = %d" +1015 "compiler limit : too many segments" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected #elif" +1019 "unexpected #else" +1020 "unexpected #endif" +1021 "invalid preprocessor command '%Fs'" +1022 "expected #endif" +1023 "cannot open source file '%Fs'" +1024 "cannot open include file '%Fs'" +1025 "compiler terminated by user" +1026 "parser stack overflow, program too complex" +1027 "DGROUP data allocation exceeds 64K" +1028 "'%s' : segment allocation exceeds 64K" +1029 "there are > 512 bytes of arguments" +1030 "there are > 512 bytes of local variables" +1031 "compiler limit : function calls nested too deeply" +1032 "cannot open object code listing file '%s'" + +1035 "expression too complex; simplify expression" + +1037 "cannot open object file '%s'" +1038 "compiler limit : '%Fs' : control flow state too complex; simplify function" + +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "compiler limit : linkage specifications nested too deeply" +1046 "compiler limit : %Fs nested too deeply" +1047 "limit of %Fs exceeded at '%Fs'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%s' : code segment too large" + +1052 "compiler limit : #if or #ifdef blocks nested too deeply" +1053 "compiler limit : struct/union nested too deeply" +1054 "compiler limit : initializers nested too deeply" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected end of file in macro expansion" +1058 "compiler limit : too many formal arguments" +1059 "compiler is out of near heap space" +1060 "compiler is out of far heap space" +1061 "compiler limit : blocks nested too deeply" +1062 "error while writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" +1064 "compiler limit : token overflowed internal buffer" +1065 "compiler limit : out of tags" +1066 "compiler limit : decorated name length exceeded" + +1068 "cannot open file '%Fs'" +1069 "write error on file '%s'" +1070 "mismatched #if/#endif pair in file '%Fs'" +1071 "unexpected end of file found in comment" +1072 "'%Fs' : cannot read file" + +1090 "data allocation exceeds 64K" + +1126 "'%Fs' : automatic allocation exceeds %s" +1127 "'%Fs' : segment redefinition" + +1500 "'%Fs' : cannot open inline function definition file" +1501 "compiler limit : too many temporary variables" +1502 "inline member-function definition missing '}'" +1503 "default parameter definition missing ',' or ')'" +1504 "type still ambiguous after parsing %d tokens" +1505 "unrecoverable parser lookahead error" +1506 "unrecoverable block scoping error" +1507 "previous user errors and subsequent error recovery halt further compilation" + +1852 "'%Fs' is not a valid precompiled header file (C2852)" +1853 "'%Fs' is not a precompiled header file created with this compiler (C2853)" +1855 "command-line option '%Fs' inconsistent with precompiled header (C2855)" + +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/os2/bin/c23.err b/private/oleauto/tools/win16/os2/bin/c23.err new file mode 100644 index 000000000..1797efc7e --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/c23.err @@ -0,0 +1,95 @@ + + + +1001 "INTERNAL COMPILER ERROR\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Product Support Services" +1002 "compiler is out of heap space in pass 2" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end of file found" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1015 "compiler limit : too many segments" +1023 "cannot open source file '%s'" +1027 "DGROUP data allocation exceeds 64K" +1029 "there are > 512 bytes of arguments" +1030 "there are > 512 bytes of local variables" +1032 "cannot open object code listing file '%s'" +1033 "cannot open assembly language output file '%s'" +1035 "expression too complex; simplify expression" +1036 "cannot open source listing file '%s'" +1037 "cannot open object file '%s'" +1039 "unrecoverable heap overflow in pass 3" +1040 "unexpected end-of-file condition in source file '%s'" +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%s' : code segment too large" + +1055 "compiler limit : out of keys" +1067 "intrinsic not implemented" +1073 "bad '%s' flag, would overwrite '%s' with '%s'" +1074 "too many '%s' flags, '%s'" + +1090 "'%s' data allocation exceeds 64K" +1126 "'%s' : automatic allocation exceeds %s" +1127 "'%s' : segment redefinition" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" + + + +2125 "'%s' : allocation exceeds 64K" +2127 "parameter allocation exceeds 32K" +2128 "'%s' : huge array cannot be aligned to segment boundary" +2129 "static function '%s' not found" +2220 "warning treated as error - no object file generated" +2418 "'%s' : not in a register" +2427 "'%s' : jump referencing label is out of range" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + + +4700 "local variable '%s' used without having been initialized" +4701 "local variable '%s' may be used without having been initialized" +4702 "unreachable code" +4703 "'%s' : function too large for global optimizations" +4704 "'%s' : inline assembler precludes global optimizations" +4705 "statement has no effect" +4706 "assignment within conditional expression" +4707 "'%s' : function too large for global optimizations (%s)" +4708 "ran out of heap at: %s" +4709 "comma operator within array index expression" +4710 "function '%s' not expanded" +4711 "function '%s' selected for inline expansion" +4712 "'%s' : used as register - loss of debugging information" +4713 "%s: INTERNAL COMPILER ERROR; restarting\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Product Support Services" +4723 "potential divide by 0" +4724 "potential mod by 0" +4726 "'%c' : unknown memory-model command-line option" +4727 "conditional expression is constant" +4741 "/Oq option ignored for __fastcall or __saveregs function '%Fs'" +4746 "'%s' : unsized array treated as '%s'" +4756 "overflow in constant arithmetic" +4758 "address of automatic (local) variable taken; DS != SS" +4759 "segment lost in conversion" +4761 "integral size mismatch in argument; conversion supplied" +4762 "near/far mismatch in argument; conversion supplied" +4763 "'%s' : function too large for postoptimizer" +4765 "recoverable heap overflow in postoptimizer" +4766 "local symbol-table overflow" +4769 "conversion of near pointer to long integer" +4772 "'%s' : too many debug entry points, maximum %d" +4773 "scoping too deep; symbolic debugging information lost for this module." +4785 "near call to '%s' in different segment" +4786 "string too long - truncated to %d characters" +4787 "unprototyped function '%s' called in exception" +4788 "'%Fs' : identifier was truncated to '%d' characters" +4790 "insufficient memory to process debugging information" +4791 "loss of debugging information caused by optimization" +4792 "long double type not supported by alternate math library" + +4900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/os2/bin/cl.err b/private/oleauto/tools/win16/os2/bin/cl.err new file mode 100644 index 000000000..3d828316a --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/cl.err @@ -0,0 +1,41 @@ + /* error messages */ + +2001 "too many symbols predefined with /D" +2002 "memory-model conflict" +2003 "missing source filename" +2008 "limit of %s exceeded at '%s'" +2011 "only one floating-point option allowed" +2012 "too many linker arguments" +2013 "incomplete model specification" +2016 "%s and %s command-line options are incompatible" +2018 "cannot create linker response file" +2019 "cannot overwrite source or object file '%s'" +2020 "%s option requires extended keywords to be enabled (/Ze)" +2021 "invalid numeric argument '%s'" +2022 "cannot open '%s'" +2023 "invalid model specification - flat model only" +2027 "cannot execute '%s'" +2028 "too many open files; cannot redirect '%s'" +2030 "INTERNAL COMPILER ERROR in '%s'\n\t\tContact Microsoft Product Support Services" +2031 "too many command-line options" +2000 "UNKNOWN COMMAND-LINE ERROR\n\t\tContact Microsoft Product Support Services" + + /* warning messages */ + +4001 "listing overrides assembly output" +4002 "ignoring unknown option '%s'" +4003 "processor-option conflict" +4005 "cannot find '%s';\nPlease enter new filename (full path) or CTRL+C to quit: " +4007 "'%s' requires '%s'; option ignored" +4009 "threshold only for far or huge data; ignored" +4011 "preprocessing overrides source listing" +4012 "function declarations override source listing" +4013 "combined listing overrides object listing" +4014 "invalid value '%d' for '%s'; assuming '%d'" +4018 ".DEF files supported for segmented executable files only" +4019 "string too long; truncated to %d characters" +4020 "'%s' : missing argument; option ignored" +4021 "no action performed" +4022 "option '%s' invalid for %d-bit target" +4023 "option '%s' forces use of optimizing compiler" +4000 "UNKNOWN COMMAND-LINE WARNING\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/os2/bin/cl.msg b/private/oleauto/tools/win16/os2/bin/cl.msg new file mode 100644 index 000000000..db6e641ee --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/cl.msg @@ -0,0 +1,126 @@ +C COMPILER OPTIONS +-MEMORY MODEL- +/AS small model (default) +/AC compact model +/AM medium model +/AL large model +/AH huge model +/AT tiny model (.COM files) +/A<string> (custom memory model) +-OPTIMIZATION- +/O enable optimization (same as /Ot) +/Oa assume no aliasing +/Ob<n> inline expansion +/Oc local common subexpression opt. +/Od disable optimization (default) +/Oe enable registers allocation +/Of[-] toggle p-code quoting +/Og global common subexpression opt. +/Oi enable intrinsic functions +/Ol enable loop optimizations +/On disable "unsafe" optimizations +/Oo[-] toggle post code-gen. opt. +/Op[-] improve floating-pt consistency +/Oq enable maximum p-code optimization +/Or gen. common exit code (CodeView) +/Os optimize for space +/Ot optimize for speed +/Ov[-] toggle p-code frame sorting +/Ow assume cross-function aliasing +/Ox maximum opts. (/Ob1cegilnot /Gs) +/Oz enable "unsafe" optimizations +-CODE GENERATION- +/G0 8086 instructions (default) +/G1 186 instructions +/G2 286 instructions +/GA protected-mode Win entry/exit code +/GD protected-mode Win entry/exit code +/GE<x> customize Windows entry/exit +/Gq backwards compatibility with v. 6 +/Gc Pascal style calling conventions +/Gd C style calling conventions +/Ge use stack-check calls +/Gs remove stack-check calls +/Gn remove p-code native entry points +/Gp<num> specify p-code entry tables +/Gr _fastcall style calling convention +/Gt[num] data size threshold +/GW real-mode Windows entry/exit code +/Gw real-mode Windows entry/exit code +/Gx assume that data is near +/Gy separate functions for linker +/Zr check null pointers (/f only) +-OUTPUT FILES- +/Fa[file] name assembly listing file +/Fc[file] name source/object listing +/Fe<file> name executable filename +/Fl[file] name object listing filename +/Fm[file] name map filename +/Fo<file> name object filename +/Fr[file] name .SBR filename +/Fp<file> name .PCH filename +/FR[file] name extended .SBR filename +/Fs[file] name source listing filename +-PREPROCESSOR- +/C don't strip comments +/D<name>[=|#text] define macro +/E preprocess to stdout +/EP same as /E but no #line +/I<directory> add #include path +/P preprocess to file +/U<name> remove predefined macro +/u remove all defined macros +/X ignore "standard places" +-LANGUAGE- +/Za disable extensions (implies /Op) +/Zd line number information +/Ze enable extensions (default) +/Zg generate function prototypes +/Zi prepare for debugging (CodeView) +/Zl omit default library name in .OBJ +/Zp[n] pack structs on n-byte boundary +/Zs check syntax only +-FLOATING POINT- +/FPa calls with altmath +/FPc calls with emulator +/FPc87 calls with 8087 library +/FPi inline with emulator (default) +/FPi87 inline with 8087 +-SOURCE LISTING- +/Sl<columns> set line width +/Sp<lines> set page length +/St<string> set title string +/Ss<string> set subtitle string +-MISCELLANEOUS- +/batch specify batch mode compilation +/Bm<num> set compiler's available mem. +/c compile only, no link +/H<num> external name length +/J default char type is unsigned +/f select fast compiler +/f- select optimizing compiler +/Yc create .PCH file +/Yd put debug info in .PCH file +/Yu use .PCH file +/nologo suppress copyright message +/Mq compile for QuickWin +/ND<name> name data segment +/NM<name> name code segment +/NQ<name> combine p-code temp segments +/NT<name> name code segment +/NV<name> name far v-table segment +/Tc<file> compile file without .c +/Tp<file> compile file without .cpp +/V<string> set version string +/W<num> warning level (0..4,X) +/Zn turn off SBRPACK for .SBR files +-MASM SUPPORT- +/MA<MASM switch> +/Ta<file> assemble file without .asm +-LINKING- +/F <hex_num> stack size (hex. bytes) +/Lr append 'r' to default lib in .OBJ +/link [lib] give lib name to linker +/Ln do not link CRT.LIB +/Ld select dynamically-linked library +/Lw select statically-linked library diff --git a/private/oleauto/tools/win16/os2/bin/ml.err b/private/oleauto/tools/win16/os2/bin/ml.err new file mode 100644 index 000000000..f64e14cbd --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/ml.err @@ -0,0 +1,277 @@ +FATAL +cannot open file +I/O error closing file +I/O error writing file +I/O error reading file +out of memory +assembler limit : macro parameter name table full +invalid command-line option +nesting level too deep +unmatched macro nesting +line too long +unmatched block nesting +directive must be in control block +error count exceeds 100; stopping assembly +invalid numerical command-line argument +too many arguments +statement too complex +N/A +missing source filename +COFF error writing file +invalid debug and browser data; file exceeds line limit +cannot find link.exe +cannot find cvpack.exe +SEVERE +memory operand not allowed in context +immediate operand not allowed +cannot have more than one ELSE clause per IF block +extra characters after statement +symbol type conflict +symbol redefinition +undefined symbol +non-benign record redefinition +syntax error +syntax error in expression +invalid type expression +distance invalid for word size of current segment +PROC, MACRO, or macro repeat directive must precede LOCAL +.MODEL must precede this directive +cannot define as public or external +segment attributes cannot change +expression expected +operator expected +invalid use of external symbol +operand must be RECORD type or field +identifier not a record +record constants may not span line breaks +instruction operands must be the same size +instruction operand must have size +invalid operand size for instruction +operands must be in same segment +constant expected +operand must be a memory expression +expression must be a code address +multiple base registers not allowed +multiple index registers not allowed +must be index or base register +invalid use of register +invalid INVOKE argument +must be in segment block +DUP too complex +too many initial values for structure +statement not allowed inside structure definition +missing operand for macro operator +line too long +segment register not allowed in context +string or text literal too long +statement too complex +identifier too long +invalid character in file +missing angle bracket or brace in literal +missing single or double quotation mark in string +empty (null) string +nondigit in number +syntax error in floating-point constant +real or BCD number not allowed +text item required +forced error +forced error : value equal to 0 +forced error : value not equal to 0 +forced error : symbol not defined +forced error : symbol defined +forced error : string blank +forced error : string not blank +forced error : strings equal +forced error : strings not equal +[ELSE]IF2/.ERR2 not allowed : single-pass assembler +expression too complex for .UNTILCXZ +can ALIGN only to power of 2 +structure alignment must be 1, 2, or 4 +expected +incompatible CPU mode and segment size +LOCK must be followed by a memory operation +instruction prefix not allowed +no operands allowed for this instruction +invalid instruction operands +initializer magnitude too large for specified size +cannot access symbol in given segment or group +operands have different frames +cannot access label through segment registers +jump destination too far +jump destination must specify a label +instruction does not allow NEAR indirect addressing +instruction does not allow FAR indirect addressing +instruction does not allow FAR direct addressing +jump distance not possible in current CPU mode +missing operand after unary operator +cannot mix 16- and 32-bit registers +invalid scale value +constant value too large +instruction or register not accepted in current CPU mode +reserved word expected +instruction form requires 80386/486 +END directive required at end of file +too many bits in RECORD +positive value expected +index value past end of string +count must be positive or zero +count value too large +operand must be relocatable +constant or relocatable label expected +segment, group, or segment register expected +segment expected +invalid operand for OFFSET +invalid use of external absolute +segment or group not allowed +cannot add two relocatable labels +cannot add memory expression and code label +segment exceeds 64K limit +invalid type for a data declaration +HIGH and LOW require immediate operands +N/A +cannot have implicit far jump or call to near label +use of register assumed to ERROR +only white space or comment can follow backslash +COMMENT delimiter expected +conflicting parameter definition +PROC and prototype calling conventions conflict +invalid radix tag +INVOKE argument type mismatch : argument +invalid coprocessor register +instructions and initialized data not allowed in AT segments +/AT switch requires the TINY memory model +cannot have segment address references with TINY model +language type must be specified +PROLOGUE must be macro function +EPILOGUE must be macro procedure +alternate identifier not allowed with EXTERNDEF +text macro nesting level too deep +N/A +missing macro argument +EXITM used inconsistently +macro function argument list too long +N/A +VARARG parameter must be last parameter +VARARG parameter not allowed with LOCAL +VARARG parameter requires C calling convention +ORG needs a constant or local offset +register value overwritten by INVOKE +structure too large to pass with INVOKE : argument +not overriding private proc as public +too many arguments to INVOKE +too few arguments to INVOKE +invalid data initializer +N/A +RET operand too large +too many operands to instruction +cannot have more than one .ELSE clause per .IF block +expected data label +cannot nest procedures +EXPORT must be FAR +procedure declared with two visibility attributes +macro label not defined +invalid symbol type in expression +byte register cannot be first operand +word register cannot be first operand +special register cannot be first operand +coprocessor register cannot be first operand +cannot change size of expression computations +syntax error in control-flow directive +cannot use 16-bit register with a 32-bit address +constant value out of range +missing right parenthesis +type is wrong size for register +structure cannot be instanced +non-benign structure redefinition: label incorrect +non-benign structure redefinition: too few labels +OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed +non-benign structure redefinition: incorrect initializers +non-benign structure redefinition: too few initializers +non-benign structure redefinition: label has incorrect offset +structure field expected +unexpected literal found in expression +N/A +divide by zero in expression +directive must appear inside a macro +cannot expand macro function +too few bits in RECORD +macro function cannot redefine itself +N/A +invalid qualified type +floating-point initializer on an integer variable +nested structure improperly initialized +invalid use of FLAT +structure improperly initialized +improper list initialization +initializer must be a string or single item +initializer must be a single item +initializer must be a single byte +improper use of list initializer +improper literal initialization +extra characters in literal initialization +must use floating-point initializer +cannot use .EXIT for OS_OS2 with .8086 +invalid combination with segment alignment +INVOKE requires prototype for procedure +cannot include structure in self +symbol language attribute conflict +non-benign COMM redefinition +COMM variable exceeds 64K +parameter or local cannot have void type +cannot use TINY model with OS_OS2 +expression size must be 32 bits +.EXIT does not work with 32-bit segments +.STARTUP does not work with 32-bit segments +ORG directive not allowed in unions +D/T +illegal use of segment register +cannot declare scoped code label as PUBLIC +.MSFLOAT directive is obsolete : .MSFLOAT ignored +ESC instruction is obsolete : ESC ignored +missing operator in expression +missing right parenthesis in expression +missing left parenthesis in expression +reference to forward macro definition +16 bit segments not allowed with /coff option +FAR not allowed in flat model comm variables +invalid .model parameter for flat model +ALIAS name is empty +GROUP directive not allowed with /coff option +.FPO is not compatible with nested procedures +LEVEL 1 +cannot modify READONLY segment +N/A +non-unique STRUCT/UNION field used without qualification +start address on END directive ignored with .STARTUP +cannot ASSUME CS +unknown default prologue argument +too many arguments in macro call +option untranslated, directive required +invalid command-line option value, default is used +insufficent memory for /EP : /EP ignored +expected '>' on text literal +multiple .MODEL directives found : .MODEL ignored +line number information for segment without class 'CODE' +instructions and initialized data not supported in AT segments +directive ignored with /coff switch +/Gc switch incompatible with flat model +/AT switch incompatible with flat model +invalid command-line option +directive ignored without /coff switch +directive ignored outside a procedure +LOADDS ignored in flat model +LEVEL 2 +@@: label defined but not referenced +expression expected, assume value 0 +EXTERNDEF previously assumed to be external +length of symbol previously assumed to be different +symbol previously assumed to not be in a group +types are different +calling convention not supported in flat model +LEVEL 3 +N/A +no return from procedure +N/A +conditional jump lengthened +procedure argument or local not referenced +expression may be pass-dependent diff --git a/private/oleauto/tools/win16/os2/bin/rcpp.err b/private/oleauto/tools/win16/os2/bin/rcpp.err new file mode 100644 index 000000000..d26c8494d --- /dev/null +++ b/private/oleauto/tools/win16/os2/bin/rcpp.err @@ -0,0 +1,334 @@ +/* SCCSWHAT( "@(#)c1.err 2.29 88/02/25 18:18:00 " ) */ + /* fatals */ + +1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Technical Support" +1002 "out of heap space" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected EOF" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1008 "no input file specified" +1009 "compiler limit : macros too deeply nested" +1010 "compiler limit : macro expansion too big" +1012 "bad parenthesis nesting - missing '%c'" +1013 "cannot open source file '%s'" +1014 "too many include files" +1015 "cannot open include file '%s'" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected '#elif'" +1019 "unexpected '#else'" +1020 "unexpected '#endif'" +1021 "bad preprocessor command '%s'" +1022 "expected '#endif'" +1023 "no int size specified" +1024 "no ptr size specified" +1025 "no function size specified" +1026 "parser stack overflow, please simplify your program" +1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */ +1028 "%s segment allocation exceeds 64K" /* QC */ +1031 "compiler limit : function calls too deeply nested" /* QC, c23 */ +1032 "cannot open object listing file '%s'" /* QC, c23 */ +1035 "expression too complex, please simplify" /* QC, c23 */ +1037 "cannot open object file '%s'" /* QC, c23 */ +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "floating point overflow" +1047 "too many %s flags, '%s'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1052 "too many #if/#ifdef's" +1053 "compiler limit : struct/union nesting" +1054 "compiler limit : initializers too deeply nested" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected EOF in macro expansion (missing ')'?)" +1059 "out of near heap space" +1060 "out of far heap space" +1061 "compiler limit : blocks too deeply nested" /* QC */ +1062 "error writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" /* QC */ +1064 "compiler limit : identifier overflowed internal buffer" +1065 "compiler limit : declarator too complex" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Technical Support" + + /* errors */ + +2001 "newline in constant" +2002 "out of macro actual parameter space" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%s'" +2006 "#include expected a file name, found '%s'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%s'" +2010 "'%c' : unexpected in formal list" +2011 "'%s' : definition too big" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first non-whitespace" +2015 "too many chars in constant" +2016 "no closing single quote" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor command, found '%c'" +2020 "bad octal number '%c'" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for char" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" +2026 "'%s' : member of enum redefinition" +2028 "struct/union member needs to be inside a struct/union" +2029 "'%Fs' : bit-fields only allowed in structs" +2030 "'%Fs' : struct/union member redefinition" +2031 "'%Fs' : function cannot be struct/union member" +2032 "'%Fs' : base type with near/far/huge not allowed" +2033 "'%Fs' : bit-field cannot have indirection" +2034 "'%Fs' : bit-field type too small for number of bits" +2035 "enum/struct/union '%Fs' : unknown size" +2036 "left of '%s%s' must have a struct/union type" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" +2039 "'->' requires struct/union pointer" +2040 "'.' requires struct/union name" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%s' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2050 "non-integral switch expression" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "case value %d already used" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%s'" +2060 "syntax error : EOF" +2061 "syntax error : identifier '%s'" +2062 "type '%s' unexpected" +2063 "'%s' : not a function" +2064 "term does not evaluate to a function" +2065 "'%s' : undefined" +2066 "cast to function returning . . . is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast" +2069 "cast of 'void' term to non-void" +2070 "illegal sizeof operand" +2071 "'%Fs' : bad storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : cannot initialize array in function" +2074 "'%Fs' : cannot initialize struct/union in function" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" +2077 "non-integral field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined struct/union '%Fs'" +2082 "redefinition of formal parameter '%Fs'" +2083 "array '%Fs' already has a size" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "use of undefined enum/struct/union '%s'" +2089 "typedef specifies a near/far function" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "cannot initialize a static or struct with address of automatic vars" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual has type void : parameter %d" +2096 "struct/union comparison illegal" +2097 "illegal initialization" +2098 "non-address expression" +2099 "non-constant offset" +2100 "illegal indirection" +2101 "'&' on constant" +2102 "'&' requires lvalue" +2103 "'&' on register variable" +2104 "'&' on bit-field ignored" +2105 "'%s' needs lvalue" +2106 "'%s' : left operand must be lvalue" +2107 "illegal index, indirection not allowed" +2108 "non-integral index" +2109 "subscript on non-array" +2110 "'+' : 2 pointers" +2111 "pointer + non-integral value" +2112 "illegal pointer subtraction" +2113 "'-' : right operand pointer" +2114 "'%s' : pointer on left; needs integral right" +2115 "'%s' : incompatible types" +2116 "'%s' : bad %s operand" +2117 "'%s' : illegal for struct/union" +2118 "negative subscript" +2119 "'typedefs' both define indirection" +2120 "'void' illegal with all types" +2121 "typedef specifies different enum" +2122 "typedef specifies different struct" +2123 "typedef specifies different union" +2125 "%Fs : allocation exceeds 64K" /* QC, c23 */ +2126 "%Fs : auto allocation exceeds %s" /* QC, c23 */ +2127 "parameter allocation exceeds 32K" /* QC, c23 */ +2130 "#line expected a string containing the file name, found '%s'" +2131 "attributes specify more than one near/far/huge" +2132 "syntax error : unexpected identifier" +2133 "array '%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" +2135 "missing ')' in macro expansion" +2137 "empty character constant" +2138 "unmatched close comment '*/'" +2139 "type following '%s' is illegal" +2140 "argument type cannot be function returning . . ." +2141 "value out of range for enum constant" +2142 "ellipsis requires three periods" +2143 "syntax error : missing '%s' before '%s'" +2144 "syntax error : missing '%s' before type '%Fs'" +2145 "syntax error : missing '%s' before identifier" +2146 "syntax error : missing '%s' before identifier '%s'" +2147 "unknown size" +2148 "array too large" +2149 "'%Fs' : named bit-field cannot have 0 width" +2150 "'%Fs' : bit-field must have type int, signed int, or unsigned int" +2151 "more than one cdecl/fortran/pascal attribute specified" +2152 "'%s' : pointers to functions with different attributes" +2153 "hex constants must have at least 1 hex digit" +2154 "'%s' : does not refer to a segment" +2155 "'%s' : already in a segment" +2156 "pragma must be at outer level" +2157 "'%s' : must be declared before use in pragma list" +2158 "'%s' : is a function" +2159 "more than one storage class specified" +2160 "## cannot occur at the beginning of a macro definition" +2161 "## cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%s' : not available as an intrinsic" +2164 "'%s' : intrinsic was not declared" +2165 "'%s' : cannot modify pointers to data" +2166 "lval specifies 'const' object" +2167 "'%Fs' : too many actual parameters for intrinsic" +2168 "'%Fs' : too few actual parameters for intrinsic" +2169 "'%Fs' : is an intrinsic, it cannot be defined" +2170 "'%s' : intrinsic not declared as a function" +2171 "'%s' : bad operand" +2172 "'%Fs' : actual is not a pointer : parameter %d" +2173 "'%Fs' : actual is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual has type void : parameter %d, parameter list %d" +2175 "'%Fs' : unresolved external" /* QC */ +2176 "static far data not supported" /* QC */ +2177 "constant too big" +2178 "'%s' : storage class for same_seg variables must be 'extern'" +2179 "'%Fs' : was used in same_seg, but storage class is no longer 'extern'" +2180 "controlling expression has type 'void'" +2181 "pragma requires command line option '%s'" /* QC */ +2182 "'%Fs' : 'void' on variable" +2183 "'%Fs' : 'interrupt' function must be 'far'" +2184 "'%Fs' : '%s' function cannot be 'pascal/fortran'" +2186 "'%Fs' : 'saveregs/interrupt' modifiers mutually exclusive" +2187 "cast of near function pointer to far function pointer" +2188 "#error : %s" +2190 "'%s' : is a text segment" +2191 "'%s' : is a data segment" +2192 "'%s' : function has already been defined" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Technical Support" + + /* warnings */ + +4001 "macro '%s' requires parameters" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "missing close parenthesis after 'defined'" +4005 "'%s' : redefinition" +4006 "#undef expected an identifier" +4009 "string too big, trailing chars truncated" +4011 "identifier truncated to '%s'" +4012 "float constant in a cross compilation" +4013 "constant too big" +4014 "'%Fs' : bit-field type must be unsigned" +4015 "'%Fs' : bit-field type must be integral" +4016 "'%s' : no function return type, using 'int' as default" +4017 "cast of int expression to far pointer" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch : parameter %d" +4024 "'%Fs' : different types : parameter %d" +4025 "function declaration specified variable argument list" +4026 "function was declared with formal argument list" +4027 "function was declared without formal argument list" +4028 "parameter %d declaration different" +4029 "declared parameter list different from definition" +4030 "first parameter list is longer than the second" +4031 "second parameter list is longer than the first" +4032 "unnamed struct/union as parameter" +4033 "function must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unexpected formal parameter list" +4037 "'%Fs' : formal parameters ignored" +4038 "'%Fs' : formal parameter has bad storage class" +4039 "'%Fs' : function used as an argument" +4040 "near/far/huge on '%Fs' ignored" +4041 "formal parameter '%s' is redefined" +4042 "'%Fs' : has bad storage class" +4044 "huge on '%Fs' ignored, must be an array" +4045 "'%s' : array bounds overflow" +4046 "'&' on function/array, ignored" +4047 "'%s' : different levels of indirection" +4048 "array's declared subscripts different" +4049 "'%s' : indirection to different types" +4051 "data conversion" +4052 "different enum types" +4053 "at least one void operand" +4060 "conversion of long address to short address" /* QC, c23 */ +4061 "long/short mismatch in argument : conversion supplied" /* QC, c23 */ +4062 "near/far mismatch in argument : conversion supplied" /* QC, c23 */ +4067 "unexpected characters following '%s' directive - newline expected" +4068 "unknown pragma" +4071 "'%Fs' : no function prototype given" +4074 "non standard extension used - '%s'" +4075 "size of switch expression or case constant too large - converted to int" +4076 "'%s' : may be used on integral types only" +4077 "unknown check_stack option" +4079 "unexpected token '%s'" +4080 "expected 'identifier' for segment name, found '%s'" +4081 "expected a comma, found '%s'" +4082 "expected an identifier, found '%s'" +4083 "expected '(', found '%s'" +4084 "expected a pragma keyword, found '%s'" +4085 "expected [on | off]" +4086 "expected [1 | 2 | 4]" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch : parameter %d, parameter list %d" +4089 "'%Fs' : different types : parameter %d, parameter list %d" +4090 "different 'const' attributes" +4091 "no symbols were declared" +4092 "untagged enum/struct/union declared no symbols" +4093 "unescaped newline in character constant in non-active code" +4094 "unexpected newline" +4095 "expected ')', found '%s'" +4096 "huge treated as far" /* QC */ +4098 "void function returning a value" +4099 "expected ')', (too many arguments?)" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : function definition used as prototype" +4104 "'%s' : near data in same_seg pragma, ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires integer between 1 and 127" +4107 "pragma requires integer between 15 and 255" +4108 "pragma requires integer between 79 and 132" +4109 "unexpected identifier '%s'" +4110 "unexpected token 'int constant'" +4111 "unexpected token 'string'" +4112 "macro name '%s' is reserved, %s ignored" +4113 "function parameter lists differed" +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Technical Support" diff --git a/private/oleauto/tools/win16/os2/inc/assert.h b/private/oleauto/tools/win16/os2/inc/assert.h new file mode 100644 index 000000000..b091186f3 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/assert.h @@ -0,0 +1,35 @@ +/*** +*assert.h - define the assert macro +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the assert(exp) macro. +* [ANSI/System V] +* +****/ + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#undef assert + +#ifdef NDEBUG + +#define assert(exp) ((void)0) + +#else +#ifdef __cplusplus +extern "C" { +#endif +void __cdecl _assert(void *, void *, unsigned); +#ifdef __cplusplus +} +#endif + +#define assert(exp) \ + ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) ) + +#endif /* NDEBUG */ diff --git a/private/oleauto/tools/win16/os2/inc/bios.h b/private/oleauto/tools/win16/os2/inc/bios.h new file mode 100644 index 000000000..a681fbd4b --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bios.h @@ -0,0 +1,242 @@ +/*** +*bios.h - declarations for bios interface functions and supporting definitions +* +* Copyright (c) 1987-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the constants, structures, and functions +* used for accessing and using various BIOS interfaces. +* +****/ + +#ifndef _INC_BIOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + + +/* manifest constants for BIOS serial communications (RS-232) support */ + +/* serial port services */ + +#define _COM_INIT 0 /* init serial port */ +#define _COM_SEND 1 /* send character */ +#define _COM_RECEIVE 2 /* receive character */ +#define _COM_STATUS 3 /* get serial port status */ + +/* serial port initializers. One and only one constant from each of the + * following four groups - character size, stop bit, parity, and baud rate - + * must be specified in the initialization byte. + */ + +/* character size initializers */ + +#define _COM_CHR7 2 /* 7 bits characters */ +#define _COM_CHR8 3 /* 8 bits characters */ + +/* stop bit values - on or off */ + +#define _COM_STOP1 0 /* 1 stop bit */ +#define _COM_STOP2 4 /* 2 stop bits */ + +/* parity initializers */ + +#define _COM_NOPARITY 0 /* no parity */ +#define _COM_ODDPARITY 8 /* odd parity */ +#define _COM_EVENPARITY 24 /* even parity */ + +/* baud rate initializers */ + +#define _COM_110 0 /* 110 baud */ +#define _COM_150 32 /* 150 baud */ +#define _COM_300 64 /* 300 baud */ +#define _COM_600 96 /* 600 baud */ +#define _COM_1200 128 /* 1200 baud */ +#define _COM_2400 160 /* 2400 baud */ +#define _COM_4800 192 /* 4800 baud */ +#define _COM_9600 224 /* 9600 baud */ + + +/* manifest constants for BIOS disk support */ + +/* disk services */ + +#define _DISK_RESET 0 /* reset disk controller */ +#define _DISK_STATUS 1 /* get disk status */ +#define _DISK_READ 2 /* read disk sectors */ +#define _DISK_WRITE 3 /* write disk sectors */ +#define _DISK_VERIFY 4 /* verify disk sectors */ +#define _DISK_FORMAT 5 /* format disk track */ + +/* struct used to send/receive information to/from the BIOS disk services */ + +#ifndef _DISKINFO_T_DEFINED +#pragma pack(2) + +struct _diskinfo_t { + unsigned drive; + unsigned head; + unsigned track; + unsigned sector; + unsigned nsectors; + void __far *buffer; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskinfo_t _diskinfo_t +#endif + +#pragma pack() +#define _DISKINFO_T_DEFINED +#endif + + +/* manifest constants for BIOS keyboard support */ + +/* keyboard services */ + +#define _KEYBRD_READ 0 /* read next character from keyboard */ +#define _KEYBRD_READY 1 /* check for keystroke */ +#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */ + +/* services for enhanced keyboards */ + +#define _NKEYBRD_READ 0x10 /* read next character from keyboard */ +#define _NKEYBRD_READY 0x11 /* check for keystroke */ +#define _NKEYBRD_SHIFTSTATUS 0x12 /* get current shift key status */ + + +/* manifest constants for BIOS printer support */ + +/* printer services */ + +#define _PRINTER_WRITE 0 /* write character to printer */ +#define _PRINTER_INIT 1 /* intialize printer */ +#define _PRINTER_STATUS 2 /* get printer status */ + + +/* manifest constants for BIOS time of day support */ + +/* time of day services */ + +#define _TIME_GETCLOCK 0 /* get current clock count */ +#define _TIME_SETCLOCK 1 /* set current clock count */ + + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif /* __STDC__ */ + +#define _REGS_DEFINED +#endif /* _REGS_DEFINED */ + + +/* function prototypes */ + +#ifndef _WINDOWS +unsigned __cdecl _bios_disk(unsigned, struct _diskinfo_t *); +#endif +unsigned __cdecl _bios_equiplist(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_keybrd(unsigned); +#endif +unsigned __cdecl _bios_memsize(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_printer(unsigned, unsigned, unsigned); +unsigned __cdecl _bios_serialcom(unsigned, unsigned, unsigned); +#endif +unsigned __cdecl _bios_timeofday(unsigned, long *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#endif + + +#ifdef __cplusplus +} +#endif + +#define _INC_BIOS +#endif /* _INC_BIOS */ diff --git a/private/oleauto/tools/win16/os2/inc/bse.h b/private/oleauto/tools/win16/os2/inc/bse.h new file mode 100644 index 000000000..5887590d8 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bse.h @@ -0,0 +1,47 @@ +/***************************************************************************\ +* +* Module Name: BSE.H +* +* This file includes the definitions necessary for writing Base OS/2 +* applications. +* +* Copyright (c) 1987-1991, Microsoft Corporation. All rights reserved. +* +* =========================================================================== +* +* The following symbols are used in this file for conditional sections. +* +* INCL_BASE - ALL of OS/2 Base +* INCL_DOS - OS/2 DOS Kernel +* INCL_SUB - OS/2 VIO/KBD/MOU +* INCL_DOSERRORS - OS/2 Errors - only included if symbol defined +* INCL_DOSDEVIOCTL - Structures and constants for DosDevIOCtl +* +\***************************************************************************/ + +#define INCL_BASEINCLUDED + +/* if INCL_BASE defined then define all the symbols */ +#ifdef INCL_BASE + #define INCL_DOS + #define INCL_SUB + #define INCL_DOSERRORS + #define INCL_DOSDEVICES + #define INCL_DOSDEVIOCTL +#endif /* INCL_BASE */ + +#include <bsedos.h> /* Base definitions */ + +#ifndef BSESUB_INCLUDED /* Only include it once */ +#include <bsesub.h> /* VIO/KBD/MOU definitions */ +#endif + +#ifndef BSEERR_INCLUDED /* Only include it once */ +#include <bseerr.h> /* Base error code definitions */ +#endif + +#if (defined(INCL_DOSDEVICES) || defined(INCL_DOSDEVIOCTL)) +#ifndef BSEDEV_INCLUDED /* Only include it once */ +#include <bsedev.h> /* IOCtls */ +#endif +#endif diff --git a/private/oleauto/tools/win16/os2/inc/bsedev.h b/private/oleauto/tools/win16/os2/inc/bsedev.h new file mode 100644 index 000000000..10d80ccfe --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bsedev.h @@ -0,0 +1,520 @@ +/**************************************************************************\ +* +* Module Name: BSEDEV.H +* +* OS/2 Structures and constants for use with DosDevIOCtl +* +* Copyright (c) 1989-1990, Microsoft Corporation. All rights reserved. +* +\**************************************************************************/ + +#define BSEDEV_INCLUDED + +/* Input and Output Control Categories */ + +#define IOCTL_ASYNC 0x0001 +#define IOCTL_SCR_AND_PTRDRAW 0x0003 +#define IOCTL_KEYBOARD 0x0004 +#define IOCTL_PRINTER 0x0005 +#define IOCTL_LIGHTPEN 0x0006 +#define IOCTL_POINTINGDEVICE 0x0007 +#define IOCTL_DISK 0x0008 +#define IOCTL_PHYSICALDISK 0x0009 +#define IOCTL_MONITOR 0x000A +#define IOCTL_GENERAL 0x000B + +/* Serial-Device Control */ + +#define ASYNC_SETBAUDRATE 0x0041 +#define ASYNC_SETLINECTRL 0x0042 +#define ASYNC_TRANSMITIMM 0x0044 +#define ASYNC_SETBREAKOFF 0x0045 +#define ASYNC_SETMODEMCTRL 0x0046 +#define ASYNC_SETBREAKON 0x004B +#define ASYNC_STOPTRANSMIT 0x0047 +#define ASYNC_STARTTRANSMIT 0x0048 +#define ASYNC_SETDCBINFO 0x0053 +#define ASYNC_GETBAUDRATE 0x0061 +#define ASYNC_GETLINECTRL 0x0062 +#define ASYNC_GETCOMMSTATUS 0x0064 +#define ASYNC_GETLINESTATUS 0x0065 +#define ASYNC_GETMODEMOUTPUT 0x0066 +#define ASYNC_GETMODEMINPUT 0x0067 +#define ASYNC_GETINQUECOUNT 0x0068 +#define ASYNC_GETOUTQUECOUNT 0x0069 +#define ASYNC_GETCOMMERROR 0x006D +#define ASYNC_GETCOMMEVENT 0x0072 +#define ASYNC_GETDCBINFO 0x0073 + +/* Screen/Pointer-Draw Control */ + +#define SCR_ALLOCLDT 0x0070 +#define SCR_DEALLOCLDT 0x0071 +#define PTR_GETPTRDRAWADDRESS 0x0072 +#define SCR_ALLOCLDTOFF 0x0075 + +/* Keyboard Control */ + +#define KBD_SETTRANSTABLE 0x0050 +#define KBD_SETINPUTMODE 0x0051 +#define KBD_SETINTERIMFLAG 0x0052 +#define KBD_SETSHIFTSTATE 0x0053 +#define KBD_SETTYPAMATICRATE 0x0054 +#define KBD_SETFGNDSCREENGRP 0x0055 +#define KBD_SETSESMGRHOTKEY 0x0056 +#define KBD_SETFOCUS 0x0057 +#define KBD_SETKCB 0x0058 +#define KBD_SETNLS 0x005C +#define KBD_CREATE 0x005D +#define KBD_DESTROY 0x005E +#define KBD_GETINPUTMODE 0x0071 +#define KBD_GETINTERIMFLAG 0x0072 +#define KBD_GETSHIFTSTATE 0x0073 +#define KBD_READCHAR 0x0074 +#define KBD_PEEKCHAR 0x0075 +#define KBD_GETSESMGRHOTKEY 0x0076 +#define KBD_GETKEYBDTYPE 0x0077 +#define KBD_GETCODEPAGEID 0x0078 +#define KBD_XLATESCAN 0x0079 + +/* Printer Control */ + +#define PRT_SETFRAMECTL 0x0042 +#define PRT_SETINFINITERETRY 0x0044 +#define PRT_INITPRINTER 0x0046 +#define PRT_ACTIVATEFONT 0x0048 +#define PRT_GETFRAMECTL 0x0062 +#define PRT_GETINFINITERETRY 0x0064 +#define PRT_GETPRINTERSTATUS 0x0066 +#define PRT_QUERYACTIVEFONT 0x0069 +#define PRT_VERIFYFONT 0x006A + +/* Pointing-Device (Mouse) Control */ + +#define MOU_ALLOWPTRDRAW 0x0050 +#define MOU_UPDATEDISPLAYMODE 0x0051 +#define MOU_SCREENSWITCH 0x0052 +#define MOU_SETSCALEFACTORS 0x0053 +#define MOU_SETEVENTMASK 0x0054 +#define MOU_SETHOTKEYBUTTON 0x0055 +#define MOU_SETPTRSHAPE 0x0056 +#define MOU_DRAWPTR 0x0057 +#define MOU_REMOVEPTR 0x0058 +#define MOU_SETPTRPOS 0x0059 +#define MOU_SETPROTDRAWADDRESS 0x005A +#define MOU_SETREALDRAWADDRESS 0x005B +#define MOU_SETMOUSTATUS 0x005C +#define MOU_DISPLAYMODECHANGE 0x005D +#define MOU_GETBUTTONCOUNT 0x0060 +#define MOU_GETMICKEYCOUNT 0x0061 +#define MOU_GETMOUSTATUS 0x0062 +#define MOU_READEVENTQUE 0x0063 +#define MOU_GETQUESTATUS 0x0064 +#define MOU_GETEVENTMASK 0x0065 +#define MOU_GETSCALEFACTORS 0x0066 +#define MOU_GETPTRPOS 0x0067 +#define MOU_GETPTRSHAPE 0x0068 +#define MOU_GETHOTKEYBUTTON 0x0069 +#define MOU_VER 0x006A + +/* Disk/Diskette Control */ + +#define DSK_LOCKDRIVE 0x0000 +#define DSK_UNLOCKDRIVE 0x0001 +#define DSK_REDETERMINEMEDIA 0x0002 +#define DSK_SETLOGICALMAP 0x0003 +#define DSK_BLOCKREMOVABLE 0x0020 +#define DSK_GETLOGICALMAP 0x0021 +#define DSK_SETDEVICEPARAMS 0x0043 +#define DSK_WRITETRACK 0x0044 +#define DSK_FORMATVERIFY 0x0045 +#define DSK_GETDEVICEPARAMS 0x0063 +#define DSK_READTRACK 0x0064 +#define DSK_VERIFYTRACK 0x0065 + +/* Physical-Disk Control */ + +#define PDSK_LOCKPHYSDRIVE 0x0000 +#define PDSK_UNLOCKPHYSDRIVE 0x0001 +#define PDSK_WRITEPHYSTRACK 0x0044 +#define PDSK_GETPHYSDEVICEPARAMS 0x0063 +#define PDSK_READPHYSTRACK 0x0064 +#define PDSK_VERIFYPHYSTRACK 0x0065 + +/* Character-Monitor Control */ + +#define MON_REGISTERMONITOR 0x0040 + +/* General Device Control */ + +#define DEV_FLUSHINPUT 0x0001 +#define DEV_FLUSHOUTPUT 0x0002 +#define DEV_QUERYMONSUPPORT 0x0060 + + +/* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON, + * ASYNC_SETMODEMCTRL + */ + +#define RX_QUE_OVERRUN 0x0001 +#define RX_HARDWARE_OVERRUN 0x0002 +#define PARITY_ERROR 0x0004 +#define FRAMING_ERROR 0x0008 + +/* ASYNC_GETCOMMEVENT */ + +#define CHAR_RECEIVED 0x0001 +#define LAST_CHAR_SENT 0x0004 +#define CTS_CHANGED 0x0008 +#define DSR_CHANGED 0x0010 +#define DCD_CHANGED 0x0020 +#define BREAK_DETECTED 0x0040 +#define ERROR_OCCURRED 0x0080 +#define RI_DETECTED 0x0100 + +/* ASYNC_GETCOMMSTATUS */ + +#define TX_WAITING_FOR_CTS 0x0001 +#define TX_WAITING_FOR_DSR 0x0002 +#define TX_WAITING_FOR_DCD 0x0004 +#define TX_WAITING_FOR_XON 0x0008 +#define TX_WAITING_TO_SEND_XON 0x0010 +#define TX_WAITING_WHILE_BREAK_ON 0x0020 +#define TX_WAITING_TO_SEND_IMM 0x0040 +#define RX_WAITING_FOR_DSR 0x0080 + +/* ASYNC_GETLINESTATUS */ + +#define WRITE_REQUEST_QUEUED 0x0001 +#define DATA_IN_TX_QUE 0x0002 +#define HARDWARE_TRANSMITTING 0x0004 +#define CHAR_READY_TO_SEND_IMM 0x0008 +#define WAITING_TO_SEND_XON 0x0010 +#define WAITING_TO_SEND_XOFF 0x0020 + +/* ASYNC_GETMODEMINPUT */ + +#define CTS_ON 0x10 +#define DSR_ON 0x20 +#define RI_ON 0x40 +#define DCD_ON 0x80 + +/* DSK_SETDEVICEPARAMS */ + +#define BUILD_BPB_FROM_MEDIUM 0x00 +#define REPLACE_BPB_FOR_DEVICE 0x01 +#define REPLACE_BPB_FOR_MEDIUM 0x02 + +/* KBD_GETINPUTMODE, KBD_PEEKCHAR, KBD_SETINPUTMODE*/ + +#define ASCII_MODE 0x00 +#define BINARY_MODE 0x80 + +/* KBD_GETINTERIMFLAG */ + +#define CONVERSION_REQUEST 0x20 +#define INTERIM_CHAR 0x80 + +/* KBD_GETSESMGRHOTKEY */ + +#define HOTKEY_MAX_COUNT 0x0000 +#define HOTKEY_CURRENT_COUNT 0x0001 + +/* KBD_PEEKCHAR */ + +#define KBD_DATA_RECEIVED 0x0001 +#define KBD_DATA_BINARY 0x8000 + +/* KBD_READCHAR */ + +#define KBD_READ_WAIT 0x0000 +#define KBD_READ_NOWAIT 0x8000 + +/* KBD_SETINPUTMODE */ + +#define SHIFT_REPORT_MODE 0x01 + +#ifndef INCL_MOU + +#define MOUSE_MOTION 0x0001 +#define MOUSE_MOTION_WITH_BN1_DOWN 0x0002 +#define MOUSE_BN1_DOWN 0x0004 +#define MOUSE_MOTION_WITH_BN2_DOWN 0x0008 +#define MOUSE_BN2_DOWN 0x0010 +#define MOUSE_MOTION_WITH_BN3_DOWN 0x0020 +#define MOUSE_BN3_DOWN 0x0040 + +#define MHK_BUTTON1 0x0001 +#define MHK_BUTTON2 0x0002 +#define MHK_BUTTON3 0x0004 + +#define MOU_NOWAIT 0x0000 +#define MOU_WAIT 0x0001 + +#endif /* #ifndef INCL_MOU */ + +/* MOU_GETHOTKEYBUTTON, MOU_SETHOTKEYBUTTON */ + +#define MHK_NO_HOTKEY 0x0000 + +/* MOU_GETMOUSTATUS */ + +#define MOUSE_QUEUEBUSY 0x0001 +#define MOUSE_BLOCKREAD 0x0002 +#define MOUSE_FLUSH 0x0004 +#define MOUSE_UNSUPPORTED_MODE 0x0008 +#define MOUSE_DISABLED 0x0100 +#define MOUSE_MICKEYS 0x0200 + +/* PRT_GETPRINTERSTATUS */ + +#define PRINTER_TIMEOUT 0x0001 +#define PRINTER_IO_ERROR 0x0008 +#define PRINTER_SELECTED 0x0010 +#define PRINTER_OUT_OF_PAPER 0x0020 +#define PRINTER_ACKNOWLEDGED 0x0040 +#define PRINTER_NOT_BUSY 0x0080 + +/* fbCtlHndShake */ + +#define MODE_DTR_CONTROL 0x01 +#define MODE_DTR_HANDSHAKE 0x02 +#define MODE_CTS_HANDSHAKE 0x08 +#define MODE_DSR_HANDSHAKE 0x10 +#define MODE_DCD_HANDSHAKE 0x20 +#define MODE_DSR_SENSITIVITY 0x40 + +/* fbFlowReplace */ + +#define MODE_AUTO_TRANSMIT 0x01 +#define MODE_AUTO_RECEIVE 0x02 +#define MODE_ERROR_CHAR 0x04 +#define MODE_NULL_STRIPPING 0x08 +#define MODE_BREAK_CHAR 0x10 +#define MODE_RTS_CONTROL 0x40 +#define MODE_RTS_HANDSHAKE 0x80 +#define MODE_TRANSMIT_TOGGLE 0xC0 + +/* fbTimeout */ + +#define MODE_NO_WRITE_TIMEOUT 0x01 +#define MODE_READ_TIMEOUT 0x02 +#define MODE_WAIT_READ_TIMEOUT 0x04 +#define MODE_NOWAIT_READ_TIMEOUT 0x06 + +typedef struct _DCBINFO { /* dcbinf */ + USHORT usWriteTimeout; + USHORT usReadTimeout; + BYTE fbCtlHndShake; + BYTE fbFlowReplace; + BYTE fbTimeout; + BYTE bErrorReplacementChar; + BYTE bBreakReplacementChar; + BYTE bXONChar; + BYTE bXOFFChar; +} DCBINFO; +typedef DCBINFO FAR *PDCBINFO; + +typedef struct _TRACKLAYOUT { /* trckl */ + BYTE bCommand; + USHORT usHead; + USHORT usCylinder; + USHORT usFirstSector; + USHORT cSectors; + struct { + USHORT usSectorNumber; + USHORT usSectorSize; + } TrackTable[1]; +} TRACKLAYOUT; +typedef TRACKLAYOUT FAR *PTRACKLAYOUT; + +#define DEVTYPE_48TPI 0x0000 +#define DEVTYPE_96TPI 0x0001 +#define DEVTYPE_35 0x0002 +#define DEVTYPE_8SD 0x0003 +#define DEVTYPE_8DD 0x0004 +#define DEVTYPE_FIXED 0x0005 +#define DEVTYPE_TAPE 0x0006 +#define DEVTYPE_UNKNOWN 0x0007 + +typedef struct _BIOSPARAMETERBLOCK { /* bspblk */ + USHORT usBytesPerSector; + BYTE bSectorsPerCluster; + USHORT usReservedSectors; + BYTE cFATs; + USHORT cRootEntries; + USHORT cSectors; + BYTE bMedia; + USHORT usSectorsPerFAT; + USHORT usSectorsPerTrack; + USHORT cHeads; + ULONG cHiddenSectors; + ULONG cLargeSectors; + BYTE abReserved[6]; + USHORT cCylinders; + BYTE bDeviceType; + USHORT fsDeviceAttr; +} BIOSPARAMETERBLOCK; +typedef BIOSPARAMETERBLOCK FAR *PBIOSPARAMETERBLOCK; + +typedef struct _SCREENGROUP { /* scrgrp */ + USHORT idScreenGrp; + USHORT fTerminate; +} SCREENGROUP; +typedef SCREENGROUP FAR *PSCREENGROUP; + +typedef struct _FRAME { /* frm */ + BYTE bCharsPerLine; + BYTE bLinesPerInch; +} FRAME; +typedef FRAME FAR *PFRAME; + +typedef struct _KBDTYPE { /* kbdtyp */ + USHORT usType; + USHORT reserved1; + USHORT reserved2; +} KBDTYPE; +typedef KBDTYPE FAR *PKBDTYPE; + +typedef struct _LINECONTROL { /* lnctl */ + BYTE bDataBits; + BYTE bParity; + BYTE bStopBits; + BYTE fTransBreak; +} LINECONTROL; +typedef LINECONTROL FAR *PLINECONTROL; + +/* MODEMSTATUS.fbModemOn, ASYNC_GETMODEMOUTPUT */ + +#define DTR_ON 0x01 +#define RTS_ON 0x02 + +/* MODEMSTATUS.fbModemOff */ + +#define DTR_OFF 0xFE +#define RTS_OFF 0xFD + +typedef struct _MODEMSTATUS { /* mdmst */ + BYTE fbModemOn; + BYTE fbModemOff; +} MODEMSTATUS; +typedef MODEMSTATUS FAR *PMODEMSTATUS; + +typedef struct _TRACKFORMAT { /* trckfmt */ + BYTE bCommand; + USHORT usHead; + USHORT usCylinder; + USHORT usReserved; + USHORT cSectors; + struct { + BYTE bCylinder; + BYTE bHead; + BYTE idSector; + BYTE bBytesSector; + } FormatTable[1]; +} TRACKFORMAT; +typedef TRACKFORMAT FAR *PTRACKFORMAT; + +typedef struct _RXQUEUE { /* rxq */ + USHORT cch; + USHORT cb; +} RXQUEUE; +typedef RXQUEUE FAR *PRXQUEUE; + +typedef struct _DEVICEPARAMETERBLOCK { /* dvpblck */ + USHORT reserved1; + USHORT cCylinders; + USHORT cHeads; + USHORT cSectorsPerTrack; + USHORT reserved2; + USHORT reserved3; + USHORT reserved4; + USHORT reserved5; +} DEVICEPARAMETERBLOCK; +typedef DEVICEPARAMETERBLOCK FAR *PDEVICEPARAMETERBLOCK; + +typedef struct _PTRDRAWFUNCTION { /* ptrdfnc */ + USHORT usReturnCode; + PFN pfnDraw; + PCH pchDataSeg; +} PTRDRAWFUNCTION; +typedef PTRDRAWFUNCTION FAR *PPTRDRAWFUNCTION; + +typedef struct _PTRDRAWADDRESS { /* ptrdaddr */ + USHORT reserved; + PTRDRAWFUNCTION ptrdfnc; +} PTRDRAWADDRESS; +typedef PTRDRAWADDRESS FAR *PPTRDRAWADDRESS; + +typedef struct _SHIFTSTATE { /* shftst */ + USHORT fsState; + BYTE fNLS; +} SHIFTSTATE; +typedef SHIFTSTATE FAR *PSHIFTSTATE; + +/* HOTKEY.fsHotKey/SHIFTSTATE.fsState */ + +#define RIGHTSHIFT 0x0001 +#define LEFTSHIFT 0x0002 +#define CONTROL 0x0004 +#define ALT 0x0008 +#define SCROLLLOCK_ON 0x0010 +#define NUMLOCK_ON 0x0020 +#define CAPSLOCK_ON 0x0040 +#define INSERT_ON 0x0080 +#define LEFTCONTROL 0x0100 +#define LEFTALT 0x0200 +#define RIGHTCONTROL 0x0400 +#define RIGHTALT 0x0800 +#define SCROLLLOCK 0x1000 +#define NUMLOCK 0x2000 +#define CAPSLOCK 0x4000 +#define SYSREQ 0x8000 + +typedef struct _HOTKEY { /* htky */ + USHORT fsHotKey; + UCHAR uchScancodeMake; + UCHAR uchScancodeBreak; + USHORT idHotKey; +} HOTKEY; +typedef HOTKEY FAR *PHOTKEY; + +typedef struct _MONITORPOSITION { /* mnpos */ + USHORT fPosition; + USHORT index; + ULONG pbInBuf; + USHORT offOutBuf; +} MONITORPOSITION; +typedef MONITORPOSITION FAR *PMONITORPOSITION; + +typedef struct _RATEDELAY { /* rtdly */ + USHORT usDelay; + USHORT usRate; +} RATEDELAY; +typedef RATEDELAY FAR *PRATEDELAY; + +typedef struct _CODEPAGEINFO { /* cpi */ + PBYTE pbTransTable; + USHORT idCodePage; + USHORT idTable; +} CODEPAGEINFO; +typedef FAR *PCODEPAGEINFO; + +typedef struct _CPID { /* cpid */ + USHORT idCodePage; + USHORT Reserved; +} CPID; +typedef FAR *PCPID; + +typedef struct _LDTADDRINFO { /* ldtaddr */ + PULONG pulPhysAddr; + USHORT cb; +} LDTADDRINFO; +typedef FAR *PLDTADDRINFO; + +typedef struct _PTRDRAWDATA { /* ptrdd */ + USHORT cb; + USHORT usConfig; + USHORT usFlag; +} PTRDRAWDATA; +typedef FAR *PPTRDRAWDATA; diff --git a/private/oleauto/tools/win16/os2/inc/bsedos.h b/private/oleauto/tools/win16/os2/inc/bsedos.h new file mode 100644 index 000000000..3bf9ace73 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bsedos.h @@ -0,0 +1,1425 @@ +/***************************************************************************\ +* +* Module Name: BSEDOS.H +* +* OS/2 Base Include File +* +* Copyright (c) International Business Machines Corporation 1987 +* Copyright (c) Microsoft Corporation 1987 +* +* ======================================================================= +* +* Subcomponents marked with "+" are partially included by default +* +* #define: To include: +* +* + INCL_DOSPROCESS Process and thread support +* INCL_DOSINFOSEG InfoSeg support +* + INCL_DOSFILEMGR File Management +* + INCL_DOSMEMMGR Memory Management +* + INCL_DOSSEMAPHORES Semaphore support +* + INCL_DOSDATETIME Date/Time and Timer support +* INCL_DOSMODULEMGR Module manager +* + INCL_DOSRESOURCES Resource support +* INCL_DOSNLS National Language Support +* INCL_DOSSIGNALS Signals +* INCL_DOSMISC Miscellaneous +* INCL_DOSMONITORS Monitors +* INCL_DOSQUEUES Queues +* INCL_DOSSESMGR Session Manager Support +* INCL_DOSDEVICES Device specific, ring 2 support +* INCL_DOSNMPIPES Named Pipes Support +* INCL_DOSPROFILE DosProfile API +* +\***************************************************************************/ + +#define INCL_DOSINCLUDED + +#ifdef INCL_DOS + +#define INCL_DOSPROCESS +#define INCL_DOSINFOSEG +#define INCL_DOSFILEMGR +#define INCL_DOSMEMMGR +#define INCL_DOSSEMAPHORES +#define INCL_DOSDATETIME +#define INCL_DOSMODULEMGR +#define INCL_DOSRESOURCES +#define INCL_DOSNLS +#define INCL_DOSSIGNALS +#define INCL_DOSMISC +#define INCL_DOSMONITORS +#define INCL_DOSQUEUES +#define INCL_DOSSESMGR +#define INCL_DOSDEVICES +#define INCL_DOSNMPIPES +#define INCL_DOSPROFILE + +#endif /* INCL_DOS */ + +#ifdef INCL_ERRORS +#define INCL_DOSERRORS +#endif /* INCL_ERRORS */ + +#if (defined(INCL_DOSPROCESS) || !defined(INCL_NOCOMMON)) + +/*** General services */ + +USHORT APIENTRY DosBeep(USHORT usFrequency, USHORT usDuration); + +/*** Process and Thread support */ + +VOID APIENTRY DosExit(USHORT fTerminate, USHORT usExitCode); + +/* DosExit codes */ +#define EXIT_THREAD 0 +#define EXIT_PROCESS 1 + +#endif /* common INCL_DOSPROCESS definitions */ + +#ifdef INCL_DOSPROCESS + +typedef struct _PIDINFO { /* pidi */ + PID pid; + TID tid; + PID pidParent; +} PIDINFO; +typedef PIDINFO FAR *PPIDINFO; + +typedef VOID (FAR *PFNTHREAD)(VOID); + +USHORT APIENTRY DosCreateThread(PFNTHREAD pfnFun, PTID pTid, PBYTE pbStack); +USHORT APIENTRY DosResumeThread(TID tid); +USHORT APIENTRY DosSuspendThread(TID tid); + +/* Action code values */ +#define DCWA_PROCESS 0 +#define DCWA_PROCESSTREE 1 + +/* Wait option values */ +#define DCWW_WAIT 0 +#define DCWW_NOWAIT 1 + +typedef struct _RESULTCODES { /* resc */ + USHORT codeTerminate; + USHORT codeResult; +} RESULTCODES; +typedef RESULTCODES FAR *PRESULTCODES; + +USHORT APIENTRY DosCwait(USHORT fScope, USHORT fWait, PRESULTCODES prescResults, + PPID ppidProcess, PID pidWaitProcess); +USHORT APIENTRY DosSleep(ULONG ulTime); + +/* codeTerminate values (also passed to ExitList routines) */ +#define TC_EXIT 0 +#define TC_HARDERROR 1 +#define TC_TRAP 2 +#define TC_KILLPROCESS 3 + +typedef VOID (PASCAL FAR *PFNEXITLIST)(USHORT); + +USHORT APIENTRY DosEnterCritSec(VOID); +USHORT APIENTRY DosExitCritSec(VOID); +USHORT APIENTRY DosExitList(USHORT fFnCode, PFNEXITLIST pfnFunction); + +/* DosExitList functions */ +#define EXLST_ADD 1 +#define EXLST_REMOVE 2 +#define EXLST_EXIT 3 + +USHORT APIENTRY DosExecPgm(PCHAR pchFailName, SHORT cbFailName, + USHORT fExecFlags, PSZ pszArgs, PSZ pszEnv, + PRESULTCODES prescResults, PSZ pszPgmName); + +/* DosExecPgm functions */ +#define EXEC_SYNC 0 +#define EXEC_ASYNC 1 +#define EXEC_ASYNCRESULT 2 +#define EXEC_TRACE 3 +#define EXEC_BACKGROUND 4 +#define EXEC_LOAD 5 + +USHORT APIENTRY DosGetPID(PPIDINFO ppidInfo); +USHORT APIENTRY DosGetPPID(USHORT pidChild, PUSHORT ppidParent); + +USHORT APIENTRY DosGetPrty(USHORT usScope, PUSHORT pusPriority, USHORT pid); +USHORT APIENTRY DosSetPrty(USHORT usScope, USHORT fPrtyClass, SHORT sChange, + USHORT id); + +/* Priority scopes */ +#define PRTYS_PROCESS 0 +#define PRTYS_PROCESSTREE 1 +#define PRTYS_THREAD 2 + +/* Priority classes */ +#define PRTYC_NOCHANGE 0 +#define PRTYC_IDLETIME 1 +#define PRTYC_REGULAR 2 +#define PRTYC_TIMECRITICAL 3 +#define PRTYC_FOREGROUNDSERVER 4 + +/* Priority deltas */ +#define PRTYD_MINIMUM -31 +#define PRTYD_MAXIMUM 31 + +USHORT APIENTRY DosKillProcess(USHORT usScope, PID pidProcess); + +#define DKP_PROCESSTREE 0 +#define DKP_PROCESS 1 + +#endif /* INCL_DOSPROCESS */ + + +/*** InfoSeg support */ + +#ifdef INCL_DOSINFOSEG + +/* Global Information Segment */ + +typedef struct _GINFOSEG { /* gis */ + ULONG time; + ULONG msecs; + UCHAR hour; + UCHAR minutes; + UCHAR seconds; + UCHAR hundredths; + USHORT timezone; + USHORT cusecTimerInterval; + UCHAR day; + UCHAR month; + USHORT year; + UCHAR weekday; + UCHAR uchMajorVersion; + UCHAR uchMinorVersion; + UCHAR chRevisionLetter; + UCHAR sgCurrent; + UCHAR sgMax; + UCHAR cHugeShift; + UCHAR fProtectModeOnly; + USHORT pidForeground; + UCHAR fDynamicSched; + UCHAR csecMaxWait; + USHORT cmsecMinSlice; + USHORT cmsecMaxSlice; + USHORT bootdrive; + UCHAR amecRAS[32]; + UCHAR csgWindowableVioMax; + UCHAR csgPMMax; +} GINFOSEG; +typedef GINFOSEG FAR *PGINFOSEG; + +/* Local Information Segment */ + +typedef struct _LINFOSEG { /* lis */ + PID pidCurrent; + PID pidParent; + USHORT prtyCurrent; + TID tidCurrent; + USHORT sgCurrent; + UCHAR rfProcStatus; + UCHAR dummy1; + BOOL fForeground; + UCHAR typeProcess; + UCHAR dummy2; + SEL selEnvironment; + USHORT offCmdLine; + USHORT cbDataSegment; + USHORT cbStack; + USHORT cbHeap; + HMODULE hmod; + SEL selDS; +} LINFOSEG; +typedef LINFOSEG FAR *PLINFOSEG; + +/* Process Type codes (local information segment typeProcess field) */ + +#define PT_FULLSCREEN 0 /* Full screen application */ +#define PT_REALMODE 1 /* Real mode process */ +#define PT_WINDOWABLEVIO 2 /* VIO windowable application */ +#define PT_PM 3 /* Presentation Manager application */ +#define PT_DETACHED 4 /* Detached application */ + +/* Process Status Flag definitions (local info seg rfProcStatus field) */ + +#define PS_EXITLIST 1 /* Thread is in exitlist routine */ + + +USHORT APIENTRY DosGetInfoSeg(PSEL pselGlobal, PSEL pselLocal); + +/* Helper macros used to convert selector to PINFOSEG or LINFOSEG */ + +#define MAKEPGINFOSEG(sel) ((PGINFOSEG)MAKEP(sel, 0)) +#define MAKEPLINFOSEG(sel) ((PLINFOSEG)MAKEP(sel, 0)) + +#endif /* INCL_DOSINFOSEG */ + +#ifndef INCL_SAADEFS + +/* + * CCHMAXPATH is the maximum fully qualified path name length including + * the drive letter, colon, backslashes and terminating NULL. + */ +#define CCHMAXPATH 260 + +/* + * CCHMAXPATHCOMP is the maximum individual path component name length + * including a terminating NULL. + */ +#define CCHMAXPATHCOMP 256 + +#endif /* !INCL_SAADEFS */ + +#if (defined(INCL_DOSFILEMGR) || !defined(INCL_NOCOMMON)) + +/*** File manager */ + +/* DosSetFilePtr() file position codes */ + +#define FILE_BEGIN 0x0000 /* relative to beginning of file */ +#define FILE_CURRENT 0x0001 /* relative to current fptr position*/ +#define FILE_END 0x0002 /* relative to end of file */ + +/* DosFindFirst/Next Directory handle types */ + +#define HDIR_SYSTEM 0x0001 /* Use system handle (1) */ +#define HDIR_CREATE 0xFFFF /* Allocate a new, unused handle */ + +/* DosCopy control bits - may be or'ed together */ +#define DCPY_EXISTING 0x00001 /* Copy even if target exists */ +#define DCPY_APPEND 0x00002 /* Append to existing file, don't replace*/ + +/* Dosopen/DosQFHandState/DosQueryFileInfo et al file attributes; also */ +/* known as Dso File Mode bits... */ +#define FILE_NORMAL 0x0000 +#define FILE_READONLY 0x0001 +#define FILE_HIDDEN 0x0002 +#define FILE_SYSTEM 0x0004 +#define FILE_DIRECTORY 0x0010 +#define FILE_ARCHIVED 0x0020 + +/* DosOpen() actions */ +#define FILE_EXISTED 0x0001 +#define FILE_CREATED 0x0002 +#define FILE_TRUNCATED 0x0003 + +/* DosOpen() open flags */ +#define FILE_OPEN 0x0001 +#define FILE_TRUNCATE 0x0002 +#define FILE_CREATE 0x0010 + +/* applies if file already exists */ + +#define OPEN_ACTION_FAIL_IF_EXISTS 0x0000 /* ---- ---- ---- 0000 */ +#define OPEN_ACTION_OPEN_IF_EXISTS 0x0001 /* ---- ---- ---- 0001 */ +#define OPEN_ACTION_REPLACE_IF_EXISTS 0x0002 /* ---- ---- ---- 0010 */ + +/* applies if file does not exist */ + +#define OPEN_ACTION_FAIL_IF_NEW 0x0000 /* ---- ---- 0000 ---- */ +#define OPEN_ACTION_CREATE_IF_NEW 0x0010 /* ---- ---- 0001 ---- */ + +/* DosOpen/DosSetFHandState flags */ + +#define OPEN_ACCESS_READONLY 0x0000 /* ---- ---- ---- -000 */ +#define OPEN_ACCESS_WRITEONLY 0x0001 /* ---- ---- ---- -001 */ +#define OPEN_ACCESS_READWRITE 0x0002 /* ---- ---- ---- -010 */ +#define OPEN_SHARE_DENYREADWRITE 0x0010 /* ---- ---- -001 ---- */ +#define OPEN_SHARE_DENYWRITE 0x0020 /* ---- ---- -010 ---- */ +#define OPEN_SHARE_DENYREAD 0x0030 /* ---- ---- -011 ---- */ +#define OPEN_SHARE_DENYNONE 0x0040 /* ---- ---- -100 ---- */ +#define OPEN_FLAGS_NOINHERIT 0x0080 /* ---- ---- 1--- ---- */ +#define OPEN_FLAGS_NO_LOCALITY 0x0000 /* ---- -000 ---- ---- */ +#define OPEN_FLAGS_SEQUENTIAL 0x0100 /* ---- -001 ---- ---- */ +#define OPEN_FLAGS_RANDOM 0x0200 /* ---- -010 ---- ---- */ +#define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300 /* ---- -011 ---- ---- */ +#define OPEN_FLAGS_NO_CACHE 0x1000 /* ---1 ---- ---- ---- */ +#define OPEN_FLAGS_FAIL_ON_ERROR 0x2000 /* --1- ---- ---- ---- */ +#define OPEN_FLAGS_WRITE_THROUGH 0x4000 /* -1-- ---- ---- ---- */ +#define OPEN_FLAGS_DASD 0x8000 /* 1--- ---- ---- ---- */ + + +/* DosSearchPath() constants */ + +#define SEARCH_PATH 0x0000 +#define SEARCH_CUR_DIRECTORY 0x0001 +#define SEARCH_ENVIRONMENT 0x0002 +#define SEARCH_IGNORENETERRS 0x0004 + +/* + * DosFileIO + */ +/* File IO command words */ +#define FIO_LOCK 0 /* Lock Files */ +#define FIO_UNLOCK 1 /* Unlock Files */ +#define FIO_SEEK 2 /* Seek (set file ptr) */ +#define FIO_READ 3 /* File Read */ +#define FIO_WRITE 4 /* File Write */ + +/* Lock Sharing Modes */ +#define FIO_NOSHARE 0 /* None */ +#define FIO_SHAREREAD 1 /* Read-Only */ + +typedef struct _FIOLOCKCMD { /* FLC FileLockCmd prefix */ + USHORT usCmd; /* Cmd = FIO_LOCK */ + USHORT cLockCnt; /* Lock records that follow */ + ULONG cTimeOut; /* in Msec */ +} FIOLOCKCMD; +typedef FIOLOCKCMD FAR *PFIOLOCKCMD; + + +typedef struct _FIOLOCKREC { /* FLR FileLockRecord */ + USHORT fShare; /* FIO_NOSHARE or FIO_SHAREREAD */ + ULONG cbStart; /* Starting offset for lock region */ + ULONG cbLength; /* Length of lock region */ +} FIOLOCKREC; +typedef FIOLOCKREC FAR *PFIOLOCKREC; + + +typedef struct _FIOUNLOCKCMD { /* FUC FileUnlockCmd prefix */ + USHORT usCmd; /* Cmd = FIO_UNLOCK */ + USHORT cUnlockCnt; /* Unlock records that follow */ +} FIOUNLOCKCMD; +typedef FIOUNLOCKCMD FAR *PFIOUNLOCKCMD; + + +typedef struct _FIOUNLOCKREC { /* FUR FileUnlockRecord */ + ULONG cbStart; /* Starting offset for unlock region */ + ULONG cbLength; /* Length of unlock region */ +} FIOUNLOCKREC; +typedef FIOUNLOCKREC FAR *PFIOUNLOCKREC; + + +typedef struct _FIOSEEKCMD { /* Seek command structure */ + USHORT usCmd; /* Cmd = FIO_SEEK */ + USHORT fsMethod; /* One of&gml FPM_BEGINNING, FPM_CURRENT, */ + /* or FPM_END */ + ULONG cbDistance; /* Byte offset for seek */ + ULONG cbNewPosition; /* Bytes from start of file after seek */ +} FIOSEEKCMD; +typedef FIOSEEKCMD FAR *PFIOSEEKCMD; + + +typedef struct _FIOREADWRITE { /* RWC Read&Write command structure */ + USHORT usCmd; /* Cmd = FIO_READ or FIO_WRITE */ + PVOID pbBuffer; /* Pointer to data buffer */ + USHORT cbBufferLen; /* Bytes in buffer or max size */ + USHORT cbActualLen; /* Bytes actually read/written */ +} FIOREADWRITE; +typedef FIOREADWRITE FAR *PFIOREADWRITE; + + +/*** + * EA Info Levels & Find First/Next + * API's: DosFindFirst, DosQueryFileInfo, DosQueryPathInfo, DosSetFileInfo, + * DosSetPathInfo + */ + +/* File info levels : All listed API's */ +#define FIL_STANDARD 1 /* Info level 1, standard file info */ +#define FIL_QUERYEASIZE 2 /* Level 2, return Full EA size */ +#define FIL_QUERYEASFROMLIST 3 /* Level 3, return requested EA's */ + +/* File info levels: Dos...PathInfo only */ +#define FIL_QUERYFULLNAME 5 /* Level 5, return fully qualified */ + /* name of file */ +#define FIL_NAMEISVALID 6 /* Level 6, check validity of */ + /* file/path name for this FSD */ + +/* DosFindNotifyFirst() */ +#define FNOTIL_STANDARD 1 /* Find-Notify Info level 1&gml Return */ + /* standard directory change info */ + +/* DosFsAttach() */ +/* Attact or detach */ +#define FSATTACH 0 /* Attach file server */ +#define FSDETACH 1 /* Detach file server */ + +/* DosFsCtl() */ +/* Routing type */ +#define FSCTL_HANDLE 1 /* File Handle directs req routing */ +#define FSCTL_PATHNAME 2 /* Path Name directs req routing */ +#define FSCTL_FSDNAME 3 /* FSD Name directs req routing */ + +/* DosQueryFSAttach() */ +/* Information level types (defines method of query) */ +#define FSAIL_QUERYNAME 1 /* Return data for a Drive or Device */ +#define FSAIL_DEVNUMBER 2 /* Return data for Ordinal Device # */ +#define FSAIL_DRVNUMBER 3 /* Return data for Ordinal Drive # */ + +/* Item types (from data structure item "iType") */ +#define FSAT_CHARDEV 1 /* Resident character device */ +#define FSAT_PSEUDODEV 2 /* Pusedu-character device */ +#define FSAT_LOCALDRV 3 /* Local drive */ +#define FSAT_REMOTEDRV 4 /* Remote drive attached to FSD */ + +typedef struct _FSQBUFFER { /* Data structure for QFSAttach */ + USHORT iType; /* Item type */ + USHORT cbName; /* Length of item name, sans NULL */ + UCHAR szName[1]; /* ASCIIZ item name */ + USHORT cbFSDName; /* Length of FSD name, sans NULL */ + UCHAR szFSDName[1]; /* ASCIIZ FSD name */ + USHORT cbFSAData; /* Length of FSD Attach data returned */ + UCHAR rgFSAData[1]; /* FSD Attach data from FSD */ +} FSQBUFFER; +typedef FSQBUFFER FAR *PFSQBUFFER; + +/* + * File System Drive Information&gml DosQueryFSInfo DosSetFSInfo + */ + +/* FS Drive Info Levels */ +#define FSIL_ALLOC 1 /* Drive allocation info (Query only) */ +#define FSIL_VOLSER 2 /* Drive Volume/Serial information */ + +/* DosQueryFHType() */ +/* Handle classes (low 8 bits of Handle Type) */ +#define FHT_DISKFILE 0x0000 /* Disk file handle */ +#define FHT_CHRDEV 0x0001 /* Character device handle */ +#define FHT_PIPE 0x0002 /* Pipe handle */ + +/* Handle bits (high 8 bits of Handle Type) */ +#define FHB_DSKREMOTE 0x8000 /* Remote disk */ +#define FHB_CHRDEVREMOTE 0x8000 /* Remote character device */ +#define FHB_PIPEREMOTE 0x8000 /* Remote pipe */ + + +typedef SHANDLE HFILE; /* hf */ +typedef HFILE FAR *PHFILE; + +#ifndef INCL_SAADEFS + +/* File time and date types */ + +typedef struct _FTIME { /* ftime */ + unsigned twosecs : 5; + unsigned minutes : 6; + unsigned hours : 5; +} FTIME; +typedef FTIME FAR *PFTIME; + +typedef struct _FDATE { /* fdate */ + unsigned day : 5; + unsigned month : 4; + unsigned year : 7; +} FDATE; +typedef FDATE FAR *PFDATE; + +typedef struct _FILEFINDBUF { /* findbuf */ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF; +typedef FILEFINDBUF FAR *PFILEFINDBUF; + +typedef struct _FILEFINDBUF2 { /* findbuf2 */ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + ULONG cbList; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF2; +typedef FILEFINDBUF2 FAR *PFILEFINDBUF2; + +/* extended attribute structures */ +typedef struct _GEA { /* gea */ + BYTE cbName; /* name length not including NULL */ + CHAR szName[1]; /* attribute name */ +} GEA; +typedef GEA far *PGEA; + +typedef struct _GEALIST { /* geal */ + ULONG cbList; /* total bytes of structure inc full list */ + GEA list[1]; /* variable length GEA structures */ +} GEALIST; +typedef GEALIST far * PGEALIST; + +typedef struct _FEA { /* fea */ + BYTE fEA; /* flags */ + BYTE cbName; /* name length not including NULL */ + USHORT cbValue; /* value length */ +} FEA; +typedef FEA far *PFEA; + +/* flags for _FEA.fEA */ + +#define FEA_NEEDEA 0x80 /* need EA bit */ + +typedef struct _FEALIST { /* feal */ + ULONG cbList; /* total bytes of structure inc full list */ + FEA list[1]; /* variable length FEA structures */ +} FEALIST; +typedef FEALIST far * PFEALIST; + +typedef struct _EAOP { /* eaop */ + PGEALIST fpGEAList; /* general EA list */ + PFEALIST fpFEAList; /* full EA list */ + ULONG oError; +} EAOP; +typedef EAOP far * PEAOP; + + +/* + * Equates for EA types + * + * Values 0xFFFE thru 0x8000 are reserved. + * Values 0x0000 thru 0x7fff are user definable. + * Value 0xFFFC is not used + */ + +#define EAT_BINARY 0xFFFE /* length preceeded binary */ +#define EAT_ASCII 0xFFFD /* length preceeded ASCII */ +#define EAT_BITMAP 0xFFFB /* length preceeded bitmap */ +#define EAT_METAFILE 0xFFFA /* length preceeded metafile */ +#define EAT_ICON 0xFFF9 /* length preceeded icon */ +#define EAT_EA 0xFFEE /* length preceeded ASCII extended attribute */ + /* name of associated data (#include)*/ +#define EAT_MVMT 0xFFDF /* multi-valued, multi-typed field */ +#define EAT_MVST 0xFFDE /* multi-valued, single-typed field */ +#define EAT_ASN1 0xFFDD /* ASN.1 field */ + + +#endif /* !INCL_SAADEFS */ + +USHORT APIENTRY DosOpen(PSZ pszFname, PHFILE phfOpen, PUSHORT pusAction, + ULONG ulFSize, USHORT usAttr, USHORT fsOpenFlags, + USHORT fsOpenMode, ULONG ulReserved); +USHORT APIENTRY DosOpen2(PSZ pszFname, PHFILE phf, PUSHORT pusAction, + ULONG ulFSize, USHORT usAttr, USHORT usOpenFlags, + ULONG usOpenMode, PEAOP pvEABuf, ULONG ulReserved); +USHORT APIENTRY DosClose(HFILE hf); +USHORT APIENTRY DosRead(HFILE hf, PVOID pBuf, USHORT cbBuf, + PUSHORT pcbBytesRead); +USHORT APIENTRY DosWrite(HFILE hf, PVOID bBuf, USHORT cbBuf, + PUSHORT pcbBytesWritten); +USHORT APIENTRY DosOplockRelease(ULONG cookie, USHORT procBlkKey); +USHORT APIENTRY DosOplockWait(PULONG pcookie, PULONG procBlkKey); + +/* File system shutdown */ + +USHORT APIENTRY DosShutdown(ULONG ulReserved); + +/* File time and date types */ + +typedef struct _FILESTATUS { /* fsts */ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; +} FILESTATUS; +typedef FILESTATUS FAR *PFILESTATUS; + +typedef struct _FILESTATUS2 { /* fsts2 */ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + ULONG cbList; +} FILESTATUS2; +typedef FILESTATUS2 FAR *PFILESTATUS2; + +typedef struct _FSALLOCATE { /* fsalloc */ + ULONG idFileSystem; + ULONG cSectorUnit; + ULONG cUnit; + ULONG cUnitAvail; + USHORT cbSector; +} FSALLOCATE; +typedef FSALLOCATE FAR *PFSALLOCATE; + +typedef struct _VOLUMELABEL { /* vol */ + BYTE cch; + CHAR szVolLabel[12]; +} VOLUMELABEL; +typedef VOLUMELABEL FAR *PVOLUMELABEL; + +typedef struct _FSINFO { /* fsinf */ + FDATE fdateCreation; + FTIME ftimeCreation; + VOLUMELABEL vol; +} FSINFO; +typedef FSINFO FAR *PFSINFO; + +/* HANDTYPE values */ + +#define HANDTYPE_FILE 0x0000 +#define HANDTYPE_DEVICE 0x0001 +#define HANDTYPE_PIPE 0x0002 +#define HANDTYPE_NETWORK 0x8000 + +typedef struct _FILELOCK { /* flock */ + LONG lOffset; + LONG lRange; +} FILELOCK; +typedef FILELOCK FAR *PFILELOCK; + +typedef SHANDLE HDIR; /* hdir */ +typedef HDIR FAR *PHDIR; + +USHORT APIENTRY DosDelete(PSZ pszFName, ULONG ulReserverd); +USHORT APIENTRY DosDupHandle(HFILE hfOld, PHFILE phfNew); + +USHORT APIENTRY DosQFHandState(HFILE hf, PUSHORT pfsOpenMode); +USHORT APIENTRY DosSetFHandState(HFILE hf, USHORT fsState); +USHORT APIENTRY DosQHandType(HFILE hf, PUSHORT pfsType, PUSHORT pusDevAttr); + +USHORT APIENTRY DosReadAsync (HFILE hf, PULONG hsemRam, PUSHORT pusErrCode, + PVOID pBuf, USHORT cbBuf, PUSHORT pcbBytesRead); +USHORT APIENTRY DosWriteAsync(HFILE hf, PULONG hsemRam, PUSHORT pusErrCode, + PVOID pBuf, USHORT cbBuf, PUSHORT pcbBytesWritten); + +USHORT APIENTRY DosFindFirst(PSZ pszFSpec, PHDIR phdir, USHORT usAttr, + PFILEFINDBUF pffb, USHORT cbBuf, PUSHORT pcSearch, + ULONG ulReserved); +USHORT APIENTRY DosFindFirst2(PSZ pszFSpec, PHDIR phdir, USHORT usAttr, + PVOID pBuf, USHORT cbBuf, PUSHORT pcSearch, + USHORT usInfoLevel, ULONG ulReserved); +USHORT APIENTRY DosFindNext(HDIR hdir, PFILEFINDBUF pffb, USHORT cbBuf, + PUSHORT pcSearch); +USHORT APIENTRY DosFindClose(HDIR hdir); +USHORT APIENTRY DosFindNotifyFirst(PSZ pszPath, PHDIR hdir, USHORT usAttr, + PBYTE pBuf, USHORT cbBuf, PUSHORT pcChg, + USHORT usInfoLevel, ULONG ulTimeOut, + ULONG ulReserved); +USHORT APIENTRY DosFindNotifyNext(HDIR hDir, PVOID pBuf, USHORT cbBuf, + PUSHORT pcChg, ULONG ulTimeOut); +USHORT APIENTRY DosFindNotifyClose(HDIR hDir); + +USHORT APIENTRY DosFSAttach(PSZ pszDevName, PSZ pszFSD, PBYTE pData, + USHORT cbData, USHORT fsOp, ULONG ulReserved); +USHORT APIENTRY DosQFSAttach(PSZ pszDev, USHORT usOrdinal, USHORT usInfoLevel, + PBYTE pFSAttBuf, PUSHORT cbBuf, ULONG ulReserved); +USHORT APIENTRY DosFSCtl(PBYTE pData, USHORT cbData, PUSHORT pcbData, + PBYTE pParms, USHORT cbParms, PUSHORT pcbParms, + USHORT usFunCode, PSZ pszRoute, HFILE hf, + USHORT usRouteMethod, ULONG ulReserved); + +USHORT APIENTRY DosNewSize(HFILE hf, ULONG ulNewSize); +USHORT APIENTRY DosBufReset(HFILE hf); + +USHORT APIENTRY DosChgFilePtr(HFILE hf, LONG lOffset, USHORT fsMethod, + PULONG pulNewOffset); + +USHORT APIENTRY DosSetFilePtr(HFILE hf, LONG lOffset, USHORT fsMethod, + PULONG pulNewOffset); + +USHORT APIENTRY DosFileLocks(HFILE hf, PFILELOCK pUnlock, PFILELOCK pLock); + +USHORT APIENTRY DosMove(PSZ pszOld, PSZ pszNew, ULONG ulReserved); +USHORT APIENTRY DosCopy(PSZ pszSrc, PSZ pszDst, USHORT usOpt, ULONG ulReserved); +USHORT APIENTRY DosEditName(USHORT usEditLevel, PSZ pszSrc, PSZ pszEdit, + PBYTE pszDst, USHORT cbDst); + +USHORT APIENTRY DosFileIO(HFILE hf, PBYTE pbCmd, USHORT cbCmd, PUSHORT pulErr); +USHORT APIENTRY DosMkDir(PSZ pszDirName, ULONG usReserved); +USHORT APIENTRY DosMkDir2(PSZ pszDir, PEAOP pBuf, ULONG ulReserved); +USHORT APIENTRY DosRmDir(PSZ pszDir, ULONG ulReserved); +USHORT APIENTRY DosSelectDisk(USHORT usDrvNum); +USHORT APIENTRY DosQCurDisk(PUSHORT pusDrvNum, PULONG pulLogDrvMap); + +USHORT APIENTRY DosChDir(PSZ pszDir, ULONG ulReserved); +USHORT APIENTRY DosQCurDir(USHORT usDrvNum, PBYTE pszPathBuf, + PUSHORT pcbPathBuf); + +USHORT APIENTRY DosQFSInfo(USHORT usDrvNum, USHORT usInfoLevel, PBYTE pbInfo, + USHORT cbInfo); +USHORT APIENTRY DosSetFSInfo(USHORT usDrvNum, USHORT usInfoLevel, PBYTE pBuf, + USHORT cbBuf); +USHORT APIENTRY DosQVerify(PUSHORT pfVerifyOn); +USHORT APIENTRY DosSetVerify(USHORT fVerify); +USHORT APIENTRY DosSetMaxFH(USHORT usHandles); + +USHORT APIENTRY DosQFileInfo(HFILE hf, USHORT usInfoLevel, PBYTE pInfoBuf, + USHORT cbInfoBuf); +USHORT APIENTRY DosSetFileInfo(HFILE hf, USHORT usInfoLevel, PBYTE pInfoBuf, + USHORT cbInfoBuf); +USHORT APIENTRY DosQPathInfo(PSZ pszPath, USHORT usInfoLevel, PBYTE pInfoBuf, + USHORT cbInfoBuf, ULONG ulReserved); +USHORT APIENTRY DosSetPathInfo(PSZ pszPath, USHORT usInfoLevel, PBYTE pInfoBuf, + USHORT cbInfoBuf, USHORT usFlags, + ULONG ulReserved); + +/* defines for dossetpathinfo -pathinfo flag */ +#define DSPI_WRTTHRU 0x10 /* write through */ + +USHORT APIENTRY DosQFileMode(PSZ pszFName, PUSHORT pusAttr, ULONG ulReserved); +USHORT APIENTRY DosSetFileMode(PSZ pszFName, USHORT usAttr, ULONG ulReserved); + +USHORT APIENTRY DosEnumAttribute(USHORT, PVOID, ULONG, PVOID, ULONG, PULONG, + ULONG, ULONG); + +typedef struct _DENA1 { /* level 1 info returned from DosEnumAttribute */ + UCHAR reserved; /* 0 */ + UCHAR cbName; /* length of name exculding NULL */ + USHORT cbValue; /* length of value */ + UCHAR szName[1]; /* variable length asciiz name */ +} DENA1; +typedef DENA1 FAR *PDENA1; + +#endif /* common INCL_DOSFILEMGR */ + +#if (defined(INCL_DOSMEMMGR) || !defined(INCL_NOCOMMON)) +/*** Memory management */ + +USHORT APIENTRY DosAllocSeg(USHORT cbSize, PSEL pSel, USHORT fsAlloc); +USHORT APIENTRY DosReallocSeg(USHORT cbNewSize, SEL sel); +USHORT APIENTRY DosFreeSeg(SEL sel); +USHORT APIENTRY DosGiveSeg(SEL sel, PID pid, PSEL pSelRecipient); +USHORT APIENTRY DosGetSeg(SEL sel); +USHORT APIENTRY DosSizeSeg(SEL sel, PULONG pcbSize); + +/* Segment attribute flags (used with DosAllocSeg) */ + +#define SEG_NONSHARED 0x0000 +#define SEG_GIVEABLE 0x0001 +#define SEG_GETTABLE 0x0002 +#define SEG_DISCARDABLE 0x0004 + +#endif /* common INCL_DOSMEMMGR */ + +#ifdef INCL_DOSMEMMGR + +USHORT APIENTRY DosAllocHuge(USHORT cSegs, USHORT cbPartialSeg, PSEL psel, + USHORT cMaxSegs, USHORT fsAlloc); +USHORT APIENTRY DosReallocHuge(USHORT cSegs, USHORT cbPartialSeg, SEL sel); +USHORT APIENTRY DosGetHugeShift(PUSHORT pusShiftCount); + +USHORT APIENTRY DosAllocShrSeg(USHORT cbSeg, PSZ pszSegName, PSEL psel); + +USHORT APIENTRY DosLockSeg(SEL sel); +USHORT APIENTRY DosUnlockSeg(SEL sel); + +USHORT APIENTRY DosGetShrSeg(PSZ pszSegName, PSEL psel); + +USHORT APIENTRY DosMemAvail(PULONG pcbFree); +USHORT APIENTRY DosCreateCSAlias(SEL selDS, PSEL pselCS); + +USHORT APIENTRY DosSubAlloc(SEL sel, PUSHORT pusOffset, USHORT cb); +USHORT APIENTRY DosSubFree(SEL sel, USHORT offBlock, USHORT cb); +USHORT APIENTRY DosSubSet(SEL sel, USHORT fFlags, USHORT cbNew); + +#endif /* INCL_DOSMEMMGR */ + +#if (defined(INCL_DOSSEMAPHORES) || !defined(INCL_NOCOMMON)) + +/*** Semaphore support */ + +#define SEM_INDEFINITE_WAIT -1L +#define SEM_IMMEDIATE_RETURN 0L + +USHORT APIENTRY DosSemClear(HSEM hsem); +USHORT APIENTRY DosSemSet(HSEM hsem); +USHORT APIENTRY DosSemWait(HSEM hsem, LONG lTimeOut); +USHORT APIENTRY DosSemSetWait(HSEM hsem, LONG lTimeOut); +USHORT APIENTRY DosSemRequest(HSEM hsem, LONG lTimeOut); + +#endif /* common INCL_DOSSEMAPHORES */ + +#ifdef INCL_DOSSEMAPHORES + +typedef LHANDLE HSYSSEM; /* hssm */ +typedef HSYSSEM FAR *PHSYSSEM; + +USHORT APIENTRY DosCreateSem(USHORT fExclusive, PHSYSSEM phsem, PSZ pszSemName); + +#define CSEM_PRIVATE 0 +#define CSEM_PUBLIC 1 + +USHORT APIENTRY DosOpenSem(PHSEM phsem, PSZ pszSemName); +USHORT APIENTRY DosCloseSem(HSEM hsem); + +typedef struct _MUXSEM { /* mxs */ + USHORT zero; + HSEM hsem; +} MUXSEM; +typedef MUXSEM FAR *PMUXSEM; + +typedef struct _MUXSEMLIST { /* mxsl */ + USHORT cmxs; + MUXSEM amxs[16]; +} MUXSEMLIST; +typedef MUXSEMLIST FAR *PMUXSEMLIST; + +/* + * Since a MUXSEMLIST structure is actually a variable length + * structure, the following macro may be used to define a MUXSEMLIST + * structure having size elements, named "name". + */ +#define DEFINEMUXSEMLIST(name, size) \ + struct { \ + USHORT cmxs; \ + MUXSEM amxs[size]; \ + } name; + +/* + * This function actually takes a far pointer to a MUXSEMLIST structure + * as its second parameter, but in order to allow its use with the + * DEFINEMUXSEMLIST macro, it is declared here as PVOID. + */ +USHORT APIENTRY DosMuxSemWait(PUSHORT pisemCleared, PVOID pmsxl, LONG lTimeOut); + + +/*** Fast safe ram semaphores */ + +typedef struct _DOSFSRSEM { /* dosfsrs */ + USHORT cb; + PID pid; + TID tid; + USHORT cUsage; + USHORT client; + ULONG sem; +} DOSFSRSEM; +typedef DOSFSRSEM FAR *PDOSFSRSEM; + +USHORT APIENTRY DosFSRamSemRequest(PDOSFSRSEM pdosfsrs, LONG lTimeOut); +USHORT APIENTRY DosFSRamSemClear(PDOSFSRSEM pdosfsrs); + +#endif /* INCL_DOSSEMAPHORES */ + +#if (defined(INCL_DOSDATETIME) || !defined(INCL_NOCOMMON)) + +/*** Time support */ + +typedef struct _DATETIME { /* date */ + UCHAR hours; + UCHAR minutes; + UCHAR seconds; + UCHAR hundredths; + UCHAR day; + UCHAR month; + USHORT year; + SHORT timezone; + UCHAR weekday; +} DATETIME; +typedef DATETIME FAR *PDATETIME; + +USHORT APIENTRY DosGetDateTime(PDATETIME pdatetime); +USHORT APIENTRY DosSetDateTime(PDATETIME pdatetime); + +#endif /* common INCL_DOSDATETIME */ + +#ifdef INCL_DOSDATETIME + +typedef SHANDLE HTIMER; +typedef HTIMER FAR *PHTIMER; + +USHORT APIENTRY DosTimerAsync(ULONG ulTime, HSEM hsem, PHTIMER phtimer); +USHORT APIENTRY DosTimerStart(ULONG ulTime, HSEM hsem, PHTIMER phtimer); +USHORT APIENTRY DosTimerStop(HTIMER htimer); + +#endif /* INCL_DOSDATETIME */ + + +/*** Module manager */ + +#ifdef INCL_DOSMODULEMGR + +USHORT APIENTRY DosLoadModule(PSZ pszFailName, USHORT cbFileName, + PSZ pszModName, PHMODULE phmod); +USHORT APIENTRY DosFreeModule(HMODULE hmod); +USHORT APIENTRY DosGetProcAddr(HMODULE hmod, PSZ pszProcName, + PFN FAR * ppfnProcAddr); +USHORT APIENTRY DosGetModHandle(PSZ pszModName, PHMODULE phMod); +USHORT APIENTRY DosGetModName(HMODULE hmod, USHORT cbBuf, PCHAR pchBuf); + +#endif /* INCL_DOSMODULEMGR */ + +#if (defined(INCL_DOSRESOURCES) || !defined(INCL_NOCOMMON)) + +/*** Resource support */ + +/* Predefined resource types */ + +#define RT_POINTER 1 /* mouse pointer shape */ +#define RT_BITMAP 2 /* bitmap */ +#define RT_MENU 3 /* menu template */ +#define RT_DIALOG 4 /* dialog template */ +#define RT_STRING 5 /* string tables */ +#define RT_FONTDIR 6 /* font directory */ +#define RT_FONT 7 /* font */ +#define RT_ACCELTABLE 8 /* accelerator tables */ +#define RT_RCDATA 9 /* binary data */ +#define RT_MESSAGE 10 /* error mesage tables */ +#define RT_DLGINCLUDE 11 /* dialog include file name */ +#define RT_VKEYTBL 12 /* key to vkey tables */ +#define RT_KEYTBL 13 /* key to UGL tables */ +#define RT_CHARTBL 14 +#define RT_DISPLAYINFO 15 /* screen display information */ + +#define RT_FKASHORT 16 /* function key area short form */ +#define RT_FKALONG 17 /* function key area long form */ + +#define RT_HELPTABLE 18 +#define RT_HELPSUBTABLE 19 + +#define RT_FDDIR 20 +#define RT_FD 21 + +#define RT_MAX 22 /* 1st unused Resource Type */ + + +#endif /* common INCL_DOSRESOURCES */ + +#ifdef INCL_DOSRESOURCES + +USHORT APIENTRY DosGetResource(HMODULE hmod, USHORT idType, USHORT idName, + PSEL psel); +USHORT APIENTRY DosGetResource2(HMODULE hmod, USHORT idType, USHORT idName, + PVOID FAR * ppData); +USHORT APIENTRY DosFreeResource(PVOID pData); + +#endif /* INCL_DOSRESOURCES */ + + +/*** NLS Support */ + +#ifdef INCL_DOSNLS + +typedef struct _COUNTRYCODE { /* ctryc */ + USHORT country; + USHORT codepage; +} COUNTRYCODE; +typedef COUNTRYCODE FAR *PCOUNTRYCODE; + +typedef struct _COUNTRYINFO { /* ctryi */ + USHORT country; + USHORT codepage; + USHORT fsDateFmt; + CHAR szCurrency[5]; + CHAR szThousandsSeparator[2]; + CHAR szDecimal[2]; + CHAR szDateSeparator[2]; + CHAR szTimeSeparator[2]; + UCHAR fsCurrencyFmt; + UCHAR cDecimalPlace; + UCHAR fsTimeFmt; + USHORT abReserved1[2]; + CHAR szDataSeparator[2]; + USHORT abReserved2[5]; +} COUNTRYINFO; +typedef COUNTRYINFO FAR *PCOUNTRYINFO; + +USHORT APIENTRY DosGetCtryInfo(USHORT cbBuf, PCOUNTRYCODE pctryc, + PCOUNTRYINFO pctryi, PUSHORT pcbCtryInfo); +USHORT APIENTRY DosGetDBCSEv(USHORT cbBuf, PCOUNTRYCODE pctryc, PCHAR pchBuf); +USHORT APIENTRY DosCaseMap(USHORT usLen, PCOUNTRYCODE pctryc, PCHAR pchStr); +USHORT APIENTRY DosGetCollate(USHORT cbBuf, PCOUNTRYCODE pctryc, PCHAR pchBuf, + PUSHORT pcbTable); +USHORT APIENTRY DosGetCp(USHORT cbBuf, PUSHORT pBuf, PUSHORT pcbCodePgLst); +USHORT APIENTRY DosSetCp(USHORT usCodePage, USHORT usReserved); +USHORT APIENTRY DosSetProcCp(USHORT usCodePage, USHORT usReserved); + +#endif /* INCL_DOSNLS */ + + +/*** Signal support */ + +#ifdef INCL_DOSSIGNALS + +/* Signal Numbers for DosSetSigHandler */ + +#define SIG_CTRLC 1 /* Control C */ +#define SIG_BROKENPIPE 2 /* Broken Pipe */ +#define SIG_KILLPROCESS 3 /* Program Termination */ +#define SIG_CTRLBREAK 4 /* Control Break */ +#define SIG_PFLG_A 5 /* Process Flag A */ +#define SIG_PFLG_B 6 /* Process Flag B */ +#define SIG_PFLG_C 7 /* Process Flag C */ +#define SIG_CSIGNALS 8 /* number of signals plus one */ + +/* Flag Numbers for DosFlagProcess */ + +#define PFLG_A 0 /* Process Flag A */ +#define PFLG_B 1 /* Process Flag B */ +#define PFLG_C 2 /* Process Flag C */ + +/* Signal actions */ + +#define SIGA_KILL 0 +#define SIGA_IGNORE 1 +#define SIGA_ACCEPT 2 +#define SIGA_ERROR 3 +#define SIGA_ACKNOWLEDGE 4 + +/* DosHoldSignal constants */ + +#define HLDSIG_ENABLE 0 +#define HLDSIG_DISABLE 1 + +/* DosFlagProcess codes */ + +#define FLGP_SUBTREE 0 +#define FLGP_PID 1 + +typedef VOID (PASCAL FAR *PFNSIGHANDLER)(USHORT, USHORT); + +USHORT APIENTRY DosSetSigHandler(PFNSIGHANDLER pfnSigHandler, + PFNSIGHANDLER FAR * ppfnPrev, PUSHORT pfAction, + USHORT fAction, USHORT usSigNum); +USHORT APIENTRY DosFlagProcess(PID pid, USHORT fScope, USHORT usFlagNum, + USHORT usFlagArg); +USHORT APIENTRY DosHoldSignal(USHORT fDisable); +USHORT APIENTRY DosSendSignal(USHORT idProcess, USHORT usSigNumber); + +#endif /* INCL_DOSSIGNALS */ + + +/*** Monitor support */ + +#ifdef INCL_DOSMONITORS + +typedef SHANDLE HMONITOR; /* hmon */ +typedef HMONITOR FAR *PHMONITOR; + +USHORT APIENTRY DosMonOpen(PSZ pszDevName, PHMONITOR phmon); +USHORT APIENTRY DosMonClose(HMONITOR hmon); +USHORT APIENTRY DosMonReg(HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf, + USHORT fPosition, USHORT usIndex); +USHORT APIENTRY DosMonRead(PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf, + PUSHORT pcbData); +USHORT APIENTRY DosMonWrite(PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData); + +#endif /* INCL_DOSMONITORS */ + + +/*** Pipe and queue support */ + +#ifdef INCL_DOSQUEUES +#if (defined(INCL_DOSFILEMGR) || !defined(INCL_NOCOMMON)) + +typedef SHANDLE HQUEUE; /* hq */ +typedef HQUEUE FAR *PHQUEUE; + +USHORT APIENTRY DosMakePipe(PHFILE phfRead, PHFILE phfWrite, USHORT cb); +USHORT APIENTRY DosCloseQueue(HQUEUE hqueue); +USHORT APIENTRY DosCreateQueue(PHQUEUE phqueue, USHORT fQueueOrder, + PSZ pszQueueName); +USHORT APIENTRY DosOpenQueue(PUSHORT ppidOwner, PHQUEUE phqueue, + PSZ pszQueueName); +USHORT APIENTRY DosPeekQueue(HQUEUE hqueue, PULONG pqresc, PUSHORT pcbElement, + PULONG ppBuf, PUSHORT pElemCode, UCHAR fWait, + PBYTE pbElemPrty, ULONG hsem); +USHORT APIENTRY DosPurgeQueue(HQUEUE hqueue); +USHORT APIENTRY DosQueryQueue(HQUEUE hqueue, PUSHORT pcElem); +USHORT APIENTRY DosReadQueue(HQUEUE hqueue, PULONG pqresc, PUSHORT pcbElem, + PULONG ppBuf, USHORT usElem, UCHAR fWait, + PBYTE pbElemPrty, HSEM hsem); +USHORT APIENTRY DosWriteQueue(HQUEUE hqueue, USHORT usRequest, USHORT cbBuf, + PBYTE pBuf, UCHAR fPriority); + +#else /* INCL_DOSFILEMGR || !INCL_NOCOMMON */ +#error PHFILE not defined - define INCL_DOSFILEMGR or undefine INCL_NOCOMMON +#endif /* INCL_DOSFILEMGR || !INCL_NOCOMMON */ +#endif /* INCL_DOSQUEUES */ + +#ifdef INCL_DOSMISC + +/* definitions for DOSSEARCHPATH control word */ +#define DSP_IMPLIEDCUR 1 /* current dir will be searched first */ +#define DSP_PATHREF 2 /* from envirnoment variable */ +#define DSP_IGNORENETERR 4 /* ignore net errs & continue search */ + +/* definition for DOSQSYSINFO */ +#define Q_MAX_PATH_LENGTH (0) /* index for query max path length */ + +USHORT APIENTRY DosError(USHORT fEnable); +USHORT APIENTRY DosSetVec(USHORT usVecNum, PFN pfnFun, PFN ppfnPrev); +USHORT APIENTRY DosGetMessage(PCHAR FAR * ppchVTable, USHORT usVCount, + PCHAR pchBuf, USHORT cbBuf, USHORT usMsgNum, + PSZ pszFileName, PUSHORT pcbMsg); +USHORT APIENTRY DosErrClass(USHORT usErrCode, PUSHORT pusClass, + PUSHORT pfsAction, PUSHORT pusLocus); +USHORT APIENTRY DosInsMessage(PCHAR FAR * ppchVTable, USHORT usVCount, + PSZ pszMsg, USHORT cbMsg, PCHAR pchBuf, + USHORT cbBuf, PUSHORT pcbMsg); +USHORT APIENTRY DosPutMessage(USHORT hf, USHORT cbMsg, PCHAR pchMsg); +USHORT APIENTRY DosSysTrace(USHORT, USHORT, USHORT, PCHAR); +USHORT APIENTRY DosDynamicTrace(USHORT, PBYTE, PBYTE); +USHORT APIENTRY DosPTrace(PBYTE pPtraceBuf); +USHORT APIENTRY DosQSysInfo(USHORT index, PBYTE pBuf, USHORT cbBuf); +USHORT APIENTRY DosGetEnv(PUSHORT pselEnv, PUSHORT pOffsetCmd); +USHORT APIENTRY DosScanEnv(PSZ pszVarName, PSZ FAR * ppszResult); +USHORT APIENTRY DosSearchPath(USHORT fsSearch, PSZ pszPath, PSZ pszFName, + PBYTE pBuf, USHORT cbBuf); +USHORT APIENTRY DosGetVersion(PUSHORT pVer); +USHORT APIENTRY DosGetMachineMode(PBYTE pMachMode); + +#endif /* INCL_DOSMISC */ + + +/*** Session manager support */ + +#ifdef INCL_DOSSESMGR + +typedef struct _STARTDATA { /* stdata */ + USHORT Length; + USHORT Related; + USHORT FgBg; + USHORT TraceOpt; + PSZ PgmTitle; + PSZ PgmName; + PBYTE PgmInputs; + PBYTE TermQ; + PBYTE Environment; + USHORT InheritOpt; + USHORT SessionType; + PSZ IconFile; + ULONG PgmHandle; + USHORT PgmControl; + USHORT InitXPos; + USHORT InitYPos; + USHORT InitXSize; + USHORT InitYSize; +} STARTDATA; +typedef STARTDATA FAR *PSTARTDATA; + +typedef struct _STATUSDATA { /* stsdata */ + USHORT Length; + USHORT SelectInd; + USHORT BondInd; +} STATUSDATA; +typedef STATUSDATA FAR *PSTATUSDATA; + +USHORT APIENTRY DosStartSession(PSTARTDATA pstdata, PUSHORT pidSession, + PUSHORT ppid); +USHORT APIENTRY DosSetSession(USHORT idSession, PSTATUSDATA pstsdata); +USHORT APIENTRY DosSelectSession(USHORT idSession, ULONG ulReserved); +USHORT APIENTRY DosStopSession(USHORT fScope, USHORT idSession, + ULONG ulReserved); +USHORT APIENTRY DosQAppType(PSZ pszPrgName, PUSHORT pusType); + +#endif /* INCL_DOSSESMGR */ + + +/*** Device support */ + +#ifdef INCL_DOSDEVICES + +USHORT APIENTRY DosDevConfig(PVOID pDevInfo, USHORT usItem, USHORT usReserved); +USHORT APIENTRY DosDevIOCtl(PVOID pData, PVOID pParms, USHORT usFun, + USHORT usCategory, HFILE hDev); +USHORT APIENTRY DosDevIOCtl2(PVOID pData, USHORT cbData, PVOID pParm, + USHORT cbParm, USHORT usFun, USHORT usCategory, + HFILE hDev); +USHORT APIENTRY DosSystemService(USHORT usCategory, PVOID pRequest, + PVOID pResponse); + +USHORT APIENTRY DosCLIAccess(VOID); +USHORT APIENTRY DosPortAccess(USHORT usReserved, USHORT fRelease, + USHORT usFirstPort, USHORT usLastPort); +USHORT APIENTRY DosPhysicalDisk(USHORT usFun, PBYTE pOut, USHORT cbOut, + PBYTE pParm, USHORT cbParm); + +USHORT APIENTRY DosR2StackRealloc(USHORT cbStack); +VOID APIENTRY DosCallback(PFN pfn); + +#endif /* INCL_DOSDEVICES */ + + +/*** DosNamedPipes API Support */ + +#ifdef INCL_DOSNMPIPES + +typedef SHANDLE HPIPE; /* hp */ +typedef HPIPE FAR *PHPIPE; + +typedef struct _AVAILDATA { /* PeekNMPipe Bytes Available record */ + USHORT cbpipe; /* bytes left in the pipe */ + USHORT cbmessage; /* bytes left in current message */ +} AVAILDATA; +typedef AVAILDATA FAR *PAVAILDATA; + +USHORT APIENTRY DosCallNmPipe(PSZ pszName, PBYTE pInBuf, USHORT cbInBuf, + PBYTE pbOutBuf, USHORT cbOutBuf, PUSHORT pcbRead, + ULONG ulTimeOut); +USHORT APIENTRY DosConnectNmPipe(HPIPE hp); +USHORT APIENTRY DosDisConnectNmPipe(HPIPE hp); +USHORT APIENTRY DosMakeNmPipe(PSZ pszName, PHPIPE php, USHORT fsOpenMode, + USHORT fsPipeMode, USHORT cbOutBuf, + USHORT cbInBuf, ULONG ulTimeOut); +USHORT APIENTRY DosPeekNmPipe(HPIPE hp, PBYTE pBuf, USHORT cbBuf, + PUSHORT pcbRead, PAVAILDATA pAvail, + PUSHORT pfsState); +USHORT APIENTRY DosQNmPHandState(HPIPE hp, PUSHORT pfsState); +USHORT APIENTRY DosQNmPipeInfo(HPIPE hp, USHORT usInfoLevel, PBYTE pBuf, + USHORT cb); +USHORT APIENTRY DosQNmPipeSemState(HSEM hsem, PBYTE pBuf, USHORT cb); +USHORT APIENTRY DosSetNmPHandState(HPIPE hp, USHORT fsState); +USHORT APIENTRY DosSetNmPipeSem(HPIPE hp, HSEM hsem, USHORT usKeyVal); +USHORT APIENTRY DosTransactNmPipe(HPIPE hp, PBYTE bOutBuf, USHORT cbOut, + PBYTE pInBuf, USHORT cbIn, PUSHORT pcbRead); +USHORT APIENTRY DosWaitNmPipe(PSZ pszName, ULONG ulTimeOut); + +/*** Data structures and equates used with named pipes ***/ + +struct npi_data1 { /* PipeInfo data block (returned, level 1) */ + unsigned short npi_obuflen; /* length of outgoing I/O buffer */ + unsigned short npi_ibuflen; /* length of incoming I/O buffer */ + unsigned char npi_maxicnt; /* maximum number of instances */ + unsigned char npi_curicnt; /* current number of instances */ + unsigned char npi_namlen; /* length of pipe name */ + char npi_name[1]; /* start of name */ +}; /* npi_data1 */ + +struct npss { /* QNmPipeSemState information record */ + unsigned char npss_status; /* type of record, 0 = EOI, 1 = read ok, */ + /* 2 = write ok, 3 = pipe closed */ + unsigned char npss_flag; /* additional info, 01 = waiting thread */ + unsigned short npss_key; /* user's key value */ + unsigned short npss_avail; /* available data/space if status = 1/2 */ +}; /* npss */ + +/* values in npss_status */ +#define NPSS_EOI 0 /* End Of Information */ +#define NPSS_RDATA 1 /* read data available */ +#define NPSS_WSPACE 2 /* write space available */ +#define NPSS_CLOSE 3 /* pipe in CLOSING state */ + +/* values in npss_flag */ +#define NPSS_WAIT 0x01 /* waiting thread on end of pipe */ + +/* defined bits in pipe mode */ +#define NP_NBLK 0x8000 /* non-blocking read/write */ +#define NP_SERVER 0x4000 /* set if server end */ +#define NP_WMESG 0x0400 /* write messages */ +#define NP_RMESG 0x0100 /* read as messages */ +#define NP_ICOUNT 0x00FF /* instance count field */ + + +/* Named pipes may be in one of several states depending on the actions + * that have been taken on it by the server end and client end. The + * following state/action table summarizes the valid state transitions: + * + * Current state Action Next state + * + * <none> server DosMakeNmPipe DISCONNECTED + * DISCONNECTED server connect LISTENING + * LISTENING client open CONNECTED + * CONNECTED server disconn DISCONNECTED + * CONNECTED client close CLOSING + * CLOSING server disconn DISCONNECTED + * CONNECTED server close CLOSING + * <any other> server close <pipe deallocated> + * + * If a server disconnects his end of the pipe, the client end will enter a + * special state in which any future operations (except close) on the file + * descriptor associated with the pipe will return an error. + */ + +/* + * Values for named pipe state + */ + +#define NP_DISCONNECTED 1 /* after pipe creation or Disconnect */ +#define NP_LISTENING 2 /* after DosNmPipeConnect */ +#define NP_CONNECTED 3 /* after Client open */ +#define NP_CLOSING 4 /* after Client or Server close */ + + +#endif /* INCL_DOSNMPIPES */ + +/*** DosProfile API support */ + +#ifdef INCL_DOSPROFILE + +/* DosProfile ordinal number */ + +#define PROF_ORDINAL 133 + +/* DosProfile usType */ + +#define PROF_SYSTEM 0 +#define PROF_USER 1 +#define PROF_USEDD 2 +#define PROF_KERNEL 4 +#define PROF_VERBOSE 8 +#define PROF_ENABLE 16 + +/* DosProfile usFunc */ + +#define PROF_ALLOC 0 +#define PROF_CLEAR 1 +#define PROF_ON 2 +#define PROF_OFF 3 +#define PROF_DUMP 4 +#define PROF_FREE 5 + +/* DosProfile tic count granularity (DWORD) */ + +#define PROF_SHIFT 2 + +/* DosProfile module name string length */ + +#define PROF_MOD_NAME_SIZE 10 + +/* DosProfile error code for end of data */ + +#define PROF_END_OF_DATA 13 + +#endif /* INCL_DOSPROFILE */ + +#ifdef INCL_DOSMISC + +/*** Miscelanious functions ***/ + +/* DosError() error-handling types */ + +#define HARDERROR_ENABLE 0x0001 +#define HARDERROR_DISABLE 0x0000 +#define EXCEPTION_ENABLE 0x0000 +#define EXCEPTION_DISABLE 0x0002 + +/* DosGetMachineMode() machine modes */ + +#define MODE_REAL 0x0000 +#define MODE_PROTECTED 0x0001 + +/* DosSetVec vectors */ + +#define VECTOR_DIVIDE_BY_ZERO 0x0000 +#define VECTOR_OVERFLOW 0x0004 +#define VECTOR_OUTOFBOUNDS 0x0005 +#define VECTOR_INVALIDOPCODE 0x0006 +#define VECTOR_NO_EXTENSION 0x0007 +#define VECTOR_EXTENSION_ERROR 0x0010 + + +USHORT APIENTRY DosError(USHORT); +USHORT APIENTRY DosErrClass(USHORT, PUSHORT, PUSHORT, PUSHORT); +USHORT APIENTRY DosQSysInfo(USHORT, PBYTE, USHORT); +USHORT APIENTRY DosGetEnv(PUSHORT, PUSHORT); +USHORT APIENTRY DosScanEnv(PSZ, PSZ FAR *); +USHORT APIENTRY DosGetVersion(PUSHORT); +USHORT APIENTRY DosGetMachineMode(PBYTE); + +USHORT APIENTRY DosGetMessage(PCHAR FAR *, USHORT, PCHAR, USHORT, USHORT, + PSZ, PUSHORT); +USHORT APIENTRY DosInsMessage(PCHAR FAR *, USHORT, PSZ, USHORT, PCHAR, + USHORT, PUSHORT); +USHORT APIENTRY DosPutMessage(HFILE, USHORT, PCHAR); + +#endif /* INCL_DOSMISC */ diff --git a/private/oleauto/tools/win16/os2/inc/bseerr.h b/private/oleauto/tools/win16/os2/inc/bseerr.h new file mode 100644 index 000000000..4c41c49a8 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bseerr.h @@ -0,0 +1,637 @@ +/****************************** Module Header ******************************\ +* +* Module Name: BSEERR.H +* +* This file includes the error codes for Base OS/2 applications. +* +* Copyright (c) International Business Machines Corporation 1987 +* Copyright (c) Microsoft Corporation 1987 +* +* =========================================================================== +* +* The following symbols are used in this file for conditional sections. +* +* INCL_DOSERRORS - OS/2 Errors - only included if symbol defined +* +\***************************************************************************/ +/*** Error codes */ + +#ifdef INCL_ERRORS + +#define INCL_DOSERRORS + +#endif /* INCL_ERRORS */ + +#ifdef INCL_DOSERRORS + +#define NO_ERROR 0 + +#define ERROR_INVALID_FUNCTION 1 +#define ERROR_FILE_NOT_FOUND 2 +#define ERROR_PATH_NOT_FOUND 3 +#define ERROR_TOO_MANY_OPEN_FILES 4 +#define ERROR_ACCESS_DENIED 5 +#define ERROR_INVALID_HANDLE 6 +#define ERROR_ARENA_TRASHED 7 +#define ERROR_NOT_ENOUGH_MEMORY 8 +#define ERROR_INVALID_BLOCK 9 +#define ERROR_BAD_ENVIRONMENT 10 +#define ERROR_BAD_FORMAT 11 +#define ERROR_INVALID_ACCESS 12 +#define ERROR_INVALID_DATA 13 +/* 14 is reserved */ +#define ERROR_INVALID_DRIVE 15 +#define ERROR_CURRENT_DIRECTORY 16 +#define ERROR_NOT_SAME_DEVICE 17 +#define ERROR_NO_MORE_FILES 18 +#define ERROR_WRITE_PROTECT 19 +#define ERROR_BAD_UNIT 20 +#define ERROR_NOT_READY 21 +#define ERROR_BAD_COMMAND 22 +#define ERROR_CRC 23 +#define ERROR_BAD_LENGTH 24 +#define ERROR_SEEK 25 +#define ERROR_NOT_DOS_DISK 26 +#define ERROR_SECTOR_NOT_FOUND 27 +#define ERROR_OUT_OF_PAPER 28 +#define ERROR_WRITE_FAULT 29 +#define ERROR_READ_FAULT 30 +#define ERROR_GEN_FAILURE 31 +#define ERROR_SHARING_VIOLATION 32 +#define ERROR_LOCK_VIOLATION 33 +#define ERROR_WRONG_DISK 34 +#define ERROR_FCB_UNAVAILABLE 35 +#define ERROR_SHARING_BUFFER_EXCEEDED 36 +#define ERROR_NOT_SUPPORTED 50 +#define ERROR_REM_NOT_LIST 51 /* Remote computer not listening */ +#define ERROR_DUP_NAME 52 /* Duplicate name on network */ +#define ERROR_BAD_NETPATH 53 /* Network path not found */ +#define ERROR_NETWORK_BUSY 54 /* Network busy */ +#define ERROR_DEV_NOT_EXIST 55 /* Network device no longer exists */ +#define ERROR_TOO_MANY_CMDS 56 /* Net BIOS command limit exceeded */ +#define ERROR_ADAP_HDW_ERR 57 /* Network adapter hardware error */ +#define ERROR_BAD_NET_RESP 58 /* Incorrect response from network */ +#define ERROR_UNEXP_NET_ERR 59 /* Unexpected network error */ +#define ERROR_BAD_REM_ADAP 60 /* Incompatible remote adapter */ +#define ERROR_PRINTQ_FULL 61 /* Print queue full */ +#define ERROR_NO_SPOOL_SPACE 62 /* Not enough space for print file */ +#define ERROR_PRINT_CANCELLED 63 /* Print file was cancelled */ +#define ERROR_NETNAME_DELETED 64 /* Network name was deleted */ +#define ERROR_NETWORK_ACCESS_DENIED 65 /* Access denied */ +#define ERROR_BAD_DEV_TYPE 66 /* Network device type incorrect */ +#define ERROR_BAD_NET_NAME 67 /* Network name not found */ +#define ERROR_TOO_MANY_NAMES 68 /* Network name limit exceeded */ +#define ERROR_TOO_MANY_SESS 69 /* Net BIOS session limit exceeded */ +#define ERROR_SHARING_PAUSED 70 /* Sharing temporarily paused */ +#define ERROR_REQ_NOT_ACCEP 71 /* Network request not accepted */ +#define ERROR_REDIR_PAUSED 72 /* Print|disk redirection is paused*/ +#define ERROR_FILE_EXISTS 80 +#define ERROR_DUP_FCB 81 +#define ERROR_CANNOT_MAKE 82 +#define ERROR_FAIL_I24 83 +#define ERROR_OUT_OF_STRUCTURES 84 +#define ERROR_ALREADY_ASSIGNED 85 +#define ERROR_INVALID_PASSWORD 86 +#define ERROR_INVALID_PARAMETER 87 +#define ERROR_NET_WRITE_FAULT 88 +#define ERROR_NO_PROC_SLOTS 89 /* no process slots available */ +#define ERROR_NOT_FROZEN 90 +#define ERR_TSTOVFL 91 /* timer service table overflow */ +#define ERR_TSTDUP 92 /* timer service table duplicate */ +#define ERROR_NO_ITEMS 93 /* no items to operate upon */ +#define ERROR_INTERRUPT 95 /* interrupted system call */ +#define ERROR_DEVICE_IN_USE 99 /* Device in use by another thread */ +#define ERROR_TOO_MANY_SEMAPHORES 100 +#define ERROR_EXCL_SEM_ALREADY_OWNED 101 +#define ERROR_SEM_IS_SET 102 +#define ERROR_TOO_MANY_SEM_REQUESTS 103 +#define ERROR_INVALID_AT_INTERRUPT_TIME 104 +#define ERROR_SEM_OWNER_DIED 105 /* waitsem found owner died */ +#define ERROR_SEM_USER_LIMIT 106 /* too many procs have this sem */ +#define ERROR_DISK_CHANGE 107 +#define ERROR_DRIVE_LOCKED 108 /* drive locked by another process*/ +#define ERROR_BROKEN_PIPE 109 /* write on pipe with no reader */ +#define ERROR_OPEN_FAILED 110 /* open/created failed due to */ + /* explicit fail command */ +#define ERROR_BUFFER_OVERFLOW 111 /* buffer passed to system call */ + /* is too small to hold return */ + /* data. */ +#define ERROR_DISK_FULL 112 /* not enough space on the disk */ + /* (DOSNEWSIZE/w_NewSize) */ +#define ERROR_NO_MORE_SEARCH_HANDLES 113 /* can't allocate another search */ + /* structure and handle. */ + /* (DOSFINDFIRST/w_FindFirst) */ +#define ERROR_INVALID_TARGET_HANDLE 114 /* Target handle in DOSDUPHANDLE */ + /* is invalid */ +#define ERROR_PROTECTION_VIOLATION 115 /* Bad user virtual address */ +#define ERROR_VIOKBD_REQUEST 116 +#define ERROR_INVALID_CATEGORY 117 /* Category for DEVIOCTL in not */ + /* defined */ +#define ERROR_INVALID_VERIFY_SWITCH 118 /* invalid value passed for */ + /* verify flag */ +#define ERROR_BAD_DRIVER_LEVEL 119 /* DosDevIOCTL looks for a level */ + /* four driver. If the driver */ + /* is not level four we return */ + /* this code */ +#define ERROR_CALL_NOT_IMPLEMENTED 120 /* returned from stub api calls. */ + /* This call will disappear when */ + /* all the api's are implemented. */ +#define ERROR_SEM_TIMEOUT 121 /* Time out happened from the */ + /* semaphore api functions. */ +#define ERROR_INSUFFICIENT_BUFFER 122 /* Some calls require the */ + /* application to pass in a buffer */ + /* filled with data. This error is */ + /* returned if the data buffer is too */ + /* small. For example: DosSetFileInfo */ + /* requires 4 bytes of data. If a */ + /* two byte buffer is passed in then */ + /* this error is returned. */ + /* error_buffer_overflow is used when */ + /* the output buffer in not big enough.*/ +#define ERROR_INVALID_NAME 123 /* illegal character or malformed */ + /* file system name */ +#define ERROR_INVALID_LEVEL 124 /* unimplemented level for info */ + /* retrieval or setting */ +#define ERROR_NO_VOLUME_LABEL 125 /* no volume label found with */ + /* DosQFSInfo command */ +#define ERROR_MOD_NOT_FOUND 126 /* w_getprocaddr,w_getmodhandle */ +#define ERROR_PROC_NOT_FOUND 127 /* w_getprocaddr */ +#define ERROR_WAIT_NO_CHILDREN 128 /* CWait finds to children */ +#define ERROR_CHILD_NOT_COMPLETE 129 /* CWait children not dead yet */ +#define ERROR_DIRECT_ACCESS_HANDLE 130 /* handle operation is invalid */ + /* for direct disk access */ + /* handles */ +#define ERROR_NEGATIVE_SEEK 131 /* application tried to seek */ + /* with negitive offset */ +#define ERROR_SEEK_ON_DEVICE 132 /* application tried to seek */ + /* on device or pipe */ +#define ERROR_IS_JOIN_TARGET 133 +#define ERROR_IS_JOINED 134 +#define ERROR_IS_SUBSTED 135 +#define ERROR_NOT_JOINED 136 +#define ERROR_NOT_SUBSTED 137 +#define ERROR_JOIN_TO_JOIN 138 +#define ERROR_SUBST_TO_SUBST 139 +#define ERROR_JOIN_TO_SUBST 140 +#define ERROR_SUBST_TO_JOIN 141 +#define ERROR_BUSY_DRIVE 142 +#define ERROR_SAME_DRIVE 143 +#define ERROR_DIR_NOT_ROOT 144 +#define ERROR_DIR_NOT_EMPTY 145 +#define ERROR_IS_SUBST_PATH 146 +#define ERROR_IS_JOIN_PATH 147 +#define ERROR_PATH_BUSY 148 +#define ERROR_IS_SUBST_TARGET 149 +#define ERROR_SYSTEM_TRACE 150 /* system trace error */ +#define ERROR_INVALID_EVENT_COUNT 151 /* DosMuxSemWait errors */ +#define ERROR_TOO_MANY_MUXWAITERS 152 +#define ERROR_INVALID_LIST_FORMAT 153 +#define ERROR_LABEL_TOO_LONG 154 +#define ERROR_TOO_MANY_TCBS 155 +#define ERROR_SIGNAL_REFUSED 156 +#define ERROR_DISCARDED 157 +#define ERROR_NOT_LOCKED 158 +#define ERROR_BAD_THREADID_ADDR 159 +#define ERROR_BAD_ARGUMENTS 160 +#define ERROR_BAD_PATHNAME 161 +#define ERROR_SIGNAL_PENDING 162 +#define ERROR_UNCERTAIN_MEDIA 163 +#define ERROR_MAX_THRDS_REACHED 164 +#define ERROR_MONITORS_NOT_SUPPORTED 165 +#define ERROR_UNC_DRIVER_NOT_INSTALLED 166 + +/* The following error codes refer to demand loading segments */ +#define ERROR_LOCK_FAILED 167 +#define ERROR_SWAPIO_FAILED 168 +#define ERROR_SWAPIN_FAILED 169 +#define ERROR_BUSY 170 + +#define ERROR_INVALID_SEGMENT_NUMBER 180 +#define ERROR_INVALID_CALLGATE 181 +#define ERROR_INVALID_ORDINAL 182 +#define ERROR_ALREADY_EXISTS 183 +#define ERROR_NO_CHILD_PROCESS 184 +#define ERROR_CHILD_ALIVE_NOWAIT 185 +#define ERROR_INVALID_FLAG_NUMBER 186 +#define ERROR_SEM_NOT_FOUND 187 + +/* following error codes make loader error messages distinct */ +#define ERROR_INVALID_STARTING_CODESEG 188 +#define ERROR_INVALID_STACKSEG 189 +#define ERROR_INVALID_MODULETYPE 190 +#define ERROR_INVALID_EXE_SIGNATURE 191 +#define ERROR_EXE_MARKED_INVALID 192 +#define ERROR_BAD_EXE_FORMAT 193 +#define ERROR_ITERATED_DATA_EXCEEDS_64K 194 +#define ERROR_INVALID_MINALLOCSIZE 195 +#define ERROR_DYNLINK_FROM_INVALID_RING 196 +#define ERROR_IOPL_NOT_ENABLED 197 +#define ERROR_INVALID_SEGDPL 198 +#define ERROR_AUTODATASEG_EXCEEDS_64k 199 +#define ERROR_RING2SEG_MUST_BE_MOVABLE 200 +#define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201 +#define ERROR_INFLOOP_IN_RELOC_CHAIN 202 +#define ERROR_ENVVAR_NOT_FOUND 203 +#define ERROR_NOT_CURRENT_CTRY 204 +#define ERROR_NO_SIGNAL_SENT 205 +#define ERROR_FILENAME_EXCED_RANGE 206 /* if filename > 8.3 */ +#define ERROR_RING2_STACK_IN_USE 207 /* for FAPI */ +#define ERROR_META_EXPANSION_TOO_LONG 208 /* if "*a" > 8.3 */ +#define ERROR_INVALID_SIGNAL_NUMBER 209 +#define ERROR_THREAD_1_INACTIVE 210 +#define ERROR_INFO_NOT_AVAIL 211 +#define ERROR_LOCKED 212 +#define ERROR_BAD_DYNALINK 213 +#define ERROR_TOO_MANY_MODULES 214 +#define ERROR_NESTING_NOT_ALLOWED 215 +#define ERROR_CANNOT_SHRINK 216 /* attempt to shrink ring 2 stack */ +#define ERROR_ZOMBIE_PROCESS 217 +#define ERROR_STACK_IN_HIGH_MEMORY 218 +#define ERROR_INVALID_EXITROUTINE_RING 219 +#define ERROR_GETBUF_FAILED 220 +#define ERROR_FLUSHBUF_FAILED 221 +#define ERROR_TRANSFER_TOO_LONG 222 +#define ERROR_SMG_NO_TARGET_WINDOW 224 +#define ERROR_NO_CHILDREN 228 +#define ERROR_INVALID_SCREEN_GROUP 229 +/* + * Error codes 230 - 249 are reserved + */ +#define ERROR_BAD_PIPE 230 /* Non-existant pipe or bad operation */ +#define ERROR_PIPE_BUSY 231 /* Pipe is busy */ +#define ERROR_NO_DATA 232 /* No data on non-blocking read */ +#define ERROR_PIPE_NOT_CONNECTED 233 /* Pipe was disconnected by server*/ +#define ERROR_MORE_DATA 234 /* More data is available */ + +#define ERROR_VC_DISCONNECTED 240 +#define ERROR_CIRCULARITY_REQUESTED 250 /* When renaming a dir which */ + /* would cause a circularity */ +#define ERROR_DIRECTORY_IN_CDS 251 /* When renaming a dir */ + /* which is "in use" */ +#define ERROR_INVALID_FSD_NAME 252 /* when trying to access */ + /* nonexistent FSD */ +#define ERROR_INVALID_PATH 253 /* bad pseudo device */ +#define ERROR_INVALID_EA_NAME 254 /* Illegal chars in name */ +#define ERROR_EA_LIST_INCONSISTENT 255 /* Size or some field bad */ +#define ERROR_EA_LIST_TOO_LONG 256 /* FEAlist > 64K-1 bytes */ +#define ERROR_NO_META_MATCH 257 /* string doesn't match expression*/ +#define ERROR_FINDNOTIFY_TIMEOUT 258 /* FindNotify request timeout */ +#define ERROR_NO_MORE_ITEMS 259 /* QFSAttach ordinal query */ +#define ERROR_SEARCH_STRUC_REUSED 260 /* 3xbox findfirst/next + search structure reused */ +#define ERROR_CHAR_NOT_FOUND 261 /* can not find character */ +#define ERROR_TOO_MUCH_STACK 262 /* Stack request exceeds sys limit*/ +#define ERROR_INVALID_ATTR 263 /* invalid FS_ATTRIBUTE */ +#define ERROR_INVALID_STARTING_RING 264 +#define ERROR_INVALID_DLL_INIT_RING 265 +#define ERROR_CANNOT_COPY 266 /* doscopy */ +#define ERROR_DIRECTORY 267 /* doscopy */ +#define ERROR_OPLOCKED_FILE 268 +#define ERROR_OPLOCK_THREAD_EXISTS 269 + +/* error codes for DosFindNotify */ +#define ERROR_VOLUME_CHANGED 270 +#define ERROR_FINDNOTIFY_HANDLE_IN_USE 271 +#define ERROR_FINDNOTIFY_HANDLE_CLOSED 272 +#define ERROR_NOTIFY_OBJECT_REMOVED 273 + +/* Error to indicate that ShutDown already done */ +#define ERROR_ALREADY_SHUTDOWN 274 + +/* error code for DOSFINDFIRST2/NEXT */ +#define ERROR_EAS_DIDNT_FIT 275 + +/* error codes for EA file format change */ +#define ERROR_EA_FILE_CORRUPT 276 +#define ERROR_EA_TABLE_FULL 277 +#define ERROR_INVALID_EA_HANDLE 278 +#define ERROR_NO_CLUSTER 279 +#define ERROR_CREATE_EA_FILE 280 +#define ERROR_CANNOT_OPEN_EA_FILE 281 + +/* error codes for FSDs which do not support EAs */ +#define ERROR_EAS_NOT_SUPPORTED 282 +#define ERROR_NEED_EAS_FOUND 283 + +#define ERROR_INVALID_PROCID 303 +#define ERROR_INVALID_PDELTA 304 +#define ERROR_NOT_DESCENDANT 305 +#define ERROR_NOT_SESSION_MANAGER 306 +#define ERROR_INVALID_PCLASS 307 +#define ERROR_INVALID_SCOPE 308 +#define ERROR_INVALID_THREADID 309 +#define ERROR_DOSSUB_SHRINK 310 +#define ERROR_DOSSUB_NOMEM 311 +#define ERROR_DOSSUB_OVERLAP 312 +#define ERROR_DOSSUB_BADSIZE 313 +#define ERROR_DOSSUB_BADFLAG 314 +#define ERROR_DOSSUB_BADSELECTOR 315 +#define ERROR_MR_MSG_TOO_LONG 316 +#define ERROR_MR_MID_NOT_FOUND 317 +#define ERROR_MR_UN_ACC_MSGF 318 +#define ERROR_MR_INV_MSGF_FORMAT 319 +#define ERROR_MR_INV_IVCOUNT 320 +#define ERROR_MR_UN_PERFORM 321 +#define ERROR_TS_WAKEUP 322 +#define ERROR_TS_SEMHANDLE 323 +#define ERROR_TS_NOTIMER 324 +#define ERROR_TS_HANDLE 326 +#define ERROR_TS_DATETIME 327 +#define ERROR_SYS_INTERNAL 328 +#define ERROR_QUE_CURRENT_NAME 329 +#define ERROR_QUE_PROC_NOT_OWNED 330 +#define ERROR_QUE_PROC_OWNED 331 +#define ERROR_QUE_DUPLICATE 332 +#define ERROR_QUE_ELEMENT_NOT_EXIST 333 +#define ERROR_QUE_NO_MEMORY 334 +#define ERROR_QUE_INVALID_NAME 335 +#define ERROR_QUE_INVALID_PRIORITY 336 +#define ERROR_QUE_INVALID_HANDLE 337 +#define ERROR_QUE_LINK_NOT_FOUND 338 +#define ERROR_QUE_MEMORY_ERROR 339 +#define ERROR_QUE_PREV_AT_END 340 +#define ERROR_QUE_PROC_NO_ACCESS 341 +#define ERROR_QUE_EMPTY 342 +#define ERROR_QUE_NAME_NOT_EXIST 343 +#define ERROR_QUE_NOT_INITIALIZED 344 +#define ERROR_QUE_UNABLE_TO_ACCESS 345 +#define ERROR_QUE_UNABLE_TO_ADD 346 +#define ERROR_QUE_UNABLE_TO_INIT 347 +#define ERROR_VIO_INVALID_MASK 349 +#define ERROR_VIO_PTR 350 +#define ERROR_VIO_APTR 351 +#define ERROR_VIO_RPTR 352 +#define ERROR_VIO_CPTR 353 +#define ERROR_VIO_LPTR 354 +#define ERROR_VIO_MODE 355 +#define ERROR_VIO_WIDTH 356 +#define ERROR_VIO_ATTR 357 +#define ERROR_VIO_ROW 358 +#define ERROR_VIO_COL 359 +#define ERROR_VIO_TOPROW 360 +#define ERROR_VIO_BOTROW 361 +#define ERROR_VIO_RIGHTCOL 362 +#define ERROR_VIO_LEFTCOL 363 +#define ERROR_SCS_CALL 364 +#define ERROR_SCS_VALUE 365 +#define ERROR_VIO_WAIT_FLAG 366 +#define ERROR_VIO_UNLOCK 367 +#define ERROR_SGS_NOT_SESSION_MGR 368 +#define ERROR_SMG_INVALID_SGID 369 +#define ERROR_SMG_INVALID_SESSION_ID 369 +#define ERROR_SMG_NOSG 370 +#define ERROR_SMG_NO_SESSIONS 370 +#define ERROR_SMG_GRP_NOT_FOUND 371 +#define ERROR_SMG_SESSION_NOT_FOUND 371 +#define ERROR_SMG_SET_TITLE 372 +#define ERROR_KBD_PARAMETER 373 +#define ERROR_KBD_NO_DEVICE 374 +#define ERROR_KBD_INVALID_IOWAIT 375 +#define ERROR_KBD_INVALID_LENGTH 376 +#define ERROR_KBD_INVALID_ECHO_MASK 377 +#define ERROR_KBD_INVALID_INPUT_MASK 378 +#define ERROR_MON_INVALID_PARMS 379 +#define ERROR_MON_INVALID_DEVNAME 380 +#define ERROR_MON_INVALID_HANDLE 381 +#define ERROR_MON_BUFFER_TOO_SMALL 382 +#define ERROR_MON_BUFFER_EMPTY 383 +#define ERROR_MON_DATA_TOO_LARGE 384 +#define ERROR_MOUSE_NO_DEVICE 385 +#define ERROR_MOUSE_INV_HANDLE 386 +#define ERROR_MOUSE_INV_PARMS 387 +#define ERROR_MOUSE_CANT_RESET 388 +#define ERROR_MOUSE_DISPLAY_PARMS 389 +#define ERROR_MOUSE_INV_MODULE 390 +#define ERROR_MOUSE_INV_ENTRY_PT 391 +#define ERROR_MOUSE_INV_MASK 392 +#define NO_ERROR_MOUSE_NO_DATA 393 +#define NO_ERROR_MOUSE_PTR_DRAWN 394 +#define ERROR_INVALID_FREQUENCY 395 +#define ERROR_NLS_NO_COUNTRY_FILE 396 +#define ERROR_NLS_OPEN_FAILED 397 +#define ERROR_NLS_NO_CTRY_CODE 398 +#define ERROR_NO_COUNTRY_OR_CODEPAGE 398 +#define ERROR_NLS_TABLE_TRUNCATED 399 +#define ERROR_NLS_BAD_TYPE 400 +#define ERROR_NLS_TYPE_NOT_FOUND 401 +#define ERROR_VIO_SMG_ONLY 402 +#define ERROR_VIO_INVALID_ASCIIZ 403 +#define ERROR_VIO_DEREGISTER 404 +#define ERROR_VIO_NO_POPUP 405 +#define ERROR_VIO_EXISTING_POPUP 406 +#define ERROR_KBD_SMG_ONLY 407 +#define ERROR_KBD_INVALID_ASCIIZ 408 +#define ERROR_KBD_INVALID_MASK 409 +#define ERROR_KBD_REGISTER 410 +#define ERROR_KBD_DEREGISTER 411 +#define ERROR_MOUSE_SMG_ONLY 412 +#define ERROR_MOUSE_INVALID_ASCIIZ 413 +#define ERROR_MOUSE_INVALID_MASK 414 +#define ERROR_MOUSE_REGISTER 415 +#define ERROR_MOUSE_DEREGISTER 416 +#define ERROR_SMG_BAD_ACTION 417 +#define ERROR_SMG_INVALID_CALL 418 +#define ERROR_SCS_SG_NOTFOUND 419 +#define ERROR_SCS_NOT_SHELL 420 +#define ERROR_VIO_INVALID_PARMS 421 +#define ERROR_VIO_FUNCTION_OWNED 422 +#define ERROR_VIO_RETURN 423 +#define ERROR_SCS_INVALID_FUNCTION 424 +#define ERROR_SCS_NOT_SESSION_MGR 425 +#define ERROR_VIO_REGISTER 426 +#define ERROR_VIO_NO_MODE_THREAD 427 +#define ERROR_VIO_NO_SAVE_RESTORE_THD 428 +#define ERROR_VIO_IN_BG 429 +#define ERROR_VIO_ILLEGAL_DURING_POPUP 430 +#define ERROR_SMG_NOT_BASESHELL 431 +#define ERROR_SMG_BAD_STATUSREQ 432 +#define ERROR_QUE_INVALID_WAIT 433 +#define ERROR_VIO_LOCK 434 +#define ERROR_MOUSE_INVALID_IOWAIT 435 +#define ERROR_VIO_INVALID_HANDLE 436 +#define ERROR_VIO_ILLEGAL_DURING_LOCK 437 +#define ERROR_VIO_INVALID_LENGTH 438 +#define ERROR_KBD_INVALID_HANDLE 439 +#define ERROR_KBD_NO_MORE_HANDLE 440 +#define ERROR_KBD_CANNOT_CREATE_KCB 441 +#define ERROR_KBD_CODEPAGE_LOAD_INCOMPL 442 +#define ERROR_KBD_INVALID_CODEPAGE_ID 443 +#define ERROR_KBD_NO_CODEPAGE_SUPPORT 444 +#define ERROR_KBD_FOCUS_REQUIRED 445 +#define ERROR_KBD_FOCUS_ALREADY_ACTIVE 446 +#define ERROR_KBD_KEYBOARD_BUSY 447 +#define ERROR_KBD_INVALID_CODEPAGE 448 +#define ERROR_KBD_UNABLE_TO_FOCUS 449 +#define ERROR_SMG_SESSION_NON_SELECT 450 +#define ERROR_SMG_SESSION_NOT_FOREGRND 451 +#define ERROR_SMG_SESSION_NOT_PARENT 452 +#define ERROR_SMG_INVALID_START_MODE 453 +#define ERROR_SMG_INVALID_RELATED_OPT 454 +#define ERROR_SMG_INVALID_BOND_OPTION 455 +#define ERROR_SMG_INVALID_SELECT_OPT 456 +#define ERROR_SMG_START_IN_BACKGROUND 457 +#define ERROR_SMG_INVALID_STOP_OPTION 458 +#define ERROR_SMG_BAD_RESERVE 459 +#define ERROR_SMG_PROCESS_NOT_PARENT 460 +#define ERROR_SMG_INVALID_DATA_LENGTH 461 +#define ERROR_SMG_NOT_BOUND 462 +#define ERROR_SMG_RETRY_SUB_ALLOC 463 +#define ERROR_KBD_DETACHED 464 +#define ERROR_VIO_DETACHED 465 +#define ERROR_MOU_DETACHED 466 +#define ERROR_VIO_FONT 467 +#define ERROR_VIO_USER_FONT 468 +#define ERROR_VIO_BAD_CP 469 +#define ERROR_VIO_NO_CP 470 +#define ERROR_VIO_NA_CP 471 +#define ERROR_INVALID_CODE_PAGE 472 +#define ERROR_CPLIST_TOO_SMALL 473 +#define ERROR_CP_NOT_MOVED 474 +#define ERROR_MODE_SWITCH_INIT 475 +#define ERROR_CODE_PAGE_NOT_FOUND 476 +#define ERROR_UNEXPECTED_SLOT_RETURNED 477 +#define ERROR_SMG_INVALID_TRACE_OPTION 478 +#define ERROR_VIO_INTERNAL_RESOURCE 479 +#define ERROR_VIO_SHELL_INIT 480 +#define ERROR_SMG_NO_HARD_ERRORS 481 +#define ERROR_CP_SWITCH_INCOMPLETE 482 +#define ERROR_VIO_TRANSPARENT_POPUP 483 +#define ERROR_CRITSEC_OVERFLOW 484 +#define ERROR_CRITSEC_UNDERFLOW 485 +#define ERROR_VIO_BAD_RESERVE 486 +#define ERROR_INVALID_ADDRESS 487 +#define ERROR_ZERO_SELECTORS_REQUESTED 488 +#define ERROR_NOT_ENOUGH_SELECTORS_AVA 489 +#define ERROR_INVALID_SELECTOR 490 +#define ERROR_SMG_INVALID_PROGRAM_TYPE 491 +#define ERROR_SMG_INVALID_PGM_CONTROL 492 +#define ERROR_SMG_INVALID_INHERIT_OPT 493 +#define ERROR_VIO_EXTENDED_SG 494 +#define ERROR_VIO_NOT_PRES_MGR_SG 495 +#define ERROR_VIO_SHIELD_OWNED 496 +#define ERROR_VIO_NO_MORE_HANDLES 497 +#define ERROR_VIO_SEE_ERROR_LOG 498 +#define ERROR_VIO_ASSOCIATED_DC 499 +#define ERROR_KBD_NO_CONSOLE 500 +#define ERROR_MOUSE_NO_CONSOLE 501 +#define ERROR_MOUSE_INVALID_HANDLE 502 +#define ERROR_SMG_INVALID_DEBUG_PARMS 503 +#define ERROR_KBD_EXTENDED_SG 504 +#define ERROR_MOU_EXTENDED_SG 505 +#define ERROR_SMG_INVALID_ICON_FILE 506 + + +#define ERROR_USER_DEFINED_BASE 0xFF00 + +#define ERROR_I24_WRITE_PROTECT 0 +#define ERROR_I24_BAD_UNIT 1 +#define ERROR_I24_NOT_READY 2 +#define ERROR_I24_BAD_COMMAND 3 +#define ERROR_I24_CRC 4 +#define ERROR_I24_BAD_LENGTH 5 +#define ERROR_I24_SEEK 6 +#define ERROR_I24_NOT_DOS_DISK 7 +#define ERROR_I24_SECTOR_NOT_FOUND 8 +#define ERROR_I24_OUT_OF_PAPER 9 +#define ERROR_I24_WRITE_FAULT 10 +#define ERROR_I24_READ_FAULT 11 +#define ERROR_I24_GEN_FAILURE 12 +#define ERROR_I24_DISK_CHANGE 13 +#define ERROR_I24_WRONG_DISK 15 +#define ERROR_I24_UNCERTAIN_MEDIA 16 +#define ERROR_I24_CHAR_CALL_INTERRUPTED 17 +#define ERROR_I24_NO_MONITOR_SUPPORT 18 +#define ERROR_I24_INVALID_PARAMETER 19 +#define ERROR_I24_DEVICE_IN_USE 20 + +#define ALLOWED_FAIL 0x0001 +#define ALLOWED_ABORT 0x0002 +#define ALLOWED_RETRY 0x0004 +#define ALLOWED_IGNORE 0x0008 +#define ALLOWED_ACKNOWLEDGE 0x0010 +#define ALLOWED_DISPATCH 0x8000 + +#define I24_OPERATION 0x01 +#define I24_AREA 0x06 +#define I24_CLASS 0x80 + +/* Values for error CLASS */ +#define ERRCLASS_OUTRES 1 /* Out of Resource */ +#define ERRCLASS_TEMPSIT 2 /* Temporary Situation */ +#define ERRCLASS_AUTH 3 /* Permission problem */ +#define ERRCLASS_INTRN 4 /* Internal System Error */ +#define ERRCLASS_HRDFAIL 5 /* Hardware Failure */ +#define ERRCLASS_SYSFAIL 6 /* System Failure */ +#define ERRCLASS_APPERR 7 /* Application Error */ +#define ERRCLASS_NOTFND 8 /* Not Found */ +#define ERRCLASS_BADFMT 9 /* Bad Format */ +#define ERRCLASS_LOCKED 10 /* Locked */ +#define ERRCLASS_MEDIA 11 /* Media Failure */ +#define ERRCLASS_ALREADY 12 /* Collision with Existing Item */ +#define ERRCLASS_UNK 13 /* Unknown/other */ +#define ERRCLASS_CANT 14 +#define ERRCLASS_TIME 15 + +/* Values for error ACTION */ +#define ERRACT_RETRY 1 /* Retry */ +#define ERRACT_DLYRET 2 /* Delay Retry, retry after pause */ +#define ERRACT_USER 3 /* Ask user to regive information */ +#define ERRACT_ABORT 4 /* abort with clean up */ +#define ERRACT_PANIC 5 /* abort immediately */ +#define ERRACT_IGNORE 6 /* ignore */ +#define ERRACT_INTRET 7 /* Retry after User Intervention */ + +/* Values for error LOCUS */ +#define ERRLOC_UNK 1 /* No appropriate value */ +#define ERRLOC_DISK 2 /* Random Access Mass Storage */ +#define ERRLOC_NET 3 /* Network */ +#define ERRLOC_SERDEV 4 /* Serial Device */ +#define ERRLOC_MEM 5 /* Memory */ + +/* Abnormal termination codes */ +#define TC_NORMAL 0 +#define TC_HARDERR 1 +#define TC_GP_TRAP 2 +#define TC_SIGNAL 3 + +#define ERROR_SWAPPER_NOT_ACTIVE 32768 +#define ERROR_INVALID_SWAPID 32769 +#define ERROR_IOERR_SWAP_FILE 32770 +#define ERROR_SWAP_TABLE_FULL 32771 +#define ERROR_SWAP_FILE_FULL 32772 +#define ERROR_CANT_INIT_SWAPPER 32773 +#define ERROR_SWAPPER_ALREADY_INIT 32774 +#define ERROR_PMM_INSUFFICIENT_MEMORY 32775 +#define ERROR_PMM_INVALID_FLAGS 32776 +#define ERROR_PMM_INVALID_ADDRESS 32777 +#define ERROR_PMM_LOCK_FAILED 32778 +#define ERROR_PMM_UNLOCK_FAILED 32779 +#define ERROR_PMM_MOVE_INCOMPLETE 32780 +#define ERROR_UCOM_DRIVE_RENAMED 32781 +#define ERROR_UCOM_FILENAME_TRUNCATED 32782 +#define ERROR_UCOM_BUFFER_LENGTH 32783 +#define ERROR_MON_CHAIN_HANDLE 32784 +#define ERROR_MON_NOT_REGISTERED 32785 +#define ERROR_SMG_ALREADY_TOP 32786 +#define ERROR_PMM_ARENA_MODIFIED 32787 +#define ERROR_SMG_PRINTER_OPEN 32788 +#define ERROR_PMM_SET_FLAGS_FAILED 32789 +#define ERROR_INVALID_DOS_DD 32790 +#define ERROR_CPSIO_CODE_PAGE_INVALID 65026 +#define ERROR_CPSIO_NO_SPOOLER 65027 +#define ERROR_CPSIO_FONT_ID_INVALID 65028 +#define ERROR_CPSIO_INTERNAL_ERROR 65033 +#define ERROR_CPSIO_INVALID_PTR_NAME 65034 +#define ERROR_CPSIO_NOT_ACTIVE 65037 +#define ERROR_CPSIO_PID_FULL 65039 +#define ERROR_CPSIO_PID_NOT_FOUND 65040 +#define ERROR_CPSIO_READ_CTL_SEQ 65043 +#define ERROR_CPSIO_READ_FNT_DEF 65045 +#define ERROR_CPSIO_WRITE_ERROR 65047 +#define ERROR_CPSIO_WRITE_FULL_ERROR 65048 +#define ERROR_CPSIO_WRITE_HANDLE_BAD 65049 +#define ERROR_CPSIO_SWIT_LOAD 65074 +#define ERROR_CPSIO_INV_COMMAND 65077 +#define ERROR_CPSIO_NO_FONT_SWIT 65078 + +#endif /* INCL_DOSERRORS */ diff --git a/private/oleauto/tools/win16/os2/inc/bsesub.h b/private/oleauto/tools/win16/os2/inc/bsesub.h new file mode 100644 index 000000000..2b1f91dfd --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/bsesub.h @@ -0,0 +1,565 @@ +/*static char *SCCSID = "@(#)bsesub.h 13.1 91/02/12";*/ +/***************************************************************************\ +* +* Module Name: BSESUB.H +* +* OS/2 Base Include File +* +* Copyright (c) International Business Machines Corporation 1987 +* Copyright (c) Microsoft Corporation 1987 +* +***************************************************************************** +* +* Subcomponents marked with "+" are partially included by default +* #define: To include: +* +* INCL_KBD KBD +* INCL_VIO VIO +* INCL_MOU MOU +\***************************************************************************/ + +#ifdef INCL_SUB + +#define INCL_KBD +#define INCL_VIO +#define INCL_MOU + +#endif /* INCL_SUB */ + +#ifdef INCL_KBD + +typedef SHANDLE HKBD; +typedef HKBD far * PHKBD; + +USHORT APIENTRY KbdRegister (PSZ pszModName, PSZ pszEntryPt, ULONG FunMask); + +#define KR_KBDCHARIN 0x00000001L +#define KR_KBDPEEK 0x00000002L +#define KR_KBDFLUSHBUFFER 0x00000004L +#define KR_KBDGETSTATUS 0x00000008L +#define KR_KBDSETSTATUS 0x00000010L +#define KR_KBDSTRINGIN 0x00000020L +#define KR_KBDOPEN 0x00000040L +#define KR_KBDCLOSE 0x00000080L +#define KR_KBDGETFOCUS 0x00000100L +#define KR_KBDFREEFOCUS 0x00000200L +#define KR_KBDGETCP 0x00000400L +#define KR_KBDSETCP 0x00000800L +#define KR_KBDXLATE 0x00001000L +#define KR_KBDSETCUSTXT 0x00002000L + +#define IO_WAIT 0 +#define IO_NOWAIT 1 + +USHORT APIENTRY KbdDeRegister (void); + +/* KBDKEYINFO structure, for KbdCharIn and KbdPeek */ + +typedef struct _KBDKEYINFO { /* kbci */ + UCHAR chChar; + UCHAR chScan; + UCHAR fbStatus; + UCHAR bNlsShift; + USHORT fsState; + ULONG time; + }KBDKEYINFO; +typedef KBDKEYINFO far *PKBDKEYINFO; + +USHORT APIENTRY KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd); +USHORT APIENTRY KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd); + +/* structure for KbdStringIn() */ + +typedef struct _STRINGINBUF { /* kbsi */ + USHORT cb; + USHORT cchIn; + } STRINGINBUF; +typedef STRINGINBUF far *PSTRINGINBUF; + +USHORT APIENTRY KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fsWait, + HKBD hkbd); + +USHORT APIENTRY KbdFlushBuffer (HKBD hkbd); + +/* KBDINFO structure, for KbdSet/GetStatus */ +typedef struct _KBDINFO { /* kbst */ + USHORT cb; + USHORT fsMask; + USHORT chTurnAround; + USHORT fsInterim; + USHORT fsState; + }KBDINFO; +typedef KBDINFO far *PKBDINFO; + +USHORT APIENTRY KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd); +USHORT APIENTRY KbdGetStatus (PKBDINFO pkbdinfo, HKBD hdbd); + +USHORT APIENTRY KbdSetCp (USHORT usReserved, USHORT pidCP, HKBD hdbd); +USHORT APIENTRY KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd); + +USHORT APIENTRY KbdOpen (PHKBD phkbd); +USHORT APIENTRY KbdClose (HKBD hkbd); + +USHORT APIENTRY KbdGetFocus (USHORT fWait, HKBD hkbd); +USHORT APIENTRY KbdFreeFocus (HKBD hkbd); + +USHORT APIENTRY KbdSynch (USHORT fsWait); + +USHORT APIENTRY KbdSetFgnd(VOID); + +/* structure for KbdGetHWID() */ +typedef struct _KBDHWID { /* kbhw */ + USHORT cb; + USHORT idKbd; + USHORT usReserved1; + USHORT usReserved2; + } KBDHWID; +typedef KBDHWID far *PKBDHWID; + +USHORT APIENTRY KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd); + +/* structure for KbdXlate() */ +typedef struct _KBDTRANS { /* kbxl */ + UCHAR chChar; + UCHAR chScan; + UCHAR fbStatus; + UCHAR bNlsShift; + USHORT fsState; + ULONG time; + USHORT fsDD; + USHORT fsXlate; + USHORT fsShift; + USHORT sZero; + } KBDTRANS; +typedef KBDTRANS far *PKBDTRANS; + +USHORT APIENTRY KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd); +USHORT APIENTRY KbdSetCustXt (PUSHORT usCodePage, HKBD hkbd); + +#endif /* INCL_KBD */ + +#ifdef INCL_VIO + +typedef SHANDLE HVIO; +typedef HVIO far * PHVIO; + +USHORT APIENTRY VioRegister (PSZ pszModName, PSZ pszEntryName, ULONG flFun1, + ULONG flFun2); + +/* first parameter registration constants */ +#define VR_VIOGETCURPOS 0x00000001L +#define VR_VIOGETCURTYPE 0x00000002L +#define VR_VIOGETMODE 0x00000004L +#define VR_VIOGETBUF 0x00000008L +#define VR_VIOGETPHYSBUF 0x00000010L +#define VR_VIOSETCURPOS 0x00000020L +#define VR_VIOSETCURTYPE 0x00000040L +#define VR_VIOSETMODE 0x00000080L +#define VR_VIOSHOWBUF 0x00000100L +#define VR_VIOREADCHARSTR 0x00000200L +#define VR_VIOREADCELLSTR 0x00000400L +#define VR_VIOWRTNCHAR 0x00000800L +#define VR_VIOWRTNATTR 0x00001000L +#define VR_VIOWRTNCELL 0x00002000L +#define VR_VIOWRTTTY 0x00004000L +#define VR_VIOWRTCHARSTR 0x00008000L + +#define VR_VIOWRTCHARSTRATT 0x00010000L +#define VR_VIOWRTCELLSTR 0x00020000L +#define VR_VIOSCROLLUP 0x00040000L +#define VR_VIOSCROLLDN 0x00080000L +#define VR_VIOSCROLLLF 0x00100000L +#define VR_VIOSCROLLRT 0x00200000L +#define VR_VIOSETANSI 0x00400000L +#define VR_VIOGETANSI 0x00800000L +#define VR_VIOPRTSC 0x01000000L +#define VR_VIOSCRLOCK 0x02000000L +#define VR_VIOSCRUNLOCK 0x04000000L +#define VR_VIOSAVREDRAWWAIT 0x08000000L +#define VR_VIOSAVREDRAWUNDO 0x10000000L +#define VR_VIOPOPUP 0x20000000L +#define VR_VIOENDPOPUP 0x40000000L +#define VR_VIOPRTSCTOGGLE 0x80000000L + +/* second parameter registration constants */ +#define VR_VIOMODEWAIT 0x00000001L +#define VR_VIOMODEUNDO 0x00000002L +#define VR_VIOGETFONT 0x00000004L +#define VR_VIOGETCONFIG 0x00000008L +#define VR_VIOSETCP 0x00000010L +#define VR_VIOGETCP 0x00000020L +#define VR_VIOSETFONT 0x00000040L +#define VR_VIOGETSTATE 0x00000080L +#define VR_VIOSETSTATE 0x00000100L + +USHORT APIENTRY VioDeRegister (void); + +USHORT APIENTRY VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio); + +USHORT APIENTRY VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio); +USHORT APIENTRY VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio); + +/* structure for VioSet/GetCurType() */ +typedef struct _VIOCURSORINFO { /* vioci */ + USHORT yStart; + USHORT cEnd; + USHORT cx; + USHORT attr; + } VIOCURSORINFO; +typedef VIOCURSORINFO FAR *PVIOCURSORINFO; + +USHORT APIENTRY VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio); +USHORT APIENTRY VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio); + +/* structure for VioSet/GetMode() */ +typedef struct _VIOMODEINFO { /* viomi */ + USHORT cb; + UCHAR fbType; + UCHAR color; + USHORT col; + USHORT row; + USHORT hres; + USHORT vres; + UCHAR fmt_ID; + UCHAR attrib; + ULONG buf_addr; + ULONG buf_length; + ULONG full_length; + ULONG partial_length; + PCH ext_data_addr; + } VIOMODEINFO; +typedef VIOMODEINFO FAR *PVIOMODEINFO; + +#define VGMT_OTHER 0x01 +#define VGMT_GRAPHICS 0x02 +#define VGMT_DISABLEBURST 0x04 + +USHORT APIENTRY VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio); +USHORT APIENTRY VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio); + +/* structure for VioGetPhysBuf() */ + +typedef struct _VIOPHYSBUF { /* viopb */ + PBYTE pBuf; + ULONG cb; + SEL asel[1]; + } VIOPHYSBUF; +typedef VIOPHYSBUF far *PVIOPHYSBUF; + +USHORT APIENTRY VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved); + +USHORT APIENTRY VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioReadCharStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioWrtCellStr (PCH pchCellStr, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioWrtCharStr (PCH pchStr, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); + +USHORT APIENTRY VioScrollDn (USHORT usTopRow, USHORT usLeftCol, + USHORT usBotRow, USHORT usRightCol, + USHORT cbLines, PBYTE pCell, HVIO hvio); +USHORT APIENTRY VioScrollUp (USHORT usTopRow, USHORT usLeftCol, + USHORT usBotRow, USHORT usRightCol, + USHORT cbLines, PBYTE pCell, HVIO hvio); +USHORT APIENTRY VioScrollLf (USHORT usTopRow, USHORT usLeftCol, + USHORT usBotRow, USHORT usRightCol, + USHORT cbCol, PBYTE pCell, HVIO hvio); +USHORT APIENTRY VioScrollRt (USHORT usTopRow, USHORT usLeftCol, + USHORT usBotRow, USHORT usRightCol, + USHORT cbCol, PBYTE pCell, HVIO hvio); + +USHORT APIENTRY VioWrtNAttr (PBYTE pAttr, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioWrtNCell (PBYTE pCell, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioWrtNChar (PCH pchChar, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT APIENTRY VioWrtTTY (PCH pch, USHORT cb, HVIO hvio); +USHORT APIENTRY VioWrtCharStrAtt (PCH pch, USHORT cb, USHORT usRow, + USHORT usColumn, PBYTE pAttr, HVIO hvio); + +USHORT APIENTRY VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio); + + +#define ANSI_ON 1 +#define ANSI_OFF 0 + +USHORT APIENTRY VioSetAnsi (USHORT fAnsi, HVIO hvio); +USHORT APIENTRY VioGetAnsi (PUSHORT pfAnsi, HVIO hvio); + +USHORT APIENTRY VioPrtSc (HVIO hvio); +USHORT APIENTRY VioPrtScToggle (HVIO hvio); + +#define VSRWI_SAVEANDREDRAW 0 +#define VSRWI_REDRAW 1 + +#define VSRWN_SAVE 0 +#define VSRWN_REDRAW 1 + +#define UNDOI_GETOWNER 0 +#define UNDOI_RELEASEOWNER 1 + +#define UNDOK_ERRORCODE 0 +#define UNDOK_TERMINATE 1 + +USHORT APIENTRY VioRedrawSize (PULONG pcbRedraw); +USHORT APIENTRY VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pNotifyType, + USHORT usReserved); +USHORT APIENTRY VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd, + USHORT usReserved); + +#define VMWR_POPUP 0 +#define VMWN_POPUP 0 + +USHORT APIENTRY VioModeWait (USHORT usReqType, PUSHORT pNotifyType, + USHORT usReserved); +USHORT APIENTRY VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, + USHORT usReserved); + +#define LOCKIO_NOWAIT 0 +#define LOCKIO_WAIT 1 + +#define LOCK_SUCCESS 0 +#define LOCK_FAIL 1 + +USHORT APIENTRY VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio); +USHORT APIENTRY VioScrUnLock (HVIO hvio); + +#define VP_NOWAIT 0x0000 +#define VP_WAIT 0x0001 +#define VP_OPAQUE 0x0000 +#define VP_TRANSPARENT 0x0002 + +USHORT APIENTRY VioPopUp (PUSHORT pfWait, HVIO hvio); +USHORT APIENTRY VioEndPopUp (HVIO hvio); + +/* structure for VioGetConfig() */ + +typedef struct _VIOCONFIGINFO { /* vioin */ + USHORT cb; + USHORT adapter; + USHORT display; + ULONG cbMemory; + USHORT Configuration; + USHORT VDHVersion; + USHORT Flags; + ULONG HWBufferSize; + ULONG FullSaveSize; + ULONG PartSaveSize; + USHORT EMAdaptersOFF; + USHORT EMDisplaysOFF; + } VIOCONFIGINFO; +typedef VIOCONFIGINFO far *PVIOCONFIGINFO; + +USHORT APIENTRY VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, + HVIO hvio); + +/* structure for VioGet/SetFont() */ +typedef struct _VIOFONTINFO { /* viofi */ + USHORT cb; + USHORT type; + USHORT cxCell; + USHORT cyCell; + PVOID pbData; + USHORT cbData; + } VIOFONTINFO; +typedef VIOFONTINFO far *PVIOFONTINFO; + +#define VGFI_GETCURFONT 0 +#define VGFI_GETROMFONT 1 + +USHORT APIENTRY VioGetFont (PVIOFONTINFO pviofi, HVIO hvio); +USHORT APIENTRY VioSetFont (PVIOFONTINFO pviofi, HVIO hvio); + +USHORT APIENTRY VioGetCp (USHORT usReserved, PUSHORT pIdCodePage, HVIO hvio); +USHORT APIENTRY VioSetCp (USHORT usReserved, USHORT idCodePage, HVIO hvio); + +typedef struct _VIOPALSTATE { /* viopal */ + USHORT cb; + USHORT type; + USHORT iFirst; + USHORT acolor[1]; + }VIOPALSTATE; +typedef VIOPALSTATE far *PVIOPALSTATE; + +typedef struct _VIOOVERSCAN { /* vioos */ + USHORT cb; + USHORT type; + USHORT color; + }VIOOVERSCAN; +typedef VIOOVERSCAN far *PVIOOVERSCAN; + +typedef struct _VIOINTENSITY { /* vioint */ + USHORT cb; + USHORT type; + USHORT fs; + }VIOINTENSITY; +typedef VIOINTENSITY far *PVIOINTENSITY; + +typedef struct _VIOCOLORREG { /* viocreg */ + USHORT cb; + USHORT type; + USHORT firstcolorreg; + USHORT numcolorregs; + PCH colorregaddr; + }VIOCOLORREG; +typedef VIOCOLORREG far *PVIOCOLORREG; + +typedef struct _VIOSETULINELOC { /* viouline */ + USHORT cb; + USHORT type; + USHORT scanline; + }VIOSETULINELOC; +typedef VIOSETULINELOC far *PVIOSETULINELOC; + +typedef struct _VIOSETTARGET { /* viosett */ + USHORT cb; + USHORT type; + USHORT defaultalgorithm; + }VIOSETTARGET; +typedef VIOSETTARGET far *PVIOSETTARGET; + +USHORT APIENTRY VioGetState (PVOID pState, HVIO hvio); +USHORT APIENTRY VioSetState (PVOID pState, HVIO hvio); + +/*** VioCheckCharType - Check character type + * + * Returns the chracter type + * + */ + +USHORT APIENTRY VioCheckCharType( + PUSHORT pCharType, /* character type, DBCS 1st, 2nd or SBCS*/ + USHORT usRow, /* row location */ + USHORT usColumn, /* column location */ + HVIO hvio ); /* video handle */ + +#endif /* INCL_VIO */ + +#ifdef INCL_MOU + +typedef SHANDLE HMOU; +typedef HMOU far * PHMOU; + +USHORT APIENTRY MouRegister (PSZ pszModName, PSZ pszEntryName, ULONG flFuns); + +#define MR_MOUGETNUMBUTTONS 0x00000001L +#define MR_MOUGETNUMMICKEYS 0x00000002L +#define MR_MOUGETDEVSTATUS 0x00000004L +#define MR_MOUGETNUMQUEEL 0x00000008L +#define MR_MOUREADEVENTQUE 0x00000010L +#define MR_MOUGETSCALEFACT 0x00000020L +#define MR_MOUGETEVENTMASK 0x00000040L +#define MR_MOUSETSCALEFACT 0x00000080L +#define MR_MOUSETEVENTMASK 0x00000100L +#define MR_MOUOPEN 0x00000800L +#define MR_MOUCLOSE 0x00001000L +#define MR_MOUGETPTRSHAPE 0x00002000L +#define MR_MOUSETPTRSHAPE 0x00004000L +#define MR_MOUDRAWPTR 0x00008000L +#define MR_MOUREMOVEPTR 0x00010000L +#define MR_MOUGETPTRPOS 0x00020000L +#define MR_MOUSETPTRPOS 0x00040000L +#define MR_MOUINITREAL 0x00080000L +#define MR_MOUFLUSHQUE 0x00100000L +#define MR_MOUSETDEVSTATUS 0x00200000L + +USHORT APIENTRY MouDeRegister (void); + +USHORT APIENTRY MouFlushQue (HMOU hmou); + +#define MHK_BUTTON1 0x0001 +#define MHK_BUTTON2 0x0002 +#define MHK_BUTTON3 0x0004 + +/* structure for MouGet/SetPtrPos() */ +typedef struct _PTRLOC { /* moupl */ + USHORT row; + USHORT col; + } PTRLOC; +typedef PTRLOC far *PPTRLOC; + +USHORT APIENTRY MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou); +USHORT APIENTRY MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou); + +/* structure for MouGet/SetPtrShape() */ +typedef struct _PTRSHAPE { /* moups */ + USHORT cb; + USHORT col; + USHORT row; + USHORT colHot; + USHORT rowHot; + } PTRSHAPE; +typedef PTRSHAPE far *PPTRSHAPE; + +USHORT APIENTRY MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou); +USHORT APIENTRY MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou); + +USHORT APIENTRY MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou); + +USHORT APIENTRY MouGetNumButtons (PUSHORT pcButtons, HMOU hmou); +USHORT APIENTRY MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou); + +/* structure for MouReadEventQue() */ +typedef struct _MOUEVENTINFO { /* mouev */ + USHORT fs; + ULONG time; + USHORT row; + USHORT col; + }MOUEVENTINFO; +typedef MOUEVENTINFO far *PMOUEVENTINFO; + +USHORT APIENTRY MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, + HMOU hmou); + +/* structure for MouGetNumQueEl() */ +typedef struct _MOUQUEINFO { /* mouqi */ + USHORT cEvents; + USHORT cmaxEvents; + } MOUQUEINFO; +typedef MOUQUEINFO far *PMOUQUEINFO; + +USHORT APIENTRY MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou); + +USHORT APIENTRY MouGetEventMask (PUSHORT pfsEvents, HMOU hmou); +USHORT APIENTRY MouSetEventMask (PUSHORT pfsEvents, HMOU hmou); + +/* structure for MouGet/SetScaleFact() */ +typedef struct _SCALEFACT { /* mousc */ + USHORT rowScale; + USHORT colScale; + } SCALEFACT; +typedef SCALEFACT far *PSCALEFACT; + +USHORT APIENTRY MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou); +USHORT APIENTRY MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou); + +USHORT APIENTRY MouOpen (PSZ pszDvrName, PHMOU phmou); +USHORT APIENTRY MouClose (HMOU hmou); + +/* structure for MouRemovePtr() */ +typedef struct _NOPTRRECT { /* mourt */ + USHORT row; + USHORT col; + USHORT cRow; + USHORT cCol; + } NOPTRRECT; +typedef NOPTRRECT far *PNOPTRRECT; + +USHORT APIENTRY MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou); + +USHORT APIENTRY MouDrawPtr (HMOU hmou); + +#define MOU_NODRAW 0x0001 +#define MOU_DRAW 0x0000 +#define MOU_MICKEYS 0x0002 +#define MOU_PELS 0x0000 + +USHORT APIENTRY MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou); +USHORT APIENTRY MouInitReal (PSZ); + +USHORT APIENTRY MouSynch(USHORT pszDvrName); + +#endif /* INCL_MOU */ diff --git a/private/oleauto/tools/win16/os2/inc/cmacros.inc b/private/oleauto/tools/win16/os2/inc/cmacros.inc new file mode 100644 index 000000000..b1e219627 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/cmacros.inc @@ -0,0 +1,1236 @@ +comment $ +cmacros - assembly macros for interfacing to hhls +(C)Copyright Microsoft Corp. 1984-1988 +$ +.xcref +.xcref ??_out +??_out macro t +ifndef ?QUIET +%out t +endif +endm +outif macro name,defval,onmsg,offmsg +ifndef name +ifb <defval> +name=0 +else +name=defval +endif +endif +if name +name=1 +ifnb <onmsg> +??_out <! onmsg> +endif +else +ifnb <offmsg> +??_out <! offmsg> +endif +endif +endm +.xcref ??error +??error macro msg +e r r o r ----- msg +.err +endm +.xcref ASMpass +.xcref memS,memM,memL,memC,memH,memMOD,sizec,sized +if1 +ASMpass=1 +ifdef ?SMALL +memS=1 +endif +ifdef ?MEDIUM +memM=1 +endif +ifdef ?COMPACT +memC=1 +endif +ifdef ?LARGE +memL=1 +endif +ifdef ?HUGE +memH=1 +endif +??_out <cMacros Version 5.20 - Copyright (c) Microsoft Corp. 1984-1988> +outif memS,0,<Small model> +outif memM,0,<Medium model> +outif memL,0,<Large model> +outif memC,0,<Compact model> +outif memH,0,<Huge model> +memMOD= memS + memM + memL + memC + memH +if memMOD ne 1 +if memMOD eq 0 +memS = 1 +else +??error <more than 1 memory model selected> +endif +endif +sizec= memM + memL + memH +sized= memL + memC + (memH*2) +outif ?DF,0,<No segments or groups will be defined> +outif ?TF,0,<Epilog sequences assume valid SP> +outif ?WIN,1,<Windows support> +if ?WIN eq 1 +outif ?PLM,1,<> +else +outif ?PLM,1,<PL/M calling convention> +endif +ifndef ?NODATA +?nodata1=0 +else +?nodata1=1 +??_out <! NODATA module> +endif +ifndef ?CHKSTK +?chkstk1=0 +else +?chkstk1=1 +ifdef ?CHKSTKPROC +??_out <! Private stack checking enabled> +else +??_out <! Stack checking enabled> +endif +endif +ifndef DOS5 +?DOS5=0 +else +?DOS5=1 +??_out <! DOS5 module> +endif +ifdef ?PROFILE +??_out <! Native profiling enabled> +endif +else +ASMpass=2 +endif +.xcref ?n,?ax,?ah,?al,?bx,?bh +.xcref ?bl,?cx,?ch,?cl,?dx,?dh +.xcref ?dl,?si,?di,?es,?ds,?bp +.xcref ?sp,?ss,?cs +.xcref ?rsl,?cpd,?argl,?argc,?ba +.xcref ?acb,???,?po +.xcref ?pas,?pc +.xcref uconcat,mpush,mpop +.xcref ?ri,?pp,?pp1,?al1 +.xcref ?ad,?ap,?atal,?dd,?dd1,?dd2 +.xcref ?pg,?pg1,?aloc,?cs1,?cs2 +.xcref ?DF,?TF,?ff,?PLM,?WIN,?ia,?pu,?adj +.xcref ?uf,?rp,?nx,?nd,?nodata1,?chkstk1,?DOS5 +.xcref ?wfp,arg,cCall,cProc,assumes,?cs3,?cs2,?cs1 +.xcref defgrp,addseg,createSeg +.xcref save,outif,errnz,errn$,errnz1 +.xcref ?PLMPrevParm,?gcc +.xcref ?cCall1,?pcc +?rsl = 0 +?cpd = 0 +?argl = 0 +?argc = 0 +?ba = 0 +?acb = 0 +??? = 0 +?po = 0 +?pas = 0 +?pc = 0 +?ia = 0 +?pu = 0 +?adj = 0 +?rp = 0 +?uf = 0 +?nd = 0 +?nx = 0 +?wfp = 0 +?ff = 0 +?dd2 = 0 +?cCall1 = 0 +?pcc = 0 +?PLMPrevParm = 0 +.xcref ?casen +if1 +?casen = 0 +endif +?n = 0000000000000000b +?ax = 0000000000000011b +?ah = 0000000000000001b +?al = 0000000000000010b +?bx = 0000000000001100b +?bh = 0000000000000100b +?bl = 0000000000001000b +?cx = 0000000000110000b +?ch = 0000000000010000b +?cl = 0000000000100000b +?dx = 0000000011000000b +?dh = 0000000001000000b +?dl = 0000000010000000b +?si = 0000000100000000b +?di = 0000001000000000b +?es = 0000010000000000b +?ds = 0000100000000000b +?bp = 0001000000000000b +?sp = 0010000000000000b +?ss = 0100000000000000b +?cs = 1000000000000000b +.cref +uconcat macro a,b,c,d,e,f,g +a&b c&d e&f&g +endm +mpush macro r +irp x,<ax,bx,cx,dx,si,di,es,ds,bp,sp,ss,cs> +if (r and ?&&x) + push x +endif +endm +endm +mpop macro r +irp x,<cs,ss,sp,bp,ds,es,di,si,dx,cx,bx,ax> +if (r and ?&&x) + pop x +endif +endm +endm +save macro r +?rsl=0 +?ri ?rsl,<r> +endm +?ri macro n,r +irp x,<r> +ifdef ?&&x +n=n or ?&&x +endif +endm +endm +.xcref +.xcref parmB,parmW,parmD,parmQ,parmT,parmCP,parmDP +.cref +parmB macro n +?pp <n>,<byte>,2,1 +endm +parmW macro n +?pp <n>,<word>,2,2 +endm +parmD macro n +ife ?PLM +irp x,<n> +?pp <&&x>,<dword>,0,4 +?pp <off_&&x>,<word>,2,2 +?pp <seg_&&x>,<word>,2,2 +endm +else +irp x,<n> +?pp <seg_&&x>,<word>,2,2 +?pp <off_&&x>,<word>,2,2 +?pp <&&x>,<dword>,0,4 +endm +endif +endm +parmQ macro n +?pp <n>,<qword>,8,8 +endm +parmT macro n +?pp <n>,<tbyte>,10,10 +endm +if sizec +parmCP macro n +parmD <n> +endm +else +parmCP macro n +parmW <n> +endm +endif +if sized +parmDP macro n +parmD <n> +endm +else +parmDP macro n +parmW <n> +endm +endif +?pp macro n,t,l,s +if ?cpd +.xcref +irp x,<n> +.xcref ?t&&x +?t&&x=s +ife ?PLM +?pp1 x,<t>,,,%(?po+?adj) +?po=?po+l +else +?PLMPrevParm=?PLMPrevParm+1 +?po=?po+l +?pp1 x,<t>,%?po,%?adj,,%?PLMPrevParm,%(?PLMPrevParm-1) +endif +endm +.cref +else +??error <parm(s) "&n" declared outside proc def> +endif +endm +?pp1 macro n,t,o,a,b,cpc,ppc +ife ?PLM +n equ (t ptr [bp+b]) +else +.xcref +.xcref ?PLMParm&cpc +.cref +?PLMParm&cpc ¯o po +uconcat <n>,,<equ>,,<(t ptr [bp+>,%(a+po-o),<])> +?PLMParm&ppc po +purge ?PLMParm&cpc +&endm +endif +endm +ifndef ?NOPARMR +.xcref +.xcref ?pr,parmR +.cref +parmR macro n,r,r2 +?pr n,r,r2,%?rp,%(?ia+2) +endm +?pr macro n,r,r2,i,o +.xcref +ifnb <r2> +parmR seg_&n,r +parmR off_&n,r2 +n equ (dword ptr [bp-o-2]) +.xcref ?t&n +?t&n=4 +else +.xcref ?rp&i +?rp&i=0 +ifdef ?&r +?rp&i=?&r +endif +if ??? or (?cpd eq 0) or (?rp&i eq 0) +??error <invalid parmR encountered: &n,&r> +exitm +endif +n equ (word ptr [bp-o]) +?t&n=2 +irp x,<bh,ch,dh,bl,cl,dl,ah,al> +if ?&&x eq ?&r +n equ (byte ptr [bp-o]) +?t&n=1 +exitm +endif +endm +?ia=?ia+2 +?rp=?rp+1 +endif +.cref +endm +endif +.xcref +.xcref localB,localW,localD,localQ,localT,localCP,localDP,localV +.cref +localB macro n +?aloc <n>,<byte ptr>,1,1,0 +endm +localW macro n +?aloc <n>,<word ptr>,2,2,1 +endm +localD macro n +irp x,<n> +?aloc <seg_&&x>,<word ptr>,2,2,1 +?aloc <off_&&x>,<word ptr>,2,2,1 +?aloc <&&x>,<dword ptr>,0,4,1 +endm +endm +localQ macro n +?aloc <n>,<qword ptr>,8,8,1 +endm +localT macro n +?aloc <n>,<tbyte ptr>,10,10,1 +endm +if sizec +localCP macro n +localD <n> +endm +else +localCP macro n +localW <n> +endm +endif +if sized +localDP macro n +localD <n> +endm +else +localDP macro n +localW <n> +endm +endif +localV macro n,a +?aloc <n>,,%(a),0,1 +endm +?aloc macro n,t,l,s,a +if ?cpd +.xcref +irp x,<n> +???=???+l +if a +???=((??? + 1) and 0fffeh) +endif +?al1 x,<t>,%(???+?ia) +.xcref ?t&&x +?t&&x=s +endm +.cref +else +??error <locals "&n" declared outside procedure def> +endif +endm +?al1 macro n,t,o +n equ (t [bp-o]) +endm +?gcc macro s,i,cc +s = i +ifnb <cc> +ifidn <cc>,<C> +s=0 +endif +ifidn <cc>,<PLM> +s=1 +endif +ifidn <cc>,<PASCAL> +s=1 +endif +endif +endm +ifndef ?NOGLOBAL +.xcref +.xcref globalB,globalW,globalD,globalQ,globalT,globalCP,globalDP +.cref +globalB macro n,i,s,c +?ad <n>,1 +?dd n,1,<byte>,<db>,<i>,<s>,<c> +endm +globalW macro n,i,s,c +?ad <n>,2 +?dd n,1,<word>,<dw>,<i>,<s>,<c> +endm +globalD macro n,i,s,c +?ad <n>,4 +?dd n,1,<dword>,<dd>,<i>,<s>,<c> +off_&n equ n +seg_&n equ n[2] +endm +globalQ macro n,i,s,c +?ad <n>,8 +?dd n,1,<qword>,<dq>,<i>,<s>,<c> +endm +globalT macro n,i,s,c +?ad <n>,10 +?dd n,1,<tbyte>,<dt>,<i>,<s>,<c> +endm +if sizec +globalCP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalCP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +if sized +globalDP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalDP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +endif +ifndef ?NOSTATIC +.xcref +.xcref staticB,staticW,staticD,staticQ,staticT,staticCP,staticDP +.cref +staticB macro n,i,s +?ad <n>,1 +?dd n,0,<byte>,<db>,<i>,<s>,<PLM> +endm +staticW macro n,i,s +?ad <n>,2 +?dd n,0,<word>,<dw>,<i>,<s>,<PLM> +endm +staticD macro n,i,s +?ad <n>,4 +?dd n,0,<dword>,<dd>,<i>,<s>,<PLM> +endm +staticQ macro n,i,s +?ad <n>,8 +?dd n,0,<qword>,<dq>,<i>,<s>,<PLM> +endm +staticT macro n,i,s +?ad <n>,10 +?dd n,0,<tbyte>,<dt>,<i>,<s>,<PLM> +endm +if sizec +staticCP macro n,i,s +staticD n,<i>,<s> +endm +else +staticCP macro n,i,s +staticW n,<i>,<s> +endm +endif +if sized +staticDP macro n,i,s +staticD n,<i>,<s> +endm +else +staticDP macro n,i,s +staticW n,<i>,<s> +endm +endif +endif +?dd macro n,p,t,d,i,s,c +?gcc ?dd2,%?PLM,<c> +ife ?dd2 +n label t +?dd1 _&n,p,<d>,<i>,<s> +else +?dd1 n,p,<d>,<i>,<s> +endif +endm +?dd1 macro n,p,d,i,s +if p +public n +endif +ifb <s> +n d i +else +ifb <i> +n d s dup (?) +else +n d s dup (i) +endif +endif +endm +ifndef ?NOEXTERN +.xcref +.xcref ?ex1,?ex2,externB,externW,externD,externQ,externT +.xcref externNP,externFP,externP,externCP,externDP,externA +.cref +?ex2 = 0 +externA macro n,c +?ex1 <n>,40h,<abs>,<c>,<> +endm +externB macro n,c +?ex1 <n>,1,<byte>,<c>,<> +endm +externW macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +externD macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +externQ macro n,c +?ex1 <n>,8,<qword>,<c>,<> +endm +externT macro n,c +?ex1 <n>,10,<tbyte>,<c>,<> +endm +externNP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +externFP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +if sizec +externP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +else +externP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +endif +if sizec +externCP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externCP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +if sized +externDP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externDP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +?ex1 macro n,s,d,c,scv +?gcc ?ex2,%?PLM,<c> +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?ex2 +extrn _&&x:&d +x equ _&&x +else +extrn x:&d +endif +ifidn <scv>,<cc> +.xcref +.xcref ?CC&&x +.cref +?CC&&x=?ex2 +endif +endm +endm +endif +ifndef ?NOLABEL +.xcref +.xcref ?lb1,?lblpu,?lb2 +.xcref labelB,labelW,labelD,labelQ,labelT +.xcref labelNP,labelFP,labelP,labelCP,labelDP +.cref +?lblpu = 0 +?lb2 = 0 +labelB macro n,c +?lb1 <n>,1,<byte>,<c> +endm +labelW macro n,c +?lb1 <n>,2,<word>,<c> +endm +labelD macro n,c +?lb1 <n>,4,<dword>,<c> +endm +labelQ macro n,c +?lb1 <n>,8,<qword>,<c> +endm +labelT macro n,c +?lb1 <n>,10,<tbyte>,<c> +endm +labelNP macro n,c +?lb1 <n>,2,<near>,<c> +endm +labelFP macro n,c +?lb1 <n>,4,<far>,<c> +endm +if sizec +labelP macro n,c +?lb1 <n>,4,<far>,<c> +endm +else +labelP macro n,c +?lb1 <n>,2,<near>,<c> +endm +endif +if sizec +labelCP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelCP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +if sized +labelDP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelDP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +?lb1 macro n,s,d,c +?gcc ?lb2,%?PLM,<c> +?lblpu=0 +irp x,<n> +ifidn <x>,<PUBLIC> +?lblpu=1 +else +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?lb2 +if ?lblpu +public _&&x +endif +_&&x label &d +x equ _&&x +else +if ?lblpu +public x +endif +x label &d +endif +endif +endm +endm +endif +ifndef ?NODEF +.xcref +.xcref defB,defW,defD,defQ,defT,defCP,defDP +.cref +defB macro n +?ad <n>,1 +endm +defW macro n +?ad <n>,2 +endm +defD macro n +?ad <n>,4 +endm +defQ macro n +?ad <n>,8 +endm +defT macro n +?ad <n>,10 +endm +if sizec +defCP macro n +defD <n> +endm +else +defCP macro n +defW <n> +endm +endif +if sized +defDP macro n +defD <n> +endm +else +defDP macro n +defW <n> +endm +endif +endif +?ad macro n,s +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +endm +endm +ifndef ?NOPTR +.xcref +.xcref regPtr,farPtr +.cref +regPtr macro n,s,o +farPtr n,s,o +endm +farPtr macro n,s,o +.xcref +.xcref ?t&n +.cref +n ¯o + push s + push o +&endm +?t&n=80h +endm +endif +arg macro a +irp x,<a> +?argc=?argc+1 +?atal <x>,%?argc +endm +endm +?atal macro n,i +.xcref +.xcref ?ali&i +.cref +?ali&i ¯o +?ap n +&endm +endm +?ap macro n +?argl=?argl+2 +ifdef ?t&n +ife ?t&n-1 + push word ptr (n) +exitm +endif +ife ?t&n-2 + push n +exitm +endif +ife ?t&n-4 + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+2 +exitm +endif +ife ?t&n-8 + push word ptr (n)[6] + push word ptr (n)[4] + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+6 +exitm +endif +if ?t&n and 80h +n +?argl=?argl+2 +exitm +endif +ife ?t&n + push word ptr (n) +exitm +endif +endif + push n +endm +cCall macro n,a,c +ifnb <a> +arg <a> +endif +mpush %?rsl +ifdef ?CC&n +?cCall1=?CC&n +else +?cCall1=?PLM +endif +ifnb <c> +?gcc ?cCall1,%?cCall1,<c> +endif +?argl=0 +ife ?cCall1 +?acb=?argc +else +?acb=1 +endif +rept ?argc +uconcat <?ali>,%?acb +uconcat <purge>,,<?ali>,%?acb +ife ?cCall1 +?acb=?acb-1 +else +?acb=?acb+1 +endif +endm + call n +if ((?cCall1 eq 0) and (?argl ne 0)) + add sp,?argl +endif +mpop %?rsl +?rsl=0 +?argc= 0 +?argl= 0 +endm +cProc macro n,cf,a +if ?cpd +?utpe +endif +?cpd=1 +???=0 +?argc=0 +?ba=0 +?po=0 +?pu=0 +?ia=0 +?adj=4 +?rp=0 +?uf=0 +?wfp=?WIN +?ff=0 +?pas=0 +?pcc=?PLM +ifnb <a> +?ri ?pas,<a> +endif +?pc=sizec +?nd=?nodata1 +?nx=0 +irp x,<cf> +ifidn <x>,<FAR> +?pc=1 +endif +ifidn <x>,<NEAR> +?pc=0 +endif +ifidn <x>,<PUBLIC> +?pu=1 +endif +ifidn <x>,<SMALL> +?uf=1 +endif +ifidn <x>,<DATA> +?nd=0 +endif +ifidn <x>,<NODATA> +?nd=1 +endif +ifidn <x>,<ATOMIC> +?nx=1 +endif +ifidn <x>,<C> +?pcc=0 +endif +ifidn <x>,<PLM> +?pcc=1 +endif +ifidn <x>,<PASCAL> +?pcc=1 +endif +ifidn <x>,<WIN> +?wfp=1 +endif +ifidn <x>,<NONWIN> +?wfp=0 +endif +endm +if ?pcc +?PLMPrevParm=0 +.xcref +.xcref ?PLMParm0 +.cref +?PLMParm0 ¯o +purge ?PLMParm0 +&endm +endif +.xcref +.xcref ?CC&n +.cref +?CC&n=?pcc +if (?nx eq 1) and (?nd eq 0) +?nx = 0 +??error <ATOMIC specified without NODATA - ATOMIC ignored> +endif +if ?pc +if ?wfp +ife ?nx +?ia=2 +?pas = ?pas and (not ?ds) +endif +endif +?adj=?adj+2 +else +?wfp=0 +endif +?pas = ?pas and (not (?sp+?cs+?ss)) +if ?uf +?pas = ?pas and (not (?bp+?si+?di)) +endif +ife ?pcc +?pg <_&n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +else +?pg <n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +endif +endm +?pg macro n,p,c,a,w,nnu,cc +.xcref +if ?uf +if ?nd +??error <NODATA encountered in &n - user frame ignored> +?uf=0 +endif +endif +.xcref cBegin +cBegin ¯o g +.xcref +if cc +uconcat <?PLMParm>,%?PLMPrevParm,%?po +endif +if ?uf +if ?rp +??error <parmR encountered in &n - user frame ignored> +?uf=0 +endif +endif +?pg1 <n>,c,a,%?po,w,%?uf,%?nd,%?rp,cc +?cpd=0 +?argc=0 +?ba=1 +???=(???+1) and 0fffeh +if p +public n +endif +ife c +n proc near +else +n proc far +endif +ife cc +nnu equ n +endif +ifidn <g>,<nogen> +if ???+?po+a+?rp +??_out <cBegin - possible invalid use of nogen> +endif +else +if ?uf +?mf c,%???,%?po +mpush a +else +if w +ife ?nd + mov ax,ds + nop +endif +ife ?nx +ife ?DOS5 + inc bp +endif + push bp + mov bp,sp + push ds +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +ife ?nd + mov ds,ax +endif +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +if ?rp +?uf=0 +rept ?rp +uconcat mpush,,?rp,%?uf +?uf=?uf+1 +endm +endif +if ??? +if ?chkstk1 +ifdef ?CHKSTKPROC +?CHKSTKPROC %??? +else + mov ax,??? +ife cc + call _chkstk +else + call chkstk +endif +endif +else + sub sp,??? +endif +endif +mpush a +endif +ifdef ?PROFILE +if c + call StartNMeas +endif +endif +endif +.cref +purge cBegin +&endm +.xcref ?utpe +?utpe ¯o +??error <unterminated procedure definition: "&n"> +&endm +.cref +endm +?pg1 macro n,c,a,o,w,f,d,r,cc +.xcref +.xcref cEnd +cEnd ¯o g +.xcref +?ba=0 +ifidn <g>,<nogen> +if o+a+r +??_out <cEnd - possible invalid use of nogen> +endif +else +ifdef ?PROFILE +if c +call StopNMeas +endif +endif +mpop a +if f + db 0c3h +else +if w +ife ?nx +if (?TF eq 0) or (???+?rp) + lea sp,-2[bp] +endif + pop ds + pop bp +ife ?DOS5 + dec bp +endif +else +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif +if ???+?po+?rp + pop bp +endif +endif +else +if ?ff+???+?po+?rp +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif + pop bp +endif +endif +ife cc + ret +else + ret o +endif +endif +endif +n endp +.cref +purge cEnd +&endm +.cref +endm +assumes macro s,ln +ifndef ln&_assumes +assume s:ln +else +ln&_assumes s +endif +endm +createSeg macro n,ln,a,co,cl,grp +ifnb <grp> +addseg grp,n +else +ln&OFFSET equ offset n: +ln&BASE equ n +?cs3 <ln>,<n> +endif +ifnb <cl> +n segment a co '&cl' +else +n segment a co +endif +n ends +?cs1 <ln>,<n> +endm +addseg macro grp,seg +.xcref +.xcref grp&_def +.cref +ifndef grp&_def +grp&_def=0 +endif +if grp&_def ne ASMpass +.xcref +.xcref grp&_add +.cref +grp&_add ¯o s +grp&_in <seg>,s +&endm +.xcref +.xcref grp&_in +.cref +grp&_in ¯o sl,s +ifb <s> +grp group sl +else +grp&_add ¯o ns +grp&_in <sl,s>,ns +&endm +endif +&endm +grp&_def=ASMpass +else +grp&_add seg +endif +endm +defgrp macro grp,ln +addseg grp +ifnb <ln> +irp x,<ln> +?cs3 <&x>,<grp> +x&&OFFSET equ offset grp: +x&&BASE equ grp +endm +endif +endm +?cs1 macro ln,n +.xcref +.xcref ln&_sbegin +.cref +ln&_sbegin ¯o +.xcref +.xcref ?mf +.cref +?mf &¯o c,l,p +if c + extrn n&_FARFRAME:near + call n&_FARFRAME +else + extrn n&_NEARFRAME:near + call n&_NEARFRAME +endif + db l shr 1 + db p shr 1 +&&endm +?cs2 <ln>,<n> +n segment +&endm +endm +?cs2 macro ln,n +.xcref +.xcref sEnd +.cref +sEnd ¯o +n ends +purge ?mf +purge sEnd +&endm +endm +?cs3 macro ln,n +.xcref +.xcref ln&_assumes +.cref +ln&_assumes ¯o s +assume s:&n +&endm +endm +.xcref +.xcref sBegin +.cref +sBegin macro ln +ln&_sbegin +endm +ife ?DF +createSeg _TEXT,Code,word,public,CODE +ife ?nodata1 +createSeg _DATA,Data,word,public,DATA,DGROUP +defgrp DGROUP,Data +endif +if ?chkstk1 +ifndef ?CHKSTKPROC +externp <chkstk> +endif +endif +endif +errnz macro x +if2 +if x +errnz1 <x>,%(x) +endif +endif +endm +errnz1 macro x1,x2 += *errnz* x1 = x2 +.err +endm +errn$ macro l,x +errnz <offset $ - offset l x> +endm +ifdef ?PROFILE +externFP <StartNMeas,StopNMeas> +endif diff --git a/private/oleauto/tools/win16/os2/inc/commdlg.h b/private/oleauto/tools/win16/os2/inc/commdlg.h new file mode 100644 index 000000000..4246cc838 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/commdlg.h @@ -0,0 +1,286 @@ + + +#ifndef COMMDLG_H_INCLUDED +#define COMMDLG_H_INCLUDED + +#ifdef __cplusplus +extern "C" { +#endif + + + /*--------------------------------------------------------------------------- + * commdlg.h -- Common dialog definitions. Windows.h must be included first. + *--------------------------------------------------------------------------- + */ + +typedef struct tagOFN + { + DWORD lStructSize; + HWND hwndOwner; + HANDLE hInstance; + LPSTR lpstrFilter; + LPSTR lpstrCustomFilter; + DWORD nMaxCustFilter; + DWORD nFilterIndex; + LPSTR lpstrFile; + DWORD nMaxFile; + LPSTR lpstrFileTitle; + DWORD nMaxFileTitle; + LPSTR lpstrInitialDir; + LPSTR lpstrTitle; + DWORD Flags; + WORD nFileOffset; + WORD nFileExtension; + LPSTR lpstrDefExt; + DWORD lCustData; + BOOL (FAR PASCAL *lpfnHook)(HWND, unsigned, WORD, LONG); + LPSTR lpTemplateName; + } OPENFILENAME; +typedef OPENFILENAME FAR * LPOPENFILENAME; + +BOOL FAR PASCAL GetOpenFileName(LPOPENFILENAME); +BOOL FAR PASCAL GetSaveFileName(LPOPENFILENAME); +short FAR PASCAL GetFileTitle(LPSTR, LPSTR, WORD); + +#define OFN_READONLY 0x00000001 +#define OFN_OVERWRITEPROMPT 0x00000002 +#define OFN_HIDEREADONLY 0x00000004 +#define OFN_NOCHANGEDIR 0x00000008 +#define OFN_SHOWHELP 0x00000010 +#define OFN_ENABLEHOOK 0x00000020 +#define OFN_ENABLETEMPLATE 0x00000040 +#define OFN_ENABLETEMPLATEHANDLE 0x00000080 +#define OFN_NOVALIDATE 0x00000100 +#define OFN_ALLOWMULTISELECT 0x00000200 +#define OFN_EXTENTIONDIFFERENT 0x00000400 +#define OFN_PATHMUSTEXIST 0x00000800 +#define OFN_FILEMUSTEXIST 0x00001000 +#define OFN_CREATEPROMPT 0x00002000 +#define OFN_SHAREAWARE 0x00004000 +#define OFN_NOREADONLYRETURN 0x00008000 + +/* Return values for the registered message sent to the hook function + * when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the + * filename to be accepted, OFN_SHARENOWARN rejects the name but puts + * up no warning (returned when the app has already put up a warning + * message), and OFN_SHAREWARN puts up the default warning message + * for sharing violations. + * + * Note: Undefined return values map to OFN_SHAREWARN. + */ + +#define OFN_SHAREFALLTHROUGH 2 +#define OFN_SHARENOWARN 1 +#define OFN_SHAREWARN 0 + +/* Avoids sharing violations. Defined 21 Jan 1991 clarkc */ +#define SHARE_EXIST (OF_EXIST | OF_SHARE_DENY_NONE) + +typedef struct + { + DWORD lStructSize; + HWND hwndOwner; + HWND hInstance; + DWORD rgbResult; + LPDWORD lpCustColors; + DWORD Flags; + DWORD lCustData; + WORD (FAR PASCAL *lpfnHook)(HWND, unsigned, WORD, LONG); + LPSTR lpTemplateName; + } CHOOSECOLOR; +typedef CHOOSECOLOR FAR *LPCHOOSECOLOR; + +BOOL FAR PASCAL ChooseColor(LPCHOOSECOLOR); + +#define CC_RGBINIT 0x00000001 +#define CC_FULLOPEN 0x00000002 +#define CC_PREVENTFULLOPEN 0x00000004 +#define CC_SHOWHELP 0x00000008 +#define CC_ENABLEHOOK 0x00000010 +#define CC_ENABLETEMPLATE 0x00000020 +#define CC_ENABLETEMPLATEHANDLE 0x00000040 + +typedef struct + { + DWORD lStructSize; /* size of this struct 0x20 */ + HWND hwndOwner; /* handle to owner's window */ + HANDLE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + DWORD Flags; /* one or more of the FR_?? */ + LPSTR lpstrFindWhat; /* ptr. to search string */ + LPSTR lpstrReplaceWith; /* ptr. to replace string */ + WORD wFindWhatLen; /* size of find buffer */ + WORD wReplaceWithLen; /* size of replace buffer */ + DWORD lCustData; /* data passed to hook fn. */ + BOOL (FAR PASCAL *lpfnHook)(HWND, unsigned, WORD, LONG); + /* ptr. to hook fn. or NULL */ + LPSTR lpTemplateName; /* custom template name */ + } FINDREPLACE; + +typedef FINDREPLACE FAR *LPFINDREPLACE; + +#define FR_DOWN 0x00000001 +#define FR_WHOLEWORD 0x00000002 +#define FR_MATCHCASE 0x00000004 +#define FR_FINDNEXT 0x00000008 +#define FR_REPLACE 0x00000010 +#define FR_REPLACEALL 0x00000020 +#define FR_DIALOGTERM 0x00000040 +#define FR_SHOWHELP 0x00000080 +#define FR_ENABLEHOOK 0x00000100 +#define FR_ENABLETEMPLATE 0x00000200 +#define FR_NOUPDOWN 0x00000400 +#define FR_NOMATCHCASE 0x00000800 +#define FR_NOWHOLEWORD 0x00001000 +#define FR_ENABLETEMPLATEHANDLE 0x00002000 +#define FR_HIDEUPDOWN 0x00004000 +#define FR_HIDEMATCHCASE 0x00008000 +#define FR_HIDEWHOLEWORD 0x00010000 + +HWND FAR PASCAL FindText(LPFINDREPLACE); +HWND FAR PASCAL ReplaceText(LPFINDREPLACE); + +typedef struct + { + DWORD lStructSize; /* */ + HWND hwndOwner; /* caller's window handle */ + HDC hDC; /* printer DC/IC or NULL */ + LPLOGFONT lpLogFont; /* ptr. to a LOGFONT struct */ + int iPointSize; /* 10 * size in points of selected font */ + DWORD Flags; /* enum. type flags */ + DWORD rgbColors; /* returned text color */ + DWORD lCustData; /* data passed to hook fn. */ + BOOL (FAR PASCAL *lpfnHook)(HWND, unsigned, WORD, LONG); + /* ptr. to hook function */ + LPSTR lpTemplateName; /* custom template name */ + HANDLE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + LPSTR lpszStyle; /* return the style field here + * must be LF_FACESIZE or bigger */ + WORD nFontType; /* same value reported to the EnumFonts + * call back with the extra FONTTYPE_ + * bits added */ + int nSizeMin; /* minimum pt size allowed & */ + int nSizeMax; /* max pt size allowed if */ + /* CF_LIMITSIZE is used */ + } CHOOSEFONT; + typedef CHOOSEFONT FAR *LPCHOOSEFONT; + +BOOL FAR PASCAL ChooseFont(LPCHOOSEFONT); + +#define CF_SCREENFONTS 0x00000001 +#define CF_PRINTERFONTS 0x00000002 +#define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS) +#define CF_SHOWHELP 0x00000004L +#define CF_ENABLEHOOK 0x00000008L +#define CF_ENABLETEMPLATE 0x00000010L +#define CF_ENABLETEMPLATEHANDLE 0x00000020L +#define CF_INITTOLOGFONTSTRUCT 0x00000040L +#define CF_USESTYLE 0x00000080L +#define CF_EFFECTS 0x00000100L +#define CF_APPLY 0x00000200L +#define CF_ANSIONLY 0x00000400L +#define CF_NOVECTORFONTS 0x00000800L +#define CF_NOSIMULATIONS 0x00001000L +#define CF_LIMITSIZE 0x00002000L +#define CF_FIXEDPITCHONLY 0x00004000L +#define CF_WYSIWYG 0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */ +#define CF_FORCEFONTEXIST 0x00010000L +#define CF_SCALABLEONLY 0x00020000L +#define CF_TTONLY 0x00040000L +#define CF_NOFACESEL 0x00080000L +#define CF_NOSTYLESEL 0x00100000L +#define CF_NOSIZESEL 0x00200000L + +/* these are extra nFontType bits that are added to what is returned to the + * EnumFonts callback routine */ + +#define SIMULATED_FONTTYPE 0x8000 +#define PRINTER_FONTTYPE 0x4000 +#define SCREEN_FONTTYPE 0x2000 +#define BOLD_FONTTYPE 0x0100 +#define ITALIC_FONTTYPE 0x0200 +#define REGULAR_FONTTYPE 0x0400 + +#define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1) + + +/* strings used to obtain unique window message for communication + * between dialog and caller + */ +#define LBSELCHSTRING "commdlg_LBSelChangedNotify" +#define SHAREVISTRING "commdlg_ShareViolation" +#define FINDMSGSTRING "commdlg_FindReplace" +#define HELPMSGSTRING "commdlg_help" + + +typedef struct tagPD + { + DWORD lStructSize; + HWND hwndOwner; + HANDLE hDevMode; + HANDLE hDevNames; + HDC hDC; + DWORD Flags; + WORD nFromPage; + WORD nToPage; + WORD nMinPage; + WORD nMaxPage; + WORD nCopies; + HANDLE hInstance; + DWORD lCustData; + int (FAR PASCAL *lpfnPrintHook)(HWND, WORD, WORD, LONG); + int (FAR PASCAL *lpfnSetupHook)(HWND, WORD, WORD, LONG); + LPSTR lpPrintTemplateName; + LPSTR lpSetupTemplateName; + HANDLE hPrintTemplate; + HANDLE hSetupTemplate; + } PRINTDLG; +typedef PRINTDLG FAR * LPPRINTDLG; + +BOOL FAR PASCAL PrintDlg(LPPRINTDLG); + +#define PD_ALLPAGES 0x00000000 +#define PD_SELECTION 0x00000001 +#define PD_PAGENUMS 0x00000002 +#define PD_NOSELECTION 0x00000004 +#define PD_NOPAGENUMS 0x00000008 +#define PD_COLLATE 0x00000010 +#define PD_PRINTTOFILE 0x00000020 +#define PD_PRINTSETUP 0x00000040 +#define PD_NOWARNING 0x00000080 +#define PD_RETURNDC 0x00000100 +#define PD_RETURNIC 0x00000200 +#define PD_RETURNDEFAULT 0x00000400 +#define PD_SHOWHELP 0x00000800 +#define PD_ENABLEPRINTHOOK 0x00001000 +#define PD_ENABLESETUPHOOK 0x00002000 +#define PD_ENABLEPRINTTEMPLATE 0x00004000 +#define PD_ENABLESETUPTEMPLATE 0x00008000 +#define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000 +#define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000 +#define PD_USEDEVMODECOPIES 0x00040000 +#define PD_DISABLEPRINTTOFILE 0x00080000 +#define PD_HIDEPRINTTOFILE 0x00100000 + +typedef struct tagDEVNAMES + { + WORD wDriverOffset; + WORD wDeviceOffset; + WORD wOutputOffset; + WORD wDefault; + } DEVNAMES; +typedef DEVNAMES FAR * LPDEVNAMES; + +#define DN_DEFAULTPRN 0x0001 + + +DWORD FAR PASCAL CommDlgExtendedError(VOID); + +#ifdef __cplusplus +} // extern "C" { +#endif + +#endif // COMMDLG_H_INCLUDED diff --git a/private/oleauto/tools/win16/os2/inc/conio.h b/private/oleauto/tools/win16/os2/inc/conio.h new file mode 100644 index 000000000..7c42cd9a4 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/conio.h @@ -0,0 +1,73 @@ +/*** +*conio.h - console and port I/O declarations +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* the MS C V2.03 compatible console and port I/O routines. +* +****/ + +#ifndef _INC_CONIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* function prototypes */ + +#ifndef _WINDOWS +char * __cdecl _cgets(char *); +int __cdecl _cprintf(const char *, ...); +int __cdecl _cputs(const char *); +int __cdecl _cscanf(const char *, ...); +int __cdecl _getch(void); +int __cdecl _getche(void); +#endif +int __cdecl _inp(unsigned); +unsigned __cdecl _inpw(unsigned); +#ifndef _WINDOWS +int __cdecl _kbhit(void); +#endif +int __cdecl _outp(unsigned, int); +unsigned __cdecl _outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl _putch(int); +int __cdecl _ungetch(int); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _WINDOWS +char * __cdecl cgets(char *); +int __cdecl cprintf(const char *, ...); +int __cdecl cputs(const char *); +int __cdecl cscanf(const char *, ...); +int __cdecl getch(void); +int __cdecl getche(void); +#endif +int __cdecl inp(unsigned); +unsigned __cdecl inpw(unsigned); +#ifndef _WINDOWS +int __cdecl kbhit(void); +#endif +int __cdecl outp(unsigned, int); +unsigned __cdecl outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl putch(int); +int __cdecl ungetch(int); +#endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_CONIO +#endif /* _INC_CONIO */ diff --git a/private/oleauto/tools/win16/os2/inc/ctype.h b/private/oleauto/tools/win16/os2/inc/ctype.h new file mode 100644 index 000000000..46749e148 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ctype.h @@ -0,0 +1,116 @@ +/*** +*ctype.h - character conversion macros and ctype macros +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines macros for character classification/conversion. +* [ANSI/System V] +* +****/ + +#ifndef _INC_CTYPE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* + * This declaration allows the user access to the ctype look-up + * array _ctype defined in ctype.obj by simply including ctype.h + */ + +extern unsigned char __near __cdecl _ctype[]; + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +/* character classification function prototypes */ + +#ifndef _CTYPE_DEFINED +int __cdecl isalpha(int); +int __cdecl isupper(int); +int __cdecl islower(int); +int __cdecl isdigit(int); +int __cdecl isxdigit(int); +int __cdecl isspace(int); +int __cdecl ispunct(int); +int __cdecl isalnum(int); +int __cdecl isprint(int); +int __cdecl isgraph(int); +int __cdecl iscntrl(int); +int __cdecl toupper(int); +int __cdecl tolower(int); +int __cdecl _tolower(int); +int __cdecl _toupper(int); +int __cdecl __isascii(int); +int __cdecl __toascii(int); +int __cdecl __iscsymf(int); +int __cdecl __iscsym(int); +#define _CTYPE_DEFINED +#endif + + +/* the character classification macro definitions */ + +#define isalpha(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER) ) +#define isupper(_c) ( (_ctype+1)[_c] & _UPPER ) +#define islower(_c) ( (_ctype+1)[_c] & _LOWER ) +#define isdigit(_c) ( (_ctype+1)[_c] & _DIGIT ) +#define isxdigit(_c) ( (_ctype+1)[_c] & _HEX ) +#define isspace(_c) ( (_ctype+1)[_c] & _SPACE ) +#define ispunct(_c) ( (_ctype+1)[_c] & _PUNCT ) +#define isalnum(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER|_DIGIT) ) +#define isprint(_c) ( (_ctype+1)[_c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define isgraph(_c) ( (_ctype+1)[_c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define iscntrl(_c) ( (_ctype+1)[_c] & _CONTROL ) +#ifndef __STDC__ +#define toupper(_c) ( (islower(_c)) ? _toupper(_c) : (_c) ) +#define tolower(_c) ( (isupper(_c)) ? _tolower(_c) : (_c) ) +#endif +#define _tolower(_c) ( (_c)-'A'+'a' ) +#define _toupper(_c) ( (_c)-'a'+'A' ) +#define __isascii(_c) ( (unsigned)(_c) < 0x80 ) +#define __toascii(_c) ( (_c) & 0x7f ) + +/* extended ctype macros */ + +#define __iscsymf(_c) (isalpha(_c) || ((_c) == '_')) +#define __iscsym(_c) (isalnum(_c) || ((_c) == '_')) + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _CTYPE_DEFINED +int __cdecl isascii(int); +int __cdecl toascii(int); +int __cdecl iscsymf(int); +int __cdecl iscsym(int); +#else +#define isascii __isascii +#define toascii __toascii +#define iscsymf __iscsymf +#define iscsym __iscsym +#endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_CTYPE +#endif /* _INC_CTYPE */ diff --git a/private/oleauto/tools/win16/os2/inc/custcntl.h b/private/oleauto/tools/win16/os2/inc/custcntl.h new file mode 100644 index 000000000..ee0ee0cf9 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/custcntl.h @@ -0,0 +1,82 @@ +/* + * CUSTOM CONTROL LIBRARY - HEADER FILE + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* general size definitions */ +#define CTLTYPES 12 /* number of control types */ +#define CTLDESCR 22 /* size of control menu name */ +#define CTLCLASS 20 /* max size of class name */ +#define CTLTITLE 94 /* max size of control text */ + +/* + * CONTROL STYLE DATA STRUCTURE + * + * This data structure is used by the class style dialog function + * to set and/or reset various control attributes. + */ + +typedef struct { + WORD wX; /* x origin of control */ + WORD wY; /* y origin of control */ + WORD wCx; /* width of control */ + WORD wCy; /* height of control */ + WORD wId; /* control child id */ + DWORD dwStyle; /* control style */ + char szClass[CTLCLASS]; /* name of control class */ + char szTitle[CTLTITLE]; /* control text */ +} CTLSTYLE; + +typedef CTLSTYLE *PCTLSTYLE; +typedef CTLSTYLE FAR *LPCTLSTYLE; + +/* + * CONTROL DATA STRUCTURE + * + * This data structure is returned by the control options function + * when enquiring about the capabilities of a particular control. + * Each control may contain various types (with predefined style + * bits) under one general class. + * + * The width and height fields are used to provide the host + * application with a suggested size. The values in these fields + * could be either in pixels or in rc coordinates. If it is in pixel, + * the most sigificant bit(MSB) is on. If the MSB is off, it is in rc + * coordinates. + * + * The cursor and bitmap handles reference objects which can be + * used by the dialog editor in the placement and definition of + * new, user-defined control classes. However, dialog editor in win30 + * does not use these fields. + */ + +typedef struct { + WORD wType; /* type style */ + WORD wWidth; /* suggested width */ + WORD wHeight; /* suggested height */ + DWORD dwStyle; /* default style */ + char szDescr[CTLDESCR]; /* menu name */ +} CTLTYPE; + +typedef struct { + WORD wVersion; /* control version */ + WORD wCtlTypes; /* control types */ + char szClass[CTLCLASS]; /* control class name */ + char szTitle[CTLTITLE]; /* control title */ + char szReserved[10]; /* reserved for future use */ + CTLTYPE Type[CTLTYPES]; /* control type list */ +} CTLINFO; + +typedef CTLINFO *PCTLINFO; +typedef CTLINFO FAR *LPCTLINFO; + +/* These two function prototypes are used by dialog editor */ +typedef DWORD (FAR PASCAL *LPFNSTRTOID)( LPSTR ); +typedef WORD (FAR PASCAL *LPFNIDTOSTR)( WORD, LPSTR, WORD ); + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/dde.h b/private/oleauto/tools/win16/os2/inc/dde.h new file mode 100644 index 000000000..d8cff9820 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/dde.h @@ -0,0 +1,118 @@ +/* DDE window messages */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define WM_DDE_FIRST 0x03E0 +#define WM_DDE_INITIATE (WM_DDE_FIRST) +#define WM_DDE_TERMINATE (WM_DDE_FIRST+1) +#define WM_DDE_ADVISE (WM_DDE_FIRST+2) +#define WM_DDE_UNADVISE (WM_DDE_FIRST+3) +#define WM_DDE_ACK (WM_DDE_FIRST+4) +#define WM_DDE_DATA (WM_DDE_FIRST+5) +#define WM_DDE_REQUEST (WM_DDE_FIRST+6) +#define WM_DDE_POKE (WM_DDE_FIRST+7) +#define WM_DDE_EXECUTE (WM_DDE_FIRST+8) +#define WM_DDE_LAST (WM_DDE_FIRST+8) + +/*--------------------------------------------------------------------------*/ +/* DDEACK structure */ +/* */ +/* Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message */ +/* sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE, */ +/* WM_DDE_ADVISE, or WM_DDE_UNADVISE message. */ +/* */ +/*--------------------------------------------------------------------------*/ + +typedef struct { + unsigned bAppReturnCode:8, + reserved:6, + fBusy:1, + fAck:1; +} DDEACK; + +/*--------------------------------------------------------------------------*/ +/* DDEADVISE structure */ +/* */ +/* WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam)) */ +/* */ +/*--------------------------------------------------------------------------*/ + +typedef struct { + unsigned reserved:14, + fDeferUpd:1, + fAckReq:1; + int cfFormat; +} DDEADVISE; + +/*--------------------------------------------------------------------------*/ +/* DDEDATA structure */ +/* */ +/* WM_DDE_DATA parameter structure for hData (LOWORD(lParam)). */ +/* The actual size of this structure depends on the size of */ +/* the Value array. */ +/* */ +/*--------------------------------------------------------------------------*/ + +typedef struct { + unsigned unused:12, + fResponse:1, + fRelease:1, + reserved:1, + fAckReq:1; + int cfFormat; + BYTE Value[1]; +} DDEDATA; + +/*-------------------------------------------------------------------------*/ +/* DDEPOKE structure */ +/* */ +/* WM_DDE_POKE parameter structure for hData (LOWORD(lParam)). */ +/* The actual size of this structure depends on the size of */ +/* the Value array. */ +/* */ +/*-------------------------------------------------------------------------*/ + +typedef struct { + unsigned unused:13, /* Earlier versions of DDE.H incorrectly */ + /* 12 unused bits. */ + fRelease:1, + fReserved:2; + int cfFormat; + BYTE Value[1]; /* This member was named rgb[1] in previous */ + /* versions of DDE.H */ + +} DDEPOKE; + +/*---------------------------------------------------------------------------- +The following typedef's were used in previous versions of the Windows SDK. +They are still valid. The above typedef's define exactly the same structures +as those below. The above typedef names are recommended, however, as they +are more meaningful. + +Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did +not correctly define the bit positions. +----------------------------------------------------------------------------*/ + +typedef struct { + unsigned unused:13, + fRelease:1, + fDeferUpd:1, + fAckReq:1; + int cfFormat; +} DDELN; + +typedef struct { + unsigned unused:12, + fAck:1, + fRelease:1, + fReserved:1, + fAckReq:1; + int cfFormat; + BYTE rgb[1]; +} DDEUP; + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/direct.h b/private/oleauto/tools/win16/os2/inc/direct.h new file mode 100644 index 000000000..3593c87e9 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/direct.h @@ -0,0 +1,51 @@ +/*** +*direct.h - function declarations for directory handling/creation +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the library +* functions related to directory handling and creation. +* +****/ + +#ifndef _INC_DIRECT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* function prototypes */ + +int __cdecl _chdir(const char *); +int __cdecl _chdrive(int); +char * __cdecl _getcwd(char *, int); +char * __cdecl _getdcwd(int, char *, int); +int __cdecl _getdrive(void); +int __cdecl _mkdir(const char *); +int __cdecl _rmdir(const char *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl chdir(const char *); +char * __cdecl getcwd(char *, int); +int __cdecl mkdir(const char *); +int __cdecl rmdir(const char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_DIRECT +#endif /* _INC_DIRECT */ diff --git a/private/oleauto/tools/win16/os2/inc/dos.h b/private/oleauto/tools/win16/os2/inc/dos.h new file mode 100644 index 000000000..398ee8e9e --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/dos.h @@ -0,0 +1,317 @@ +/*** +*dos.h - definitions for MS-DOS interface routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the structs and unions used for the direct DOS interface +* routines; includes macros to access the segment and offset +* values of far pointers, so that they may be used by the routines; and +* provides function prototypes for direct DOS interface functions. +* +****/ + +#ifndef _INC_DOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __interrupt _interrupt +#define __near _near +#endif + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif /* __STDC__ */ + +#define _REGS_DEFINED +#endif /* _REGS_DEFINED */ + + +/* dosexterror structure */ + +#ifndef _DOSERROR_DEFINED +#pragma pack(2) + +struct _DOSERROR { + int exterror; + char errclass; + char action; + char locus; + }; + +#if ((!defined(__STDC__)) && (!defined(__cplusplus))) +/* Non-ANSI name for compatibility */ +struct DOSERROR { + int exterror; + char class; + char action; + char locus; + }; +#endif + +#pragma pack() +#define _DOSERROR_DEFINED +#endif + + +/* _dos_findfirst structure */ + +#ifndef _FIND_T_DEFINED +#pragma pack(2) + +struct _find_t { + char reserved[21]; + char attrib; + unsigned wr_time; + unsigned wr_date; + long size; + char name[13]; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define find_t _find_t +#endif + +#pragma pack() +#define _FIND_T_DEFINED +#endif + + +/* _dos_getdate/_dossetdate and _dos_gettime/_dos_settime structures */ + +#ifndef _DATETIME_T_DEFINED +#pragma pack(2) + +struct _dosdate_t { + unsigned char day; /* 1-31 */ + unsigned char month; /* 1-12 */ + unsigned int year; /* 1980-2099 */ + unsigned char dayofweek; /* 0-6, 0=Sunday */ + }; + +struct _dostime_t { + unsigned char hour; /* 0-23 */ + unsigned char minute; /* 0-59 */ + unsigned char second; /* 0-59 */ + unsigned char hsecond; /* 0-99 */ + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define dosdate_t _dosdate_t +#define dostime_t _dostime_t +#endif + +#pragma pack() +#define _DATETIME_T_DEFINED +#endif + + +/* _dos_getdiskfree structure */ + +#ifndef _DISKFREE_T_DEFINED + +struct _diskfree_t { + unsigned total_clusters; + unsigned avail_clusters; + unsigned sectors_per_cluster; + unsigned bytes_per_sector; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskfree_t _diskfree_t +#endif + +#define _DISKFREE_T_DEFINED +#endif + + +/* manifest constants for _hardresume result parameter */ + +#define _HARDERR_IGNORE 0 /* Ignore the error */ +#define _HARDERR_RETRY 1 /* Retry the operation */ +#define _HARDERR_ABORT 2 /* Abort program issuing Interrupt 23h */ +#define _HARDERR_FAIL 3 /* Fail the system call in progress */ + /* _HARDERR_FAIL is not supported on DOS 2.x */ + +/* File attribute constants */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_VOLID 0x08 /* Volume ID file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +/* macros to break C "far" pointers into their segment and offset components + */ + +#define _FP_SEG(fp) (*((unsigned __far *)&(fp)+1)) +#define _FP_OFF(fp) (*((unsigned __far *)&(fp))) + + +/* external variable declarations */ + +extern unsigned int __near __cdecl _osversion; + + +/* function prototypes */ + +int __cdecl _bdos(int, unsigned int, unsigned int); +#ifndef _WINDOWS +void __cdecl _chain_intr(void (__cdecl __interrupt __far *)()); +#endif +void __cdecl _disable(void); +#ifndef _WINDOWS +unsigned __cdecl _dos_allocmem(unsigned, unsigned *); +#endif +unsigned __cdecl _dos_close(int); +unsigned __cdecl _dos_commit(int); +unsigned __cdecl _dos_creat(const char *, unsigned, int *); +unsigned __cdecl _dos_creatnew(const char *, unsigned, int *); +unsigned __cdecl _dos_findfirst(const char *, unsigned, struct _find_t *); +unsigned __cdecl _dos_findnext(struct _find_t *); +#ifndef _WINDOWS +unsigned __cdecl _dos_freemem(unsigned); +#endif +void __cdecl _dos_getdate(struct _dosdate_t *); +void __cdecl _dos_getdrive(unsigned *); +unsigned __cdecl _dos_getdiskfree(unsigned, struct _diskfree_t *); +unsigned __cdecl _dos_getfileattr(const char *, unsigned *); +unsigned __cdecl _dos_getftime(int, unsigned *, unsigned *); +void __cdecl _dos_gettime(struct _dostime_t *); +void (__cdecl __interrupt __far * __cdecl _dos_getvect(unsigned))(); +#ifndef _WINDOWS +void __cdecl _dos_keep(unsigned, unsigned); +#endif +unsigned __cdecl _dos_open(const char *, unsigned, int *); +unsigned __cdecl _dos_read(int, void __far *, unsigned, unsigned *); +#ifndef _WINDOWS +unsigned __cdecl _dos_setblock(unsigned, unsigned, unsigned *); +#endif +unsigned __cdecl _dos_setdate(struct _dosdate_t *); +void __cdecl _dos_setdrive(unsigned, unsigned *); +unsigned __cdecl _dos_setfileattr(const char *, unsigned); +unsigned __cdecl _dos_setftime(int, unsigned, unsigned); +unsigned __cdecl _dos_settime(struct _dostime_t *); +#ifndef _WINDOWS +void __cdecl _dos_setvect(unsigned, void (__cdecl __interrupt __far *)()); +#endif +unsigned __cdecl _dos_write(int, const void __far *, unsigned, unsigned *); +int __cdecl _dosexterr(struct _DOSERROR *); +void __cdecl _enable(void); +#ifndef _WINDOWS +void __cdecl _harderr(void (__far __cdecl *)()); +void __cdecl _hardresume(int); +void __cdecl _hardretn(int); +#endif +int __cdecl _intdos(union _REGS *, union _REGS *); +int __cdecl _intdosx(union _REGS *, union _REGS *, struct _SREGS *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); + +void __cdecl _segread(struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define FP_SEG _FP_SEG +#define FP_OFF _FP_OFF + +int __cdecl bdos(int, unsigned int, unsigned int); +int __cdecl intdos(union REGS *, union REGS *); +int __cdecl intdosx(union REGS *, union REGS *, struct SREGS *); +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#ifndef __cplusplus +int __cdecl dosexterr(struct DOSERROR *); +#endif +void __cdecl segread(struct SREGS *); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_DOS +#endif /* _INC_DOS */ diff --git a/private/oleauto/tools/win16/os2/inc/drivinit.h b/private/oleauto/tools/win16/os2/inc/drivinit.h new file mode 100644 index 000000000..d92421cf9 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/drivinit.h @@ -0,0 +1,164 @@ +/* + * drivinit.h + * + * Header file for printer driver initialization using ExtDeviceMode() + * and DeviceCapabilities(). + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* size of a device name string */ +#define CCHDEVICENAME 32 + +/* current version of specification */ +#define DM_SPECVERSION 0x300 + +/* field selection bits */ +#define DM_ORIENTATION 0x0000001L +#define DM_PAPERSIZE 0x0000002L +#define DM_PAPERLENGTH 0x0000004L +#define DM_PAPERWIDTH 0x0000008L +#define DM_SCALE 0x0000010L +#define DM_COPIES 0x0000100L +#define DM_DEFAULTSOURCE 0x0000200L +#define DM_PRINTQUALITY 0x0000400L +#define DM_COLOR 0x0000800L +#define DM_DUPLEX 0x0001000L + +/* orientation selections */ +#define DMORIENT_PORTRAIT 1 +#define DMORIENT_LANDSCAPE 2 + +/* paper selections */ +#define DMPAPER_FIRST DMPAPER_LETTER +#define DMPAPER_LETTER 1 // Letter 8 1/2 x 11 in +#define DMPAPER_LETTERSMALL 2 // Letter Small 8 1/2 x 11 in +#define DMPAPER_TABLOID 3 // Tabloid 11 x 17 in +#define DMPAPER_LEDGER 4 // Ledger 17 x 11 in +#define DMPAPER_LEGAL 5 // Legal 8 1/2 x 14 in +#define DMPAPER_STATEMENT 6 // Statement 5 1/2 x 8 1/2 in +#define DMPAPER_EXECUTIVE 7 // Executive"7 1/2 x 10 in +#define DMPAPER_A3 8 // A3 297 x 420 mm +#define DMPAPER_A4 9 // A4 210 x 297 mm +#define DMPAPER_A4SMALL 10 // A4 Small 210 x 297 mm +#define DMPAPER_A5 11 // A5 148 x 210 mm +#define DMPAPER_B4 12 // B4 250 x 354 +#define DMPAPER_B5 13 // B5 182 x 257 mm +#define DMPAPER_FOLIO 14 // Folio 8 1/2 x 13 in +#define DMPAPER_QUARTO 15 // Quarto 215 x 275 mm +#define DMPAPER_10X14 16 // 10x14 in +#define DMPAPER_11X17 17 // 11x17 in +#define DMPAPER_NOTE 18 // Note 8 1/2 x 11 in +#define DMPAPER_ENV_9 19 // Envelope #9 3 7/8 x 8 7/8 +#define DMPAPER_ENV_10 20 // Envelope #10 4 1/8 x 9 1/2 +#define DMPAPER_ENV_11 21 // Envelope #11 4 1/2 x 10 3/8 +#define DMPAPER_ENV_12 22 // Envelope #12 4 \276 x 11 +#define DMPAPER_ENV_14 23 // Envelope #14 5 x 11 1/2 +#define DMPAPER_CSHEET 24 // C size sheet +#define DMPAPER_DSHEET 25 // D size sheet +#define DMPAPER_ESHEET 26 // E size sheet +#define DMPAPER_LAST DMPAPER_ESHEET + +#define DMPAPER_USER 256 + +/* bin selections */ +#define DMBIN_FIRST DMBIN_UPPER +#define DMBIN_UPPER 1 +#define DMBIN_ONLYONE 1 +#define DMBIN_LOWER 2 +#define DMBIN_MIDDLE 3 +#define DMBIN_MANUAL 4 +#define DMBIN_ENVELOPE 5 +#define DMBIN_ENVMANUAL 6 +#define DMBIN_AUTO 7 +#define DMBIN_TRACTOR 8 +#define DMBIN_SMALLFMT 9 +#define DMBIN_LARGEFMT 10 +#define DMBIN_LARGECAPACITY 11 +#define DMBIN_CASSETTE 14 +#define DMBIN_LAST DMBIN_CASSETTE + +#define DMBIN_USER 256 /* device specific bins start here */ + +/* print qualities */ +#define DMRES_DRAFT (-1) +#define DMRES_LOW (-2) +#define DMRES_MEDIUM (-3) +#define DMRES_HIGH (-4) + +/* color enable/disable for color printers */ +#define DMCOLOR_MONOCHROME 1 +#define DMCOLOR_COLOR 2 + +/* duplex enable */ +#define DMDUP_SIMPLEX 1 +#define DMDUP_VERTICAL 2 +#define DMDUP_HORIZONTAL 3 + +typedef struct _devicemode { + char dmDeviceName[CCHDEVICENAME]; + WORD dmSpecVersion; + WORD dmDriverVersion; + WORD dmSize; + WORD dmDriverExtra; + DWORD dmFields; + short dmOrientation; + short dmPaperSize; + short dmPaperLength; + short dmPaperWidth; + short dmScale; + short dmCopies; + short dmDefaultSource; + short dmPrintQuality; + short dmColor; + short dmDuplex; +} DEVMODE; + +typedef DEVMODE * PDEVMODE, NEAR * NPDEVMODE, FAR * LPDEVMODE; + +/* mode selections for the device mode function */ +#define DM_UPDATE 1 +#define DM_COPY 2 +#define DM_PROMPT 4 +#define DM_MODIFY 8 + +#define DM_IN_BUFFER DM_MODIFY +#define DM_IN_PROMPT DM_PROMPT +#define DM_OUT_BUFFER DM_COPY +#define DM_OUT_DEFAULT DM_UPDATE + +/* device capabilities indices */ +#define DC_FIELDS 1 +#define DC_PAPERS 2 +#define DC_PAPERSIZE 3 +#define DC_MINEXTENT 4 +#define DC_MAXEXTENT 5 +#define DC_BINS 6 +#define DC_DUPLEX 7 +#define DC_SIZE 8 +#define DC_EXTRA 9 +#define DC_VERSION 10 +#define DC_DRIVER 11 + +/* export ordinal definitions */ +#define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90) +#define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91) +#define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13) + +/* define types of pointers to ExtDeviceMode() and DeviceCapabilities() + * functions + */ +typedef WORD FAR PASCAL FNDEVMODE(HWND, HANDLE, LPDEVMODE, LPSTR, LPSTR, + LPDEVMODE, LPSTR, WORD); + +typedef FNDEVMODE FAR * LPFNDEVMODE; + +typedef DWORD FAR PASCAL FNDEVCAPS(LPSTR, LPSTR, WORD, LPSTR, LPDEVMODE); + +typedef FNDEVCAPS FAR * LPFNDEVCAPS; + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/errno.h b/private/oleauto/tools/win16/os2/inc/errno.h new file mode 100644 index 000000000..0e7fa7e8a --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/errno.h @@ -0,0 +1,75 @@ +/*** +*errno.h - system wide error numbers (set by system calls) +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the system-wide error numbers (set by +* system calls). Conforms to the XENIX standard. Extended +* for compatibility with Uniforum standard. +* [ANSI/System V] +* +****/ + +#ifndef _INC_ERRNO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* declare reference to errno */ + +extern int __near __cdecl volatile errno; + +/* Error Codes */ + +#define EZERO 0 +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define EUCLEAN 35 +#define EDEADLOCK 36 + +#ifdef __cplusplus +} +#endif + +#define _INC_ERRNO +#endif /* _INC_ERRNO */ diff --git a/private/oleauto/tools/win16/os2/inc/ext.h b/private/oleauto/tools/win16/os2/inc/ext.h new file mode 100644 index 000000000..932c35ee7 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ext.h @@ -0,0 +1,722 @@ +/*** ext.h - extension definitions +* +* Copyright <C> 1988-1990, Microsoft Corporation +* +* +*************************************************************************/ + +/************************************************************************* + * + * Macro Definitions + */ + +/* Common Definitions + */ + +#include <stddef.h> /* get definition of NULL */ + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +/* PNULL - NULL PFILE + */ +#define PNULL ((PFILE) NULL) + +/* BUFLEN is the maximum line length that can be passed or will be returned + * by the editor. MAX_PATH is the maximum path length supported. + */ +#define BUFLEN 251 +#define MAX_PATH 200 + +/* EXPORT defines the attributes required for extension functions. _loadds + * is used such that extensions can be compiled /Aw as well as /Au. + */ +#define EXPORT _loadds far +#define EXTERNAL _loadds far + +/* PWBFUNC defines the return value and characteristics of extension defined + * editing functions. + */ +#define PWBFUNC flagType pascal _loadds far + +/* RQ_... are various request types supported for Get/Set EditorObject + */ +#define RQ_FILE 0x1000 /* GetEditorObject: File request */ +#define RQ_FILE_HANDLE 0x1000 /* File Handle */ +#define RQ_FILE_NAME 0x1100 /* ASCIIZ filename */ +#define RQ_FILE_FLAGS 0x1200 /* flags */ +#define RQ_FILE_REFCNT 0x1300 /* reference count */ +#define RQ_FILE_FREEZE 0x1400 /* freeze count */ +#define RQ_WIN 0x2000 /* Window request */ +#define RQ_WIN_HANDLE 0x2000 /* Window Handle */ +#define RQ_WIN_CONTENTS 0x2100 /* Window Contents */ +#define RQ_WIN_CUR 0x2200 /* Current Window */ +#define RQ_WIN_MAXED 0x2300 /* Zoomed flag */ +#define RQ_WIN_PWBHANDLE 0x2400 /* PWB Window Handle */ +#define RQ_WIN_ARC 0x2500 /* */ +#define RQ_WIN_COLOR 0x2600 /* text/border colors */ +#define RQ_MISC 0x3000 /* Misc requests */ +#define RQ_SCREENSIZE 0x3100 /* screen size */ +#define RQ_SEARCHINFO 0x3200 /* search state information */ +#define RQ_ALLFILE 0x4000 /* GetEditorObject: All file request */ +#define RQ_ALLFILE_HANDLE 0x4000 /* File Handle */ +#define RQ_ALLFILE_NAME 0x4100 /* ASCIIZ filename */ +#define RQ_ALLFILE_FLAGS 0x4200 /* flags */ +#define RQ_ALLFILE_REFCNT 0x4300 /* reference count */ +#define RQ_ALLFILE_FREEZE 0x4400 /* freeze count */ + +#define RQ_COLOR 0x9000 /* Color request */ + +#define RQ_NAME 0xd000 /* editor name */ +#define RQ_TOOLSINI 0xe000 /* tools.ini PFILE */ +#define RQ_CLIP 0xf000 /* clipboard type */ + + +/* toPif is used when placing numeric or boolean switches in the swiDesc + * table to eliminate C 5.X compiler warnings. + * + * For example: { "Switchname", toPIF(switchvar), SWI_BOOLEAN }, + */ +#define toPIF(x) (PIF)(long)(void far *)&x + +/* Editor color table indicies. (Colors USERCOLORMIN - USERCOLORMAX are + * unassigned and available for extension use). + */ +#define Background 0 /* all backgrounds (unused in PWB) */ +#define Hilite 1 /* Hilited items */ +#define Greyed 2 /* greyed items */ +#define Enabled 3 /* enabled items */ +#define Disabled 4 /* disabled items */ +#define Alert 5 /* for MessageBox alerts */ +#define DialogBox 6 /* background for dialogs */ +#define PushButton 7 /* push button color */ +#define ButtonDown 8 /* pushed button color */ +#define ListBox 9 /* listbox background */ +#define Scrollbar 10 /* scroll bar Background & arrows */ +#define Elevator 11 /* scroll bar elevator */ +#define MenuBox 12 /* background for menus */ +#define Menu 13 /* menu bar color */ +#define MenuSelected 14 /* Selected menus */ +#define MenuHilite 15 /* for single character */ +#define MenuHiliteSel 16 /* for single character (under selection) */ +#define ItemHiliteSel 17 /* for single character (under selection) */ +#define DialogAccel 18 /* dialog accelerators */ +#define DialogAccelBor 19 /* dialog accelerator border */ +#define Shadow 20 /* shadows */ +#define FGCOLOR 21 /* Normal text in non-PWB edit windows */ +#define HGCOLOR 22 /* Highlighted text */ +#define INFCOLOR 23 /* Noise */ +#define SELCOLOR 24 /* Text Selections */ +#define WDCOLOR 25 /* Non-PWB edit Window Borders */ +#define STACOLOR 26 /* Status Letters on bottom line */ +/* 27 internal: used by PWB */ +#define BECOLOR 28 /* Build Error Window */ +#define DTCOLOR 29 /* Desktop */ +#define PWBTCOLOR 30 /* PWB Window Text */ +#define PWBBCOLOR 31 /* PWB Window Border */ +#define MSGCOLOR 32 /* Message line */ +#define LOCCOLOR 33 /* Cursor position indicator */ + +#define USERCOLORMIN 34 /* beginning of extension colors */ +#define USERCOLORMAX 56 /* end of extension colors */ + +/* Attributes for ForFile + */ +#define FORFILE_RO 1 /* read only */ +#define FORFILE_H 2 /* hidden */ +#define FORFILE_S 4 /* system */ +#define FORFILE_V 8 /* volume id */ +#define FORFILE_D 16 /* directory */ +#define FORFILE_A 32 /* archive */ + +/* changeable attributes + */ +#define FORFILE_MOD (FORFILE_RO|FORFILE_H|FORFILE_S|FORFILE_A) +#define FORFILE_ALL (FORFILE_RO|FORFILE_H|FORFILE_S|FORFILE_V|FORFILE_D|FORFILE_A) + +/************************************************************************* + * + * General type Definitions + */ +typedef char flagType; /* Boolean value */ +typedef int COL; /* column or position with line */ +typedef long LINE; /* line number within file */ +typedef unsigned PFILE; /* editor file handle */ +typedef unsigned PINS; +#ifndef EXTINT +typedef unsigned PWND; /* editor window handle */ +#endif + + +typedef char buffer[BUFLEN]; /* miscellaneous buffer */ +typedef char linebuf[BUFLEN]; /* line buffer */ +typedef char pathbuf[BUFLEN]; /* Pathname buffer */ + +typedef struct { /* file location */ + LINE lin; /* - line number */ + COL col; /* - column */ + } fl, *pfl; + +typedef struct { /* screen location */ + int lin; /* - line number */ + int col; /* - column */ + } sl, *psl; + +typedef struct { /* file range */ + fl flFirst; /* - Lower line, or leftmost col */ + fl flLast; /* - Higher, or rightmost */ + } rn, *prn; + +typedef struct lineAttr { /* Line color attribute info */ + unsigned char attr; /* - Attribute of piece */ + unsigned char len; /* - Bytes in colored piece */ + } la, *pla; + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef WORD ISA; +typedef struct _arc + { + BYTE axLeft; + BYTE ayTop; + BYTE axRight; + BYTE ayBottom; + } ARC; + +/************************************************************************* + * + * Argument definition structures. + * + * We define a structure for each of the argument types that may be passed + * to an extension function. Then, we define the structure argType which is + * used to pass these arguments around in a union. + */ +struct noargType { /* no argument specified */ + LINE y; /* - cursor line */ + COL x; /* - cursor column */ + }; + +struct textargType { /* text argument specified */ + int cArg; /* - count of <arg>s pressed */ + LINE y; /* - cursor line */ + COL x; /* - cursor column */ + char far *pText; /* - ptr to text of arg */ + }; + +struct nullargType { /* null argument specified */ + int cArg; /* - count of <arg>s pressed */ + LINE y; /* - cursor line */ + COL x; /* - cursor column */ + }; + +struct lineargType { /* line argument specified */ + int cArg; /* - count of <arg>s pressed */ + LINE yStart; /* - starting line of range */ + LINE yEnd; /* - ending line of range */ + }; + +struct streamargType { /* stream argument specified */ + int cArg; /* - count of <arg>s pressed */ + LINE yStart; /* - starting line of region */ + COL xStart; /* - starting column of region */ + LINE yEnd; /* - ending line of region */ + COL xEnd; /* - ending column of region */ + }; + +struct boxargType { /* box argument specified */ + int cArg; /* - count of <arg>s pressed */ + LINE yTop; /* - top line of box */ + LINE yBottom; /* - bottom line of bix */ + COL xLeft; /* - left column of box */ + COL xRight; /* - right column of box */ + }; + +struct argType { + int argType; + union { + struct noargType noarg; + struct textargType textarg; + struct nullargType nullarg; + struct lineargType linearg; + struct streamargType streamarg; + struct boxargType boxarg; + } arg; + PWND pwnd; + PINS pins; + PFILE pfile; + }; +typedef struct argType ARG; + +/************************************************************************* + * + * Function definition table definitions + */ +typedef unsigned CMDDATA; + +struct cmdDesc { /* function definition entry */ + char far *name; /* - pointer to name of fcn */ + flagType (pascal EXTERNAL *func)(CMDDATA, + ARG far *, + flagType); /* - pointer to function */ + CMDDATA arg; /* - used internally by editor*/ + unsigned long argType; /* - user args allowed */ + }; +typedef struct cmdDesc far *PCMD; + +typedef struct KeyData { /* Key information */ + unsigned ascii; /* ASCII code, or .vkey if none */ + unsigned scan; /* scan code */ + unsigned vkey; /* virtual key code */ + unsigned shift; /* Shift state 0 - 3 */ + PCMD pFunc; /* command key will invoke */ + char name[30]; /* full name for key */ + } KeyData; + +typedef unsigned KeyHandle; + +#define NOARG 0x00000001 /* no argument specified */ +#define TEXTARG 0x00000002 /* text specified */ +#define NULLARG 0x00000004 /* arg + no cursor movement */ +#define NULLEOL 0x00000008 /* null arg => text from arg->eol */ +#define NULLEOW 0x00000010 /* null arg => text from arg->end word */ +#define LINEARG 0x00000020 /* range of entire lines */ +#define STREAMARG 0x00000040 /* from low-to-high, viewed 1-D */ +#define BOXARG 0x00000080 /* box delimited by arg, cursor */ + +#define NUMARG 0x00000100 /* text => delta to y position */ +#define MARKARG 0x00000200 /* text => mark at end of arg */ + +#define BOXSTR 0x00000400 /* single-line box => text */ + +#define FASTKEY 0x00000800 /* Fast repeat function */ +#define MODIFIES 0x00001000 /* modifies file */ +#define KEEPMETA 0x00002000 /* do not eat meta flag */ +#define WINDOWFUNC 0x00004000 /* moves window */ +#define CURSORFUNC 0x00008000 /* moves cursor */ + +#define NOWINDOWS 0x00010000 /* cmd works when no windows are open */ +#define ICONFOCUS 0x00020000 /* cmd works when an icon has focus */ +#define BEEPERROR 0x00040000 /* PWB beeps when cmd is not allowed */ +#define POPUP 0x00080000 /* cmd works when PopUp window is present */ + +/************************************************************************* + * + * Switch definition table definitions + * + * SWI_NUMERIC: hex or decimal switch. + * SWI_BOOLEAN: boolean switch. + * SWI_EXTTEXT: extension text switch. + * function is provided whose second argument (fQuery) + * specifies the mode: + * 1) If fQuery is FALSE, set the switch to the text + * specified by the first argument. + * Return NULL if successful, else return error + * string. + * 2) If fQuery is TRUE, return the current value of + * switch. The first argument is ignored (should + * be NULL). + * + * 1.x Compatibility Switches: (DO NOT USE) + * + * SWI_SPECIAL old-style special text switch. + * Provided for compatibility with PWB 1.x versions only. + * function is provided which takes a text value and + * returns a boolean indicator of success/failure. + * SWI_SPECIAL2 old-style special text switch. + * Provided for compatability with PWB 1.x versions only. + * function is provided which takes a text value and + * returns NULL for success, error string otherwise. + * + */ +typedef char far * (pascal EXTERNAL *PIF)(char far *, flagType); +typedef flagType (pascal EXTERNAL *PIF_S)(char far *); +typedef char far * (pascal EXTERNAL *PIF_S2)(char far *); + + +union swiAct { /* switch location or routine */ + PIF pExtFunc; /* SWI_EXTTEXT function */ + PIF_S pFunc; /* SWI_SPECIAL function */ + PIF_S2 pFunc2; /* SWI_SPECIAL2 function */ + int far *ival; /* SWI_NUMERIC integer value */ + flagType far *fval; /* SWI_BOOLEAN flag */ + }; + +struct swiDesc { /* switch definition entry */ + char far *name; /* - pointer to name of switch */ + union swiAct act; /* - pointer to value or fcn */ + int type; /* - flags defining switch type */ + }; +typedef struct swiDesc far *PSWI; + +#define SWI_BOOLEAN 0 /* Boolean switch */ +#define SWI_NUMERIC 1 /* hex or decimal switch */ +#define SWI_EXTTEXT 2 /* text switch w/fQuery arg */ +#define SWI_SPECIAL 5 /* textual switch */ +#define SWI_SPECIAL2 6 /* #5, returning an error string */ +#define RADIX10 (0x0A << 8) /* numeric switch is decimal */ +#define RADIX16 (0x10 << 8) /* numeric switch is hex */ + +/************************************************************************ + * + * Get/Set EditorObject data structures + */ +typedef struct { + ISA text; /* - default text color */ + ISA border; /* - default border color */ + } winColors; + +typedef struct { /* define window contents */ + PFILE pFile; /* - handle of file displayed */ + ARC arcWin; /* - location of window */ + fl flPos; /* - upper left corner wrt file */ + fl flCursor; /* - Cursor position */ + WORD id; /* - window number */ + WORD flags; /* - window flags */ + winColors colors; /* - default window colors */ + } winContents; + +/************************************************************************ + * + * Values for .flags field in struct winContents + */ +#define WF_PWB 1 +#define WF_ICONIC 2 +#define WF_ZOOMED 4 +#define WF_OPEN 0x10 +#define WF_CURRENT 0x80 +#define WF_POPUP 0x100 + + + + +/************************************************************************ + * + * Values for flag (BYTE) argument to NewWindow + */ + +#define NEWWND_ICON 2 +#define NEWWND_ZOOMED 4 +#define NEWWND_CLOSED 8 +#define NEWWND_PWB 0x80 + + +/************************************************************************ + * + * Values for flag (last) argument to GenEditSubWindow + */ + +#define SWF_CURSOR 1 +#define SWF_TOP 2 + + +typedef struct { /* search/replace state information */ + struct { /* TOOLS.INI switch info */ + flagType fUnixRE; /* TRUE => Use UNIX RE's (unixre: switch) */ + flagType fSrchCase; /* TRUE => case is significant (case: switch)*/ + flagType fSrchWrap; /* TRUE => searches wrap (wrap: switch) */ + } swit; + struct { /* state of previous activity */ + flagType fSrchAll; /* TRUE => previously searched for all */ + flagType fSrchCase; /* TRUE => case was significant */ + flagType fSrchDir; /* TRUE => previously searched forward */ + flagType fSrchRe; /* TRUE => search previously used RE's */ + flagType fSrchWrap; /* TRUE => previously did wrap */ + flagType fReplRe; /* TRUE => replace previously used RE's */ + buffer szSrch; /* search buffer */ + buffer szReplsrc; /* source string for replace */ + buffer szReplrpl; /* destination string for replace */ + } prev; + } SearchInfo; + +/* FILE flags values + * + * + * DIRTY file had been modified, and has not yet been written to disk. + * + * FAKE file is a pseudo file. It cannot be saved to disk under it's + * current name, and may also be otherwise treated specially. + * + * REAL file has been read from disk. If reset, the file needs to be + * read if any operations are to be performed on it. (May also + * be set for FAKE files, even though they are not really on + * disk.) + * + * DOSFILE file has CR-LF. If not set, lines are terminated by LF only + * in unix-style. The setting is determined by the file reader + * having seen CRLF or not. Should default on for all files we + * create. + * + * TEMP file is a temp file, and is not saved in the status file. + * These are the files specified by /t on the command line. + * + * NEW file has been created by editor. This is set when we create + * the file (after asking the user), and causes us to avoid + * trying to back-up a non-existant previous version. + * + * REFRESH file needs to be refreshed every time it is viewed. This is + * set for pseudo files which need to be regenerated each time + * they are viewed, such as <information-file>, the file history + * list. + * + * READONLY file may not be edited. For example, this bit is set by the + * help extension on it's pseudo file to prevent users from + * editing the contents. All commands with the MODIFIES bit are + * disabled if a file with this bit is current. + * + * DISKRO file on disk is read only. + * + * MODE1 Meaning depends on the file + * + * VALMARKS file has valid marks defined + * + * READING file is currently being read. This means that the idle time + * reader may be operating on this file. + * + * MARKSDIRTY file's marks need to be written + * + * HYBRID file is FAKE, but gets saved + * + * NORENAME file should never be renamed + * + * NOREMOVE file should never be removed or expunged + */ +#define DIRTY 0x01 +#define FAKE 0x02 +#define REAL 0x04 +#define DOSFILE 0x08 +#define TEMP 0x10 +#define NEW 0x20 +#define REFRESH 0x40 +#define READONLY 0x80 + +#define DISKRO 0x0100 +#define MODE1 0x0200 +#define VALMARKS 0x0400 +#define READING 0x0800 + +#define MARKSDIRTY 0x1000 +#define HYBRID 0x2000 +#define NORENAME 0x4000 +#define NOREMOVE 0x8000 + + +/**************************************************************************** + * PWB100 2404 + * + * Flags for dealing with instance lists when splitting a window... + * Use these when calling SplitWnd() to specify how to handle the instance + * lists. + * + */ +#define INF_NODUP 0 /* don't duplicate instance list, don't move */ +#define INF_NODUPMV 2 /* don't duplicate instance list, move it */ +#define INF_DUP 4 /* duplicate instance list */ + +/**************************************************************************** + * + * Values for third parameter to GetPfileFromName. The values control the + * behaviour i nthe case that the specified file doe not exist on disk. + * The options are: Fail silently, ask the user to create the file, create + * the file silently. + * + */ +#define PFN_FAIL 0 +#define PFN_ASK 1 +#define PFN_CREATE 2 + +/************************************************************************* + * + * Menu, window and dialog definitions + * + * action constants for ChangeMenu + */ +#define MNU_DISABLE 1 /* disable (grey) menu item */ +#define MNU_ENABLE 2 /* enable menu item */ +#define MNU_CHECK 3 /* check menu item */ +#define MNU_UNCHECK 4 /* uncheck menu item */ +#define MNU_RENAME 5 /* rename menu item */ +#define MNU_COMMAND 6 /* define menu item command */ + +/* Message box types. + */ +#define MBOX_OK 1 /* <OK> */ +#define MBOX_YESNOCANCEL 2 /* <YES> <NO> <CANCEL> */ +#define MBOX_RETRYCANCEL 3 /* <RETRY> <CANCEL> */ +#define MBOX_OKCANCEL 4 /* <OK> <CANCEL> */ +#define MBOX_ABORT 5 /* <ABORT> */ +#define MBOX_YESNO 6 /* <YES> <NO> */ +#define MBOX_RETRY 7 /* <RETRY> */ +#define MBOX_TYPE 0x0f /* message type */ +#define MBOX_BEEP 0x10 /* beep when displayed */ +#define MBOX_CAPTION 0x20 /* 1st param is caption */ +#define MBOX_NOHELP 0x8000 /* don't add a help button */ + +/* Message Box Return types + */ +#define MBOX_IDOK 1 /* <OK> button */ +#define MBOX_IDCANCEL 2 /* <CANCEL> button */ +#define MBOX_IDABORT 3 /* <ABORT> button */ +#define MBOX_IDRETRY 4 /* <RETRY> button */ +#define MBOX_IDIGNORE 5 /* <IGNORE> button */ +#define MBOX_IDYES 6 /* <YES> button */ +#define MBOX_IDNO 7 /* <NO> button */ + +/* Flags in flags parameter to DoExtCmd + */ +#define EXTCMD_NONE 0x0000 +#define EXTCMD_NOEVENT 0x0001 // do not emit EVT_SHELL +#define EXTCMD_NOSAVE 0x0002 // do not autosave before spawn +#define EXTCMD_NOSYNC 0x0004 // do not sync cur file on return +#define EXTCMD_REDIR 0x0008 // redirect output to file +#define EXTCMD_APPEND 0x0010 // append to output file (don't rewrite) +#define EXTCMD_BACK 0x0010 // OS/2 background execution +#define EXTCMD_ECHO 0x0020 // DOS: echo command output in Build Results +#define EXTCMD_ASK 0x0040 // prompt for return +#define EXTCMD_ASKERR 0x0080 // prompt for return if error +#define EXTCMD_GLOBAL 0x0100 // prompt for return if global is set + +/* Flags in flags parameter to IdAddPwbMenuItem + */ +#define TM_CHECKED 0x00 +#define TM_UNCHECKED 0x01 + +#define TM_ENABLED 0x00 +#define TM_DISABLED 0x02 + +#define TM_RECORD 0x00 +#define TM_NORECORD 0x04 + +#define TM_TYPE 0x70 + +#define TM_COMMAND 0x10 +#define TM_SUBMENU 0x20 +#define TM_SEPARATOR 0x40 + + +/************************************************************************* + * + * Editor lowlevel function prototypes. + + * + * This list defines the routines within the editor which may be called + * by extension functions. + */ +int pascal EXPORT AddAColor (char far *, char far *); +PFILE pascal EXPORT AddFile (char far *); +int pascal EXPORT AddMenu (char far *, char far *, char far *, flagType); +int pascal EXPORT AddMenuItem (int, char far *, char far *, char far *, char far *); +void pascal EXPORT AddStrToList (PCMD, char far *, flagType); +unsigned pascal EXPORT atou (const char far *); +flagType pascal EXPORT BadArg (void); +void pascal EXPORT bell (void); +flagType pascal EXPORT ChangeMenu (int, int, char far *); +void pascal EXPORT CheckPwbMenuItem (WORD, unsigned short); +void pascal EXPORT ClearList (PCMD); +flagType pascal EXPORT CloseWnd (PWND); +void pascal EXPORT CopyBox (PFILE, PFILE, COL, LINE, COL, LINE, COL, LINE); +void pascal EXPORT CopyLine (PFILE, PFILE, LINE, LINE, LINE); +void pascal EXPORT CopyStream (PFILE, PFILE, COL, LINE, COL, LINE, COL, LINE); +void pascal EXPORT DelBox (PFILE, COL, LINE, COL, LINE); +void pascal EXPORT DelFile (PFILE); +void pascal EXPORT DelLine (PFILE, LINE, LINE); +void pascal EXPORT DelStream (PFILE, COL, LINE, COL, LINE); +void pascal EXPORT Display (void); +void pascal EXPORT DoMessage (char far *); +int pascal EXPORT DoMessageBox (char far *, char far *, char far *, int, int); +int pascal EXPORT DoMessageBoxHelp (char far *, char far *, char far *, int, int, char far *); +void pascal EXPORT DoDrawWindow (PWND); +void pascal EXPORT DoStatusBox (char far *, char far *); +void pascal EXPORT DrawEditWindowBorder(PWND); +void pascal EXPORT EnablePwbMenuItem (WORD, unsigned short); +char far * pascal EXPORT Falloc (long); +char far * _cdecl EXPORT farstrncpy (char far *, const char far *, int); +char far * _cdecl EXPORT farstrcpy (char far *, const char far *); +char far * _cdecl EXPORT farstrcat (char far *, const char far *); +char far * _cdecl EXPORT farstrstr (const char far *, const char far *); +int _cdecl EXPORT farstrlen (const char far *); +int _cdecl EXPORT farstrnicmp (const char far *, const char far *, int); +int _cdecl EXPORT farstrncmp (const char far *, const char far *, int); +int _cdecl EXPORT farstrcmp (const char far *, const char far *); +void far * _cdecl EXPORT farmemset (void far *, int, size_t); +int _cdecl EXPORT farstricmp (char far *, char far *); +char far * _cdecl EXPORT farstrchr (char far *, int); +char far * _cdecl EXPORT farstrlwr (char far *); +char far * pascal EXPORT farstradd (char far *, const char far *); +char far * pascal EXPORT farstrstrip (char far *); +flagType pascal EXPORT fChangeFile (flagType, char far *); +void pascal EXPORT Fdalloc (char far *); +flagType pascal EXPORT fEnsureValidWindow (flagType); +flagType pascal EXPORT fExecute (char far *); +LINE pascal EXPORT FileLength (PFILE); +PFILE pascal EXPORT FileNameToHandle (char far *, char far *); +flagType pascal EXPORT FileRead (char far *, PFILE); +flagType pascal EXPORT FileWrite (char far *, PFILE); +PSWI pascal EXPORT FindSwitch (char far *); +int pascal EXPORT ForFile (char far *,int ,void (pascal EXPORT *)(char far *)); +flagType pascal EXPORT fSetWindowWithFile (char far *); +PWND pascal EXPORT GenEditSubWindow (PWND, WORD, ISA, WORD, WORD); +flagType pascal EXPORT GetColor (LINE, struct lineAttr far *, PFILE); +void pascal EXPORT GetCursor (COL far *, LINE far *); +flagType pascal EXPORT GetEditorObject (unsigned, unsigned, void far *); +PWND pascal EXPORT GetEditSubWindow (PWND, WORD); +int pascal EXPORT GetLine (LINE, char far *, PFILE); +char far * pascal EXPORT GetListEntry (PCMD, int, flagType); +PCMD pascal EXPORT GetListHandle (char far *, flagType); +PFILE pascal EXPORT GetPfileFromName (char far *, char far *, flagType); +flagType pascal EXPORT GetString (char far *, char far *, flagType); +WORD pascal EXPORT IdAddPwbMenuItem (unsigned, unsigned, unsigned, char far *, char far *, char far *, char far *); +WORD pascal EXPORT IdFindPwbMenuItem (char far *, unsigned, unsigned); +void pascal EXPORT LockFile (PFILE); +char far * pascal EXPORT mgetenv (char far *); +void pascal EXPORT MoveCur (COL, LINE); +char far * pascal EXPORT NameToKeys (char far *, char far *); +PCMD pascal EXPORT NameToFunc (char far *); +PWND pascal EXPORT NewWindow (PFILE, BYTE, int, int, int, int, int, int); +PCMD pascal EXPORT pCmdPrompt (char far *, char far *, char far *); +flagType pascal EXPORT pFileToBottom (PFILE); +flagType pascal EXPORT pFileToTop (PFILE); +void pascal EXPORT PopUpBox (PFILE, char far *, int, fl); +void pascal EXPORT PopUpBoxColor (PFILE, char far *, int, fl, ISA); +void pascal EXPORT PutColor (LINE, struct lineAttr far *, PFILE); +void pascal EXPORT PutLine (LINE, char far *, PFILE); +long pascal EXPORT ReadChar (void); +PCMD pascal EXPORT ReadCmd (void); +void pascal EXPORT RecordPwbMenuItem (WORD, unsigned short); +void pascal EXPORT DoRedrawDamagedRegions(void); +flagType pascal EXPORT RemoveFile (PFILE); +flagType pascal EXPORT Replace (char, COL, LINE, PFILE, flagType); +int pascal EXPORT REsearch (PFILE, flagType, flagType, flagType, flagType, char far *, fl far *); +flagType pascal EXPORT Resize (PWND, ARC); +char far * pascal EXPORT ScanList (PCMD, flagType); +int pascal EXPORT search (PFILE, flagType, flagType, flagType, flagType, char far *, fl far *); +flagType pascal EXPORT SelectFiles (PCMD, char far *, char far *, char far *, flagType, int); +flagType pascal EXPORT SelectFile (char far *, int, char far *, char far *, int); +void pascal EXPORT SetColor (PFILE, LINE, COL, COL, int); +void pascal EXPORT SetHiLite (PFILE, rn, int); +flagType pascal EXPORT SetEditorObject (unsigned, unsigned, void far *); +flagType pascal EXPORT SetKey (char far *, char far *); +flagType pascal EXPORT SetPwbMenuItemTitle (WORD, char far *); +flagType pascal EXPORT SetPwbMenuItemCommand (WORD, char far *); +void pascal EXPORT SetPWBWindowMenuTitle (PWND, char far *); +flagType pascal EXPORT SetSubWinHeight (PWND, WORD); +void pascal EXPORT SetSubWinPFile (PWND, PFILE); +void pascal EXPORT SetSubWinView (PWND, LINE, COL); +void pascal EXPORT SetWindowColors (PWND, ISA, ISA); +PWND pascal EXPORT SplitWnd (PWND, flagType, int, int); +void pascal EXPORT UnLockFile (PFILE); +long pascal EXPORT VMAlloc (long); +void pascal EXPORT VMFree (long); +void pascal EXPORT fpbToVM (char far *, long, unsigned); +void pascal EXPORT VMTofpb (long, char far *, unsigned); +long pascal EXPORT VMSize (long); +flagType pascal EXPORT DoSpawn (char far *, char far *, + unsigned, unsigned far *); + + +void _cdecl EXTERNAL WhenLoaded (void); + diff --git a/private/oleauto/tools/win16/os2/inc/fasttest.inc b/private/oleauto/tools/win16/os2/inc/fasttest.inc new file mode 100644 index 000000000..e885af83a --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/fasttest.inc @@ -0,0 +1,270 @@ +'FastTest.inc - definitions/declarations for Fast Test routines +' +' Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +' +'Purpose: +' This file declares the functions, constants and variables +' used by the Fast Test routines. +' + +'$DEFINE TESTCTRL +'$DEFINE TESTEVNT +'$INCLUDE 'MSTEST.inc' +'$INCLUDE 'WNAPIDEC.INC' + +' XLog constants to determine where to log information to +CONST LOG_DISK = 2 'log to disk +CONST LOG_SCREEN = 4 'log to screen (viewport in testdrvr) +CONST LOG_COM1 = 8 'log to COM1 port +CONST LOG_COM2 = 16 'log to COM2 port +CONST LOG_MSGBOX = 32 'log the string in a msgbox (Pause in testdrvr) + +'Global to be used to describe Log Options by ORing above Const's +GLOBAL gfLogOptions% +'Global to be used to save above flag when logging is temporarily turned off. +GLOBAL gfTmpLogOptions% + +gfLogOptions = LOG_SCREEN 'default to showing in viewport +gfTmpLogOptions = LOG_SCREEN 'default to showing in viewport + +GLOBAL gsCurrentDir$ +gsCurrentDir$ = curdir$ ' get current directory that started execution + +' Global variable to hold log file name +GLOBAL gsLogFileName$ +gsLogFileName$ = sCurrentDir$ + "\FASTTEST.LOG" + +' Global variable to hold string to use as the keystrokes necessary +' to close the app in the case of errors +GLOBAL gsCleanup$ +gsCleanup$ = "{esc 5}%( )c" + +' Global variable to hold class name of app +GLOBAL gsAppClassname$ +gsAppClassname$ = "" + +' Global variable to hold state of whether to terminate on XLogFailure +GLOBAL gfTerminate% +gfTerminate% = TRUE ' default to terminate at first failure + +' Global variable that indicates if failure occured +GLOBAL gfFailure% +gfFailure% = FALSE + +'Global variable that indicates an ON ERROR occurred +GLOBAL gfError% +gfError% = FALSE + +'Global variable that is the string value for the dialog window class +GLOBAL gsDialogClass$ +gsDialogClass$ = "#32770" + + + +' Error Type constants (don't use 0) +CONST ET_NOTHING = 1 ' no handling, log unexpected runtime error +CONST ET_NEXT = 2 ' flag error, continue next statement +CONST ET_LOG = 3 ' error happened in log routines, inform user elsewise + +'Global variable that shows what type of error to handle +GLOBAL gErrorType% +gErrorType% = ET_NOTHING + + +'Prototypes from FTestLog.mst +DECLARE SUB XSetLogFilename(sFilename$) +DECLARE SUB XSetTerminate(fTerminate%) +DECLARE SUB XLog (stLog$) +DECLARE SUB XLogBanner(lpszInput$) +DECLARE SUB XLogWarning(lpszInput$) +DECLARE SUB XLogFailure(stFailure$) +DECLARE SUB XFailureCheck +DECLARE SUB XSetLogOptions (wLogOptions%) +DECLARE SUB XLogOff () +DECLARE SUB XLogOn () +DECLARE SUB XDialogBoxExists(s$) +DECLARE SUB XDialogBoxNotExists(s$) +DECLARE SUB XWaitDialogBox(s$, WaitTime%) +DECLARE SUB XButtonExists(stButton$) +DECLARE SUB XButtonNotExists(stButton$) +DECLARE SUB XButtonEnabled(stButton$) +DECLARE SUB XButtonNotEnabled(stButton$) +DECLARE SUB XClickButton(stButtonName$) +DECLARE SUB XListBoxExists(stListbox$) +DECLARE SUB XListBoxNotExists(stListbox$) +DECLARE SUB XFocusListbox(stListbox$) +DECLARE SUB XListBoxItemExists (stListbox$, stListboxItem$) +DECLARE SUB XListBoxItemNotExists (stListbox$, stListboxItem$) +DECLARE SUB XClickListboxItem (stListbox$, stListboxItem$) +DECLARE SUB XDblClickListboxItem (stListbox$, stListboxItem$) +DECLARE SUB XComboBoxExists(stComboBox$) +DECLARE SUB XComboBoxNotExists(stComboBox$) +DECLARE SUB XFocusComboBox(stComboBox$) +DECLARE SUB XComboBoxItemExists (stComboBox$, stComboBoxItem$) +DECLARE SUB XComboBoxItemNotExists (stComboBox$, stComboBoxItem$) +DECLARE SUB XClickComboBoxItem (stComboBox$, stComboBoxItem$) +DECLARE SUB XDblClickComboBoxItem (stComboBox$, stComboBoxItem$) +DECLARE SUB XCheckboxExists(stCheckbox$) +DECLARE SUB XCheckboxNotExists(stCheckbox$) +DECLARE SUB XCheckboxChecked(stCheckbox$) +DECLARE SUB XCheckboxNotChecked(stCheckbox$) +DECLARE SUB XCheckboxEnabled(stCheckbox$) +DECLARE SUB XCheckboxNotEnabled(stCheckbox$) +DECLARE SUB XClickCheckbox(stCheckbox$) +DECLARE SUB XEditTextExists(stEditText$) +DECLARE SUB XEditTextNotExists(stEditTextNot$) +DECLARE SUB XSetEditText (stEditCaption$, stEditText$) +DECLARE SUB XRadiobuttonExists(stRadiobutton$) +DECLARE SUB XRadiobuttonNotExists(stRadiobutton$) +DECLARE SUB XRadiobuttonEnabled(stRadiobutton$) +DECLARE SUB XRadiobuttonNotEnabled(stRadiobutton$) +DECLARE SUB XRadiobuttonChecked(stRadiobutton$) +DECLARE SUB XRadiobuttonNotChecked(stRadiobutton$) +DECLARE SUB XClickRadiobutton(stRadiobutton$) +DECLARE FUNCTION BDialogBoxExists%(s$) +DECLARE FUNCTION BButtonExists%(stButtonName$) +DECLARE FUNCTION BButtonEnabled%(stButtonName$) +DECLARE FUNCTION BListboxExists%(stListbox$) +DECLARE FUNCTION WGetListboxItemCount%(stListbox$) +DECLARE FUNCTION BListboxItemExists%(stListbox$, stListboxItem$) +DECLARE FUNCTION SGetListboxItemText$(stListbox$) +DECLARE FUNCTION BComboBoxExists%(stComboBox$) +DECLARE FUNCTION WGetComboBoxItemCount%(stComboBox$) +DECLARE FUNCTION BComboBoxItemExists%(stComboBox$, stComboBoxItem$) +DECLARE FUNCTION SGetComboBoxItemText$(stComboBox$) +DECLARE FUNCTION BCheckboxExists%(stCheckbox$) +DECLARE FUNCTION BCheckboxChecked%(stCheckbox$) +DECLARE FUNCTION BCheckboxEnabled%(stCheckbox$) +DECLARE FUNCTION BEditTextExists%(stEditText$) +DECLARE FUNCTION SGetEditText$(stEditCaption$) +DECLARE FUNCTION BRadiobuttonExists%(stRadiobutton$) +DECLARE FUNCTION BRadiobuttonEnabled%(stRadiobutton$) +DECLARE FUNCTION BRadiobuttonChecked%(stRadiobutton$) + +'Prototypes from FTestKey.mst +DECLARE SUB XKey (s$) +DECLARE SUB XAlt (s$) +DECLARE SUB XCtrl (s$) +DECLARE SUB XShift (s$) +DECLARE SUB XCtrlAlt (s$) +DECLARE SUB XAltShift (s$) +DECLARE SUB XCtrlShift (s$) +DECLARE SUB XCtrlAltShift (s$) +DECLARE SUB XText(s$) +DECLARE SUB XEnter(s$) +DECLARE SUB XSelectMenuItem(stMenu$,stMenuItem$,stHMenuItem$) +DECLARE SUB XMenuItemExists(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemNotExists(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemGrayed(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemNotGrayed(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemChecked(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemNotChecked(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemEnabled(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XMenuItemNotEnabled(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE SUB XCaptionExists(stCaption$) +DECLARE SUB XCaptionNotExists(stCaption$) +DECLARE SUB XZoomWindow +DECLARE SUB XMaxWindow +DECLARE SUB XWindowMaximized +DECLARE SUB XWindowNotMaximized +DECLARE SUB XMinWindow +DECLARE SUB XWindowMinimized +DECLARE SUB XWindowNotMinimized +DECLARE SUB XRestoreWindow +DECLARE SUB XSizeActiveWindow (iXPixels%, iYPixels%, fAbsOrRel%) +DECLARE SUB XMoveActiveWindow (iXPixels%, iYPixels%, fAbsOrRel%) +DECLARE FUNCTION SKeyString$(s$) +DECLARE FUNCTION SHideKeys$(s$) +DECLARE FUNCTION BMenuItemExists%(stMenu$,stMenuItem$,stHMenuItem$) +DECLARE FUNCTION IGetMenuCount%(stMenu$, stMenuItem$) +DECLARE FUNCTION SGetMenuItemText$(stMenu$,stMenuItem$, iIndex%) +DECLARE FUNCTION BMenuItemGrayed%(stMenu$, stMenuItem$, stHMenuItem$) +DECLARE FUNCTION BMenuItemChecked%(stMenu$, stMenuItem$, stHMenuItem$) +DECLARE FUNCTION BMenuItemEnabled%(stMenu$,stMenuItem$, stHMenuItem$) +DECLARE FUNCTION SGetCaption$() +DECLARE FUNCTION BWindowMaximized% +DECLARE FUNCTION BWindowMinimized% + +'Prototypes from FTestUtl.mst +DECLARE SUB XFileExist(stFileSpec$) +DECLARE SUB XFileNotExist(stFileSpec$) +DECLARE SUB XFileCmp(stFileSpec1$,stFileSpec2$) +DECLARE SUB XFileNotCmp(stFileSpec1$,stFileSpec2$) +DECLARE SUB XDeleteFile(stFileSpec$) +DECLARE SUB XDeleteFileIfExist(stFileSpec$) +DECLARE SUB XCreateFile(stFileSpec$,s$) +DECLARE SUB XAppendFile(stFileSpec$,s$) +DECLARE SUB XWaitMessageFile(s$,Message$, WaitTime%) +DECLARE SUB XCWDCmp(s$) +DECLARE SUB XCWDNotCmp(s$) +DECLARE SUB XDriveCmp(s$) +DECLARE SUB XDriveNotCmp(s$) +DECLARE SUB XChangeCWD(s$) +DECLARE SUB XChangeDrive(s$) +DECLARE SUB XStartApp(stAppName$, stClassname$) +DECLARE SUB XSetCleanup (sCleanup$) +DECLARE SUB XDoCleanup +DECLARE SUB XMoveMouse (x%, y%) +DECLARE SUB XClick(button%, x%, y%) +DECLARE SUB XDblClick (button%, x%, y%) +DECLARE SUB XDragMouse (button%, x%, y%) +DECLARE SUB XClipBoardCmp (s$) +DECLARE FUNCTION BFileExist%(stFileSpec$) +DECLARE FUNCTION BFileCmp%(stFileSpec1$,stFileSpec2$) +DECLARE FUNCTION BCWDCmp%(s$) +DECLARE FUNCTION BDriveCmp%(s$) +DECLARE FUNCTION HStartApp%(stAppName$) +DECLARE FUNCTION HFindApplication%(stCaption$) +DECLARE FUNCTION SStripNull$(target$) + + +'$INCLUDE 'FTestLog.mst' +'$INCLUDE 'FTestKey.mst' +'$INCLUDE 'FTestUtl.mst' + + +' These routines have to be after the above includes so that +' the functions used are declared + +ON END XDoCleanup + +' Set a UAE trap and log failure if one occurs + +TRAP UAETrap FROM "TESTDRVR.EXE" + XSetTerminate TRUE + XLogFailure "Application UAEed" +END TRAP + +' in the FastTest code, gErrorType will be set to one of the following +' CASE items to be handled and set back to EC_NOTHING when the particular +' place where an error could occur is past. +ON ERROR GOTO XErrorHandler + +GOTO UsersCode + +XErrorHandler: + + SELECT CASE gErrorType + CASE 0 + XSetTerminate TRUE + XLogFailure "Internal FastTest Error" ' catch undeclared ET vars + CASE ET_NOTHING + XSetTerminate TRUE + XLogFailure "Unexpected RunTime error;" + ERF + ":" + STR$(ERR) + " " + ERROR$(ERR) + CASE ET_NEXT + ' Code that uses this will check the global error variable + ' and log an appropriate error if one occurred + gfError = TRUE + RESUME NEXT + CASE ET_LOG + Print "****** A Log error occurred ******" + Pause "****** A Log error occurred ******" + + END + + END SELECT + XSetTerminate TRUE + XLogFailure "Internal FastTest error" + + +UsersCode: diff --git a/private/oleauto/tools/win16/os2/inc/fcntl.h b/private/oleauto/tools/win16/os2/inc/fcntl.h new file mode 100644 index 000000000..15aeb9b31 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/fcntl.h @@ -0,0 +1,54 @@ +/*** +*fcntl.h - file control options used by open() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines constants for the file control options used +* by the open() function. +* [System V] +* +****/ + +#ifndef _INC_FCNTL + +#define _O_RDONLY 0x0000 /* open for reading only */ +#define _O_WRONLY 0x0001 /* open for writing only */ +#define _O_RDWR 0x0002 /* open for reading and writing */ +#define _O_APPEND 0x0008 /* writes done at eof */ + +#define _O_CREAT 0x0100 /* create and open file */ +#define _O_TRUNC 0x0200 /* open and truncate */ +#define _O_EXCL 0x0400 /* open only if file doesn't already exist */ + +/* _O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s, +** and <lf> sequences translated to <cr><lf> on write()'s +*/ + +#define _O_TEXT 0x4000 /* file mode is text (translated) */ +#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */ + +/* macro to translate the C 2.0 name used to force binary mode for files */ + +#define _O_RAW _O_BINARY + +/* Open handle inherit bit */ + +#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_RDWR _O_RDWR +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_EXCL _O_EXCL +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY +#define O_NOINHERIT _O_NOINHERIT +#endif + +#define _INC_FCNTL +#endif /* _INC_FCNTL */ diff --git a/private/oleauto/tools/win16/os2/inc/file.lst b/private/oleauto/tools/win16/os2/inc/file.lst new file mode 100644 index 000000000..0cc293a0e --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/file.lst @@ -0,0 +1,34 @@ +assert +bios +conio +ctype +direct +dos +errno +fcntl +float +graph +io +limits +locale +malloc +math +memory +pgchart +process +search +setjmp +share +signal +stdarg +stddef +stdio +stdlib +string +time +varargs +sys\locking +sys\stat +sys\timeb +sys\types +sys\utime diff --git a/private/oleauto/tools/win16/os2/inc/float.h b/private/oleauto/tools/win16/os2/inc/float.h new file mode 100644 index 000000000..cada3a485 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/float.h @@ -0,0 +1,213 @@ +/*** +*float.h - constants for floating point values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains defines for a number of implementation dependent +* values which are commonly used by sophisticated numerical (floating +* point) programs. +* [ANSI] +* +****/ + +#ifndef _INC_FLOAT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#define DBL_DIG 15 /* # of decimal digits of precision */ +#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ +#define DBL_MANT_DIG 53 /* # of bits in mantissa */ +#define DBL_MAX 1.7976931348623158e+308 /* max value */ +#define DBL_MAX_10_EXP 308 /* max decimal exponent */ +#define DBL_MAX_EXP 1024 /* max binary exponent */ +#define DBL_MIN 2.2250738585072014e-308 /* min positive value */ +#define DBL_MIN_10_EXP (-307) /* min decimal exponent */ +#define DBL_MIN_EXP (-1021) /* min binary exponent */ +#define _DBL_RADIX 2 /* exponent radix */ +#define _DBL_ROUNDS 1 /* addition rounding: near */ + +#define FLT_DIG 6 /* # of decimal digits of precision */ +#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */ +#define FLT_GUARD 0 +#define FLT_MANT_DIG 24 /* # of bits in mantissa */ +#define FLT_MAX 3.402823466e+38F /* max value */ +#define FLT_MAX_10_EXP 38 /* max decimal exponent */ +#define FLT_MAX_EXP 128 /* max binary exponent */ +#define FLT_MIN 1.175494351e-38F /* min positive value */ +#define FLT_MIN_10_EXP (-37) /* min decimal exponent */ +#define FLT_MIN_EXP (-125) /* min binary exponent */ +#define FLT_NORMALIZE 0 +#define FLT_RADIX 2 /* exponent radix */ +#define FLT_ROUNDS 1 /* addition rounding: near */ + +#define LDBL_DIG 18 /* # of decimal digits of precision */ +#define LDBL_EPSILON 1.084202172485504434e-019L /* smallest such that 1.0+LDBL_EPSILON != 1.0 */ +#define LDBL_MANT_DIG 64 /* # of bits in mantissa */ +#define LDBL_MAX 1.189731495357231765e+4932L /* max value */ +#define LDBL_MAX_10_EXP 4932 /* max decimal exponent */ +#define LDBL_MAX_EXP 16384 /* max binary exponent */ +#define LDBL_MIN 3.3621031431120935063e-4932L /* min positive value */ +#define LDBL_MIN_10_EXP (-4931) /* min decimal exponent */ +#define LDBL_MIN_EXP (-16381) /* min binary exponent */ +#define _LDBL_RADIX 2 /* exponent radix */ +#define _LDBL_ROUNDS 1 /* addition rounding: near */ + + +/* + * 8087/80287 math control information + */ + + +/* User Control Word Mask and bit definitions. + * These definitions match the 8087/80287 + */ + +#define _MCW_EM 0x003f /* interrupt Exception Masks */ +#define _EM_INVALID 0x0001 /* invalid */ +#define _EM_DENORMAL 0x0002 /* denormal */ +#define _EM_ZERODIVIDE 0x0004 /* zero divide */ +#define _EM_OVERFLOW 0x0008 /* overflow */ +#define _EM_UNDERFLOW 0x0010 /* underflow */ +#define _EM_INEXACT 0x0020 /* inexact (precision) */ + +#define _MCW_IC 0x1000 /* Infinity Control */ +#define _IC_AFFINE 0x1000 /* affine */ +#define _IC_PROJECTIVE 0x0000 /* projective */ + +#define _MCW_RC 0x0c00 /* Rounding Control */ +#define _RC_CHOP 0x0c00 /* chop */ +#define _RC_UP 0x0800 /* up */ +#define _RC_DOWN 0x0400 /* down */ +#define _RC_NEAR 0x0000 /* near */ + +#define _MCW_PC 0x0300 /* Precision Control */ +#define _PC_24 0x0000 /* 24 bits */ +#define _PC_53 0x0200 /* 53 bits */ +#define _PC_64 0x0300 /* 64 bits */ + + +/* initial Control Word value */ + +#define _CW_DEFAULT ( _IC_AFFINE + _RC_NEAR + _PC_64 + _EM_DENORMAL + _EM_UNDERFLOW + _EM_INEXACT ) + + +/* user Status Word bit definitions */ + +#define _SW_INVALID 0x0001 /* invalid */ +#define _SW_DENORMAL 0x0002 /* denormal */ +#define _SW_ZERODIVIDE 0x0004 /* zero divide */ +#define _SW_OVERFLOW 0x0008 /* overflow */ +#define _SW_UNDERFLOW 0x0010 /* underflow */ +#define _SW_INEXACT 0x0020 /* inexact (precision) */ + + +/* invalid subconditions (_SW_INVALID also set) */ + +#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ +#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ +#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ +#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ + + +/* Floating point error signals and return codes */ + +#define _FPE_INVALID 0x81 +#define _FPE_DENORMAL 0x82 +#define _FPE_ZERODIVIDE 0x83 +#define _FPE_OVERFLOW 0x84 +#define _FPE_UNDERFLOW 0x85 +#define _FPE_INEXACT 0x86 + +#define _FPE_UNEMULATED 0x87 +#define _FPE_SQRTNEG 0x88 +#define _FPE_STACKOVERFLOW 0x8a +#define _FPE_STACKUNDERFLOW 0x8b + +#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ + + +/* function prototypes */ + +unsigned int __cdecl _clear87(void); +unsigned int __cdecl _control87(unsigned int, unsigned int); +void __cdecl _fpreset(void); +unsigned int __cdecl _status87(void); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DBL_RADIX _DBL_RADIX +#define DBL_ROUNDS _DBL_ROUNDS + +#define LDBL_RADIX _LDBL_RADIX +#define LDBL_ROUNDS _LDBL_ROUNDS + +#define MCW_EM _MCW_EM +#define EM_INVALID _EM_INVALID +#define EM_DENORMAL _EM_DENORMAL +#define EM_ZERODIVIDE _EM_ZERODIVIDE +#define EM_OVERFLOW _EM_OVERFLOW +#define EM_UNDERFLOW _EM_UNDERFLOW +#define EM_INEXACT _EM_INEXACT + +#define MCW_IC _MCW_IC +#define IC_AFFINE _IC_AFFINE +#define IC_PROJECTIVE _IC_PROJECTIVE + +#define MCW_RC _MCW_RC +#define RC_CHOP _RC_CHOP +#define RC_UP _RC_UP +#define RC_DOWN _RC_DOWN +#define RC_NEAR _RC_NEAR + +#define MCW_PC _MCW_PC +#define PC_24 _PC_24 +#define PC_53 _PC_53 +#define PC_64 _PC_64 + +#define CW_DEFAULT _CW_DEFAULT + +#define SW_INVALID _SW_INVALID +#define SW_DENORMAL _SW_DENORMAL +#define SW_ZERODIVIDE _SW_ZERODIVIDE +#define SW_OVERFLOW _SW_OVERFLOW +#define SW_UNDERFLOW _SW_UNDERFLOW +#define SW_INEXACT _SW_INEXACT + +#define SW_UNEMULATED _SW_UNEMULATED +#define SW_SQRTNEG _SW_SQRTNEG +#define SW_STACKOVERFLOW _SW_STACKOVERFLOW +#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW + +#define FPE_INVALID _FPE_INVALID +#define FPE_DENORMAL _FPE_DENORMAL +#define FPE_ZERODIVIDE _FPE_ZERODIVIDE +#define FPE_OVERFLOW _FPE_OVERFLOW +#define FPE_UNDERFLOW _FPE_UNDERFLOW +#define FPE_INEXACT _FPE_INEXACT + +#define FPE_UNEMULATED _FPE_UNEMULATED +#define FPE_SQRTNEG _FPE_SQRTNEG +#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW +#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW + +#define FPE_EXPLICITGEN _FPE_EXPLICITGEN + +#endif /* __STDC__ */ + + +#ifdef __cplusplus +} +#endif + +#define _INC_FLOAT +#endif /* _INC_FLOAT */ diff --git a/private/oleauto/tools/win16/os2/inc/fstream.h b/private/oleauto/tools/win16/os2/inc/fstream.h new file mode 100644 index 000000000..c8f78fc39 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/fstream.h @@ -0,0 +1,132 @@ +/*** +*fstream.h - definitions/declarations for filebuf and fstream classes +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the filebuf and fstream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_FSTREAM +#define _INC_FSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +typedef int filedesc; + +class filebuf : public streambuf { +public: +static const int openprot; /* default share/prot mode for open */ + +// optional share values for 3rd argument (prot) of open or constructor +static const int sh_compat; /* compatibility share mode */ +static const int sh_none; /* exclusive mode no sharing */ +static const int sh_read; /* allow read sharing */ +static const int sh_write; /* allow write sharing */ +// use (sh_read | sh_write) to allow both read and write sharing + +// options for setmode member function +static const int binary; +static const int text; + + filebuf(); + filebuf(filedesc); + filebuf(filedesc, char *, int); + ~filebuf(); + + filebuf* attach(filedesc); + filedesc fd() const { return (x_fd==-1) ? EOF : x_fd; } + int is_open() const { return (x_fd!=-1); } + filebuf* open(const char *, int, int = filebuf::openprot); + filebuf* close(); + int setmode(int = filebuf::text); + +virtual int overflow(int=EOF); +virtual int underflow(); + +virtual streambuf* setbuf(char*, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +// virtual streampos seekpos(streampos, int); +virtual int sync(); + +private: + filedesc x_fd; + int x_fOpened; +}; + +class ifstream : public istream { +public: + ifstream(); + ifstream(const char *, int =ios::in, int = filebuf::openprot); + ifstream(filedesc); + ifstream(filedesc, char *, int); + ~ifstream(); + + streambuf * setbuf(char *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char *, int =ios::in, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class ofstream : public ostream { +public: + ofstream(); + ofstream(const char *, int =ios::out, int = filebuf::openprot); + ofstream(filedesc); + ofstream(filedesc, char *, int); + ~ofstream(); + + streambuf * setbuf(char *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char *, int =ios::out, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class fstream : public iostream { +public: + fstream(); + fstream(const char *, int, int = filebuf::openprot); + fstream(filedesc); + fstream(filedesc, char *, int); + ~fstream(); + + streambuf * setbuf(char *, int); + filebuf* rdbuf() const { return (filebuf*) ostream::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char *, int, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +// manipulators to dynamically change file access mode (filebufs only) +inline ios& binary(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::binary); return _fstrm; } +inline ios& text(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::text); return _fstrm; } + +// Restore default packing +#pragma pack() + +#endif // !_INC_FSTREAM diff --git a/private/oleauto/tools/win16/os2/inc/ftestkey.mst b/private/oleauto/tools/win16/os2/inc/ftestkey.mst new file mode 100644 index 000000000..ab089a3e3 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ftestkey.mst @@ -0,0 +1,1061 @@ +'FTestKey.inc - definitions for Fast Test Key, Menu and Window routines +' +' Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +' +'Purpose: +' This file defines the Key, Menu and Window functions of the Fast Test +' functionality +' + + +'********************************************************** +'***************** Keystroke Subroutines ****************** +'********************************************************** + +' support routine for other subroutines, not meant to be called +' except by fasttest routines +' +FUNCTION SKeyString$(s$) + DIM sTemp$ + + IF LEN(s$) = 0 THEN + XLogFailure "zero length string passed to SKeyString$" + END IF + + IF LEN(s$) = 1 THEN + SELECT CASE ASC(s$) + + ' alphanumerics, pass along as given + CASE ASC("a") to ASC("z"), ASC("A") to ASC("Z"), ASC("0") to ASC("9") + sTemp$ = s$ + + ' special characters to Dokeys, surround with braces + CASE ASC("+"),ASC("^"),ASC("%"), ASC("{"),ASC("}"),ASC("("),ASC(")"),ASC("["),ASC("]") + sTemp$ = "{" + s$ + "}" + + ' normal printable non-alphanumerics, pass along + CASE ASC("~"),ASC("!"),ASC("@"),ASC("#"),ASC("$"),ASC("&") + sTemp$ = s$ + + CASE ASC("*"),ASC("_"),ASC("|"),ASC(""""),ASC("<"),ASC(">") + sTemp$ = s$ + + CASE ASC("-"),ASC("="),ASC("\"),ASC(";"),ASC("'"),ASC(":") + sTemp$ =s$ + + CASE ASC(","),ASC("."),ASC("/"),ASC(" "),ASC("?"),ASC("`") + sTemp$ =s$ + + ' non-printable other character + CASE ELSE + XLogFailure "Bad character passed to SKeyString$" + + END SELECT + + ELSE + ' the string is greater than 1 character in length, put braces + ' around it and send it to Dokeys and let it parse it + sTemp$ = "{" + s$ + "}" + END IF + SKeyString$ = "(" + sTemp$ + ")" +END FUNCTION + +' support routine for other subroutines, not meant to be called +' except by fasttest routines +' +FUNCTION SHideKeys$(s$) + DIM check$ + DIM i% + DIM stRet$ + ' this code must hide each character that is special to DoKeys + + stRet$ = "" ' start empty + FOR i% = 1 to LEN(s$) + ' special characters to DoKeys, surround with braces + check$ = mid$(s$,i%,1) + IF check$ = "+" OR check$ = "^" OR check$ = "%" OR check$ = "{" OR check$ = "}" OR check$ = "(" OR check$ = ")" OR check$ = "[" OR check$ = "]" THEN + stRet$ = stRet$ + "{" + check$ + "}" + ELSE + stRet$ = stRet$ + check$ + END IF + NEXT i% + SHideKeys$ = stRet$ +END FUNCTION + +' XKey(string) +' Send Keystroke to active application +' This uses DoKeys, so DoKeys syntax is allowed +' ex XKey "F" uppercase character f +' XKey "f" lowercase character f +' XKey "enter" see DoKeys document for list of special word translations + +SUB XKey (s$) + DoKeys SKeyString$(s$) + +END SUB + + +' XAlt(string) +' send keystroke as IF alt key pressed at same time +' ex XAlt "a" +' XAlt "f" + +SUB XAlt (s$) + DoKeys "%" + SKeyString$(s$) + +END SUB + +' XCtrl(string) +' send keystroke as IF Ctrl key pressed at same time +' ex XCtrl "a" + +SUB XCtrl (s$) + DoKeys "^" + SKeyString$(s$) +END SUB + +' XShift(string) +' send keystroke as IF Shift key pressed at same time +' ex XShift "a" +' XShift "f" same as XShift "f" + +SUB XShift (s$) + DoKeys "+" + SKeyString$(s$) + +END SUB + + +' XCtrlAlt(string) +' send keystroke as IF Ctrl and XAlt key pressed at same time +' ex XCtrlAlt "a" +' XCtrlAlt "f" + +SUB XCtrlAlt (s$) + DoKeys "^%" + SKeyString$(s$) +END SUB + +' XAltShift(string) +' send keystroke as IF XAlt and Shift key pressed at same time +' ex XAltShift "a" +' XAltShift "f" same as XAltShift "f" + +SUB XAltShift (s$) + DoKeys "%+" + SKeyString$(s$) +END SUB + +' XCtrlShift(string) +' send keystroke as IF Ctrl and Shift key pressed at same time +' ex XCtrlShift "a" +' XCtrlShift "f" same as XCtrlShift "f" + +SUB XCtrlShift (s$) + DoKeys "^+" + SKeyString$(s$) +END SUB + +' XCtrlAltShift(string) +' send keystroke as IF XCtrlAlt, XAlt and Shift key pressed at same time +' ex XCtrlAltShift "a" +' XCtrlAltShift "f" same as XCtrlAltShift "f" + +SUB XCtrlAltShift (s$) + DoKeys "^%+" + SKeyString$(s$) + +END SUB + + +'XText(string) +' send multiple characters to app +' ex XText "hello world" + +SUB XText(s$) + DoKeys SHideKeys$(s$) +END SUB + + +'XEnter(string) +' send multiple characters to app followed by enter +' ex XEnter "hello world" + +SUB XEnter(s$) + DoKeys SHideKeys$(s$) + "{enter}" +END SUB + + + + + +'********************************************************** +'***************** Menu Subroutines *********************** +'********************************************************** + + + +' +' XSelectMenuItem(stMenu, stMenuItem, stHMenuItem) +' +' Description: This procedure selects (equivalent to a mouse +' click or keyboard access) the specified menu item +' name. fMouseOrKey specifies the access method. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' fMouseOrKey = access method, default is true(fgMouse). +' Returns: Nothing. +' Example: XSelectMenuItem "Edit", "Copy","" +' +' +SUB XSelectMenuItem(stMenu$,stMenuItem$,stHMenuItem$) + XMenuItemExists stMenu$,stMenuItem$,stHMenuItem$ + + WMenu(stMenu$) + IF stMenuItem$ <> "" THEN + WMenu(stMenuItem$) + END IF + IF stHMenuItem$ <> "" THEN 'If popup menu is to be selected + WMenu(stHMenuItem$) 'Select menu item under popup menu. + END IF + +END SUB + + + +' +' BMenuItemExists(stMenu, stMenuItem, stHMenuItem) +' +' Description: This procedure checks for the specified menu item +' and returns true IF found, false IF not found. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to check or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' Returns: -1(true): Found menu item. +' 0(false): Couldn't find menu item. +' Example: FSuccess% = BMenuItemExists("File", "", "") +' fSuccess% = BMenuItemExists("FIle","Edit", "") +' +' +FUNCTION BMenuItemExists%(stMenu$,stMenuItem$,stHMenuItem$) + + IF stHMenuItem$ = "" THEN + IF stMenuItem$ = "" THEN + BMenuItemExists = WMenuExists(stMenu$) <> 0 + ELSE + WMenu(stMenu$) + BMenuItemExists = WMenuExists(stMenuItem$) <> 0 + END IF + ELSE + WMenu(stMenu$) + WMenu(stMenuItem$) + BMenuItemExists = WMenuExists(stHMenuItem$) <> 0 + END IF + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + +' +' XMenuItemExists (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item does not exist. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemExists "File", "Close", "" +' +' +' +SUB XMenuItemExists(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemExists(stMenu$,stMenuItem$, stHMenuItem$) = 0 THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " does not Exist" + END IF +END SUB + + +' +' XMenuItemNotExists (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item exist. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemNotExists "File", "Close", "" +' +' +' + +SUB XMenuItemNotExists(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemExists(stMenu$,stMenuItem$, stHMenuItem$) THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " Exists" + END IF +END SUB + + + +' +' IGetMenuCount(stMenu, stMenuItem) +' +' Description: This procedure returns the number of menu items +' in the specified menu. +' Parameters: stMenu = top level menu to count menu items in. +' IF stMenu = "", THEN counts items in the menu bar(counts the +' number of top level menus). +' stMenuItem = secondary menu to count menu items in; counts hierarchial +' menu items. +' Returns: An integer; the number of menu items found. +' Example: iHowMany% = IGetMenuCount("","") returns how many top level menus. +' iHowMany% = IGetMenuCount("Utilities", "") returns the number of menu items +' in the "Utilities" menu. +' iHowMany% = IGetMenuCount("Utilities", "Info") returns how many menu items +' in the popup menu "Info". +' +' +FUNCTION IGetMenuCount%(stMenu$, stMenuItem$) + + IF stMenuItem$ <> "" THEN 'Count in menu items in hierarchial menu. + WMenu(stMenu$) + WMenu(stMenuItem$) + IGetMenuCount = WMenuCount() 'Count the number of menus items in the popup + 'menu. + ELSE + IF stMenu$ <> "" THEN 'Count menus in stMenu$. + WMenu(stMenu$) + IGetMenuCount = WMenuCount() 'Count the number of menus items in the menu. + ELSE + IGetMenuCount = WMenuCount() 'Count the number of menus in the menu bar if. + 'the above "IF" statements are skipped. + END IF + END IF + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + + +' +' SGetMenuItemText(stMenu, stMenuItem, iIndex) +' +' Description: This procedure returns the text of menu item, iIndex +' (base 1) in stMenu. Length of the buffer to store +' the menu item text is passed in. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to check or secondary menu, IF Hierarchial menu +' exists. +' iIndex = index of menu item in stMenu. +' iLength = length of buffer to store text +' Returns: a string, the menu item text(name). +' Example: Print SGetMenuItemText("","","", 3) gets name of 3rd menu. +' Print SGetMenuItemText("Utilities","","",3) gets name of 3rd menu item +' in the "Utilities" menu. +' Print SGetMenuItemText("Utilities","Info",3) gets name of 3rd menu item +' in the popup menu "Info". +' +' +FUNCTION SGetMenuItemText$(stMenu$,stMenuItem$, iIndex%) + DIM buffer$ + + buffer$ = String$(128,32) 'initialize with spaces. + IF stMenuItem$ <> "" THEN 'get menu text from hierarchial menu. + WMenu(stMenu$) + WMenu(stMenuItem$) + ELSE + IF stMenu$ <> "" THEN 'get menu text from stMenu$. + WMenu(stMenu$) + END IF + END IF + WMenuText iIndex%, buffer$ 'get menu text. IF above "IF" condition + 'is skipped, this gets text in menu bar. + buffer$ = SStripNull(buffer$) 'remove null character. + SGetMenuItemText = buffer$ 'return buffer$ + buffer$ = "" + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + + +' +' FIsMenuItemGrayed(stMenu$, stMenuItem$,stHMenuItem$) +' +' Description: This procedure checks to see IF the specified menu or +' menu item is grayed out or not. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' Returns: -1(true): IF grayed. +' 0(false): IF not grayed. +' Example: +' fIsGrayed% = BMenuItemGrayed("Edit", "Copy", "") +' fIsGrayed% = BMenuItemGrayed("Edit", "", "") +' +' +FUNCTION BMenuItemGrayed%(stMenu$, stMenuItem$, stHMenuItem$) + + IF stHMenuItem$ = "" THEN + IF stMenuItem$ = "" THEN + BMenuItemGrayed = WMenuGrayed(stMenu$) <> 0 'Check main menu bar menu items. + ELSE + WMenu(stMenu$) 'Check menu item within stMenuItem$. + BMenuItemGrayed = WMenuGrayed(stMenuItem$) <> 0 + END IF + ELSE + WMenu(stMenu$) 'Check popup menu items. + WMenu(stMenuItem$) + BMenuItemGrayed = WMenuGrayed(stHMenuItem$) <> 0 + END IF + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + +' +' XMenuItemGrayed (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is not Grayed. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemGrayed "File", "Close", "" +' +' +' + +SUB XMenuItemGrayed(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemGrayed(stMenu$,stMenuItem$, stHMenuItem$) = 0 THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is not Grayed" + END IF +END SUB + +' +' XMenuItemNotGrayed (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is Grayed. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemNotGrayed "File", "Close", "" +' +' +' + +SUB XMenuItemNotGrayed(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemGrayed(stMenu$,stMenuItem$, stHMenuItem$) THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is Grayed" + END IF +END SUB + + + +' +' BMenuItemChecked(stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: This procedure checks to see IF the specified menu +' item is checked or not. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' Returns: -1(true): IF checked. +' 0(false): IF not checked. +' Example: fIsChecked% = BMenuItemChecked("Format","Style","Bold") +' fIsChecked% = BMenuItemchecked("Edit", "Copy", "") +' +' +FUNCTION BMenuItemChecked%(stMenu$, stMenuItem$, stHMenuItem$) + + IF stHMenuItem$ = "" THEN + WMenu(stMenu$) 'Check menu item within stMenu$. + BMenuItemChecked = WMenuChecked(stMenuItem$) <> 0 + ELSE + WMenu(stMenu$) 'Check menu item under popup menu. + WMenu(stMenuItem$) + BMenuItemChecked = WMenuChecked(stHMenuItem$) <> 0 + END IF + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + + +' +' XMenuItemChecked (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is not Checked. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemChecked "Options", "Read Only", "" +' +' +' +SUB XMenuItemChecked(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemChecked(stMenu$,stMenuItem$, stHMenuItem$) = 0 THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is not Checked" + END IF +END SUB + +' +' XMenuItemNotChecked (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is Checked. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemNotChecked "Options", "Read Only", "" +' +' +' +SUB XMenuItemNotChecked(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemChecked(stMenu$,stMenuItem$, stHMenuItem$) THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is Checked" + END IF +END SUB + + + +' +' BMenuItemEnabled(stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: This procedure checks to see IF the specified menu or +' menu item is enabled or not. +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' Returns: -1(true): IF enabled. +' 0(false): IF not enabled. +' Example: fIsEnabled% = BMenuItemEnabled("File", "", "") +' fIsEnabled% = BMenuItemEnabled("File", "Close", "") +' +' +FUNCTION BMenuItemEnabled%(stMenu$,stMenuItem$, stHMenuItem$) + + IF stHMenuItem$ = "" THEN + IF stMenuItem$ = "" THEN + BMenuItemEnabled = WMenuEnabled(stMenu$) <> 0 'Check main menu bar menu items. + ELSE + WMenu(stMenu$) 'Check menu item within stMenu$. + BMenuItemEnabled = WMenuEnabled(stMenuItem$) <> 0 + END IF + ELSE + WMenu(stMenu$) 'Check menu item under popup menu. + WMenu(stMenuItem$) + BMenuItemEnabled = WMenuEnabled(stHMenuItem$) <> 0 + END IF + DoKeys "{esc 3}" 'Make sure you close menu. + +END FUNCTION + + +' +' XMenuItemEnabled (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is not Enabled. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemEnabled "Options", "Read Only", "" +' +' +' +SUB XMenuItemEnabled(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemEnabled(stMenu$,stMenuItem$, stHMenuItem$) = 0 THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is not Enabled" + END IF +END SUB + + +' +' XMenuItemNotEnabled (stMenu$,stMenuItem$, stHMenuItem$) +' +' Description: +' Reports error IF menu item is Enabled. +' +' Parameters: stMenu = menu where stMenuItem is found. +' stMenuItem = menu item to select or secondary menu, IF Hierarchial menu +' exists. +' stHMenuItem = hierarchial(popup) menu item. +' +' Returns: nothing +' +' Example: XMenuItemNotEnabled "Options", "Read Only", "" +' +' +' +SUB XMenuItemNotEnabled(stMenu$,stMenuItem$, stHMenuItem$) + IF BMenuItemEnabled(stMenu$,stMenuItem$, stHMenuItem$) THEN + XLogFailure stMenu$ + " " + stMenuItem$ + " " + stHMenuItem$ + " is Enabled" + END IF +END SUB + + + +'********************************************************** +'***************** Window Subroutines ********************* +'********************************************************** + + + + +' +' XCaptionExists(stCaption$) +' +' Description: +' Will report error IF caption does not Exist. +' +' Parameters: stCaption$ - expected caption of current window +' +' Returns: nothing +' +' Example: XCaptionExists "Winword" +' +' +' +SUB XCaptionExists(stCaption$) + IF Instr(SGetCaption(), stCaption$) = 0 THEN + XLogFailure stCaption$ + " caption does not exist in active window." + END IF +END SUB + + +' +' XCaptionNotExists(stCaption$) +' +' Description: +' Will report error IF caption Exist. +' +' Parameters: stCaption$ - NOT expected caption of current window +' +' Returns: nothing +' +' Example: XCaptionNotExists "Winword" +' +' +SUB XCaptionNotExists(stCaption$) + IF Instr(SGetCaption(), stCaption$) <> 0 THEN + XLogFailure stCaption$ + " caption Exists in active window." + END IF +END SUB + + + +' +' SGetCaption() +' +' Description: +' Returns the caption of the Active window +' Parameters: +' none +' Return: +' Caption of the Active window +' Example: +' stCaption$ = SGetCaption() +' +' +FUNCTION SGetCaption$() + DIM x% + DIM stCaption$ + + stCaption$ = String$(100, 32) + x% = GetWindowText (GetActiveWindow(), stCaption$, LEN(stCaption$)) + SGetCaption = mid$(stCaption$,1,x%) + stCaption$ = "" +END FUNCTION + + + +' +' XZoomWindow +' +' Description: Toggles the state of the window between normalized +' and maximized. +' Parameters: None +' +' Returns: none +' +' Example: XZoomWindow +' +' +' +SUB XZoomWindow + DIM bogus% + DIM lhwndTemp% + + lhwndTemp% = GetActiveWindow() + + ' IF the window is maximized, normalize. + + IF (IsZoomed(lhwndTemp%)) THEN + ' window is maximized, we must normalize it + bogus% = ShowWindow(lhwndTemp%, SW_SHOWNORMAL) + ELSE + bogus% = ShowWindow(lhwndTemp%, SW_MAXIMIZE) + END IF + +END SUB + + +' +' XMaxWindow +' +' Description: Maximize the current active window +' Parameters: None +' Returns: None +' Example: XMaxWinow +' +' +' + + +SUB XMaxWindow + DIM bogus% + DIM lhwndTemp% + DIM lWndStyle& + + lhwndTemp% = GetActiveWindow () + + ' Get the window's style attributes + lWndStyle& = GetWindowLong(lhwndTemp%, GWL_STYLE) + + IF ((lWndStyle& And WS_MAXIMIZE) <> 0) THEN + XLogFailure "Could not maximize active window, already maximized" + ELSE + bogus% = ShowWindow(lhwndTemp%, SW_SHOWMAXIMIZED) + END IF + +END SUB + +' +' XWindowMaximized +' +' Description: check IF the current active window is Maximized +' Parameters: None +' Returns: None +' Example: XWindowMaximized +' +' +' + + +SUB XWindowMaximized + IF BWindowMaximized = 0 THEN + XLogFailure "Active Window not maximized" + END IF + +END SUB + +' +' XWindowNotMaximized +' +' Description: Check that the current window is not maximized +' Parameters: None +' Returns: None +' Example: XWindowNotMaximized +' +' +' + + +SUB XWindowNotMaximized + + IF BWindowMaximized THEN + XLogFailure "Active Window is maximized" + END IF + +END SUB + +' +' BWindowMaximized +' +' Description: detect IF current window is maximized +' Parameters: None +' Returns: None +' Example: BWindowMaximized +' +' +' + + +FUNCTION BWindowMaximized% + DIM bogus% + DIM lhwndTemp% + DIM lWndStyle& + + lhwndTemp% = GetActiveWindow () + + ' Get the window's style attributes + lWndStyle& = GetWindowLong(lhwndTemp%, GWL_STYLE) + + BWindowMaximized = (lWndStyle& AND WS_MAXIMIZE) <> 0 + +END FUNCTION + + +' +' XMinWindow +' +' Description: Minimize the current active window +' Parameters: None +' Returns: None +' Example: XMinWindow +' +' +' + + +SUB XMinWindow + DIM bogus% + DIM lhwndTemp% + DIM lWndStyle& + + lhwndTemp% = GetActiveWindow () + + ' Get the window's style attributes + lWndStyle& = GetWindowLong(lhwndTemp%, GWL_STYLE) + + ' IF maximized, XLog the descrepancy + IF ((lWndStyle& And WS_MINIMIZE) <> 0) THEN + XLogFailure "Could not minimize active window, already minimized" + ELSE + bogus% = ShowWindow(lhwndTemp%, SW_SHOWMINIMIZED) + END IF + +END SUB + +' XWindowMinimized +' +' Description: Check that current window is minimized +' Parameters: None +' Returns: None +' Example: XWindowMinized +' +' +' + + +SUB XWindowMinimized + + IF BWindowMinimized = 0 THEN + XLogFailure "Active Window not Minimized" + END IF + +END SUB + +' +' XWindowNotMinimized +' +' Description: Check that current window is not minimized +' Parameters: None +' Returns: None +' Example: XWindowNotMinimized +' +' +' + + +SUB XWindowNotMinimized + IF BWindowMinimized THEN + XLogFailure "Active Window is Minimized" + END IF + +END SUB + +' +' BWindowMinimized +' +' Description: Detect IF active window minimized +' Parameters: None +' Returns: None +' Example: fMin% = BWindowMinimized +' +' +' + + +FUNCTION BWindowMinimized% + DIM bogus% + DIM lhwndTemp% + DIM lWndStyle& + + lhwndTemp% = GetActiveWindow () + + ' Get the window's style attributes + lWndStyle& = GetWindowLong(lhwndTemp%, GWL_STYLE) + + BWindowMinimized = (lWndStyle& AND WS_MINIMIZE) <> 0 + +END FUNCTION + +' +' XRestoreWindow +' +' Description: Restore the current active window. NOTE: You must make +' the icon the active window before calling XRestoreWin! +' Parameters: None +' Returns: None +' Example: XRestoreWindow +' +' +' + + +SUB XRestoreWindow + DIM bogus% + DIM lhwndTemp% + DIM lWndStyle& + + lhwndTemp% = GetActiveWindow () + + ' Get the window's style attributes + lWndStyle& = GetWindowLong(lhwndTemp%, GWL_STYLE) + + ' IF maximized, XLog the descrepancy + IF ((lWndStyle& And WS_MINIMIZE) = 0) AND ((lWndStyle& And WS_MAXIMIZE) = 0) THEN + XLogFailure "Active window is not minimized or maximized." + ELSE + bogus% = ShowWindow(lhwndTemp%, SW_RESTORE) + END IF + +END SUB + + + +' +' XSizeActiveWindow(iXPixels, iYPixels, fAbsOrRel) +' +' Description: Moves the bottom-right corner of the active window +' to new coordiates iXPixels, iYPixels. IF fAbsOrRel +' is TRUE, the coordiates are absolute. IF fAbsOrRel +' is FALSE, the coordiates are relative to the current +' position. +' Parameters: +' iXPixels - X coordinate +' iYPixels - Y coordinate +' IF !fAbsOrRel FALSE, the X,Y coordinates are relative to the +' current mouse coordianates. +' +' Returns: none +' +' Example: XSizeActiveWindow(iXLocate, iYLocate, fAbsolue) +' +' +' + +SUB XSizeActiveWindow (iXPixels%, iYPixels%, fAbsOrRel%) + + DIM xyTempRect As rect + DIM iTempX% + DIM iTempY% + DIM temphWnd% + + IF fAbsOrRel% THEN + WSetWndSiz GetActiveWindow(), iXPixels%, iYPixels% + ELSE + ' Find the active window + temphWnd% = GetActiveWindow + + ' Get the Rect of the active window + GetWindowRect temphWnd%, xyTempRect + ' Determine new X coordinate + iTempX% = ((xyTempRect.right - 1) - (xyTempRect.left)) + iXPixels% + + ' Determine new Y coordinate + iTempY% = ((xyTempRect.bottom - 1) - (xyTempRect.top)) + iYPixels% + + ' size the window + WSetWndSiz GetActiveWindow(), iXPixels%, iYPixels% + + END IF +END SUB + + +' +' XMoveActiveWindow(iXPixels, iYPixels, fAbsOrRel, fMouseOrKey) +' +' Description: Moves the top-left corner of the active window +' to new coordiates iXPixels, iYPixels. IF fAbsOrRel +' is TRUE, the coordiates are absolute. IF fAbsOrRel +' is FALSE, the coordiates are relative to the current +' position. +' Parameters: +' iXPixels - X coordinate +' iYPixels - Y coordinate +' IF !fAbsOrRel FALSE, the X,Y coordinates are relative to the +' current mouse coordianates. +' +' Returns: none +' +' Example: XMoveActiveWindow(iXLocate, iYLocate, fAbsolue) +' +' +' +' +SUB XMoveActiveWindow (iXPixels%, iYPixels%, fAbsOrRel%) + + DIM xyTempRect As Rect + DIM iTempX% + DIM iTempY% + DIM temphWnd% + + + IF fAbsOrRel% THEN + WSetWndPos GetActiveWindow(), iXPixels%, iYPixels% + ELSE + ' Find the active window + temphWnd% = GetActiveWindow + + ' Get the Rect of the active window + GetWindowRect temphWnd%, xyTempRect + + ' Determine new X coordinate + iTempX% = xyTempRect.left + iXPixels% + + ' Determine new Y coordinate + iTempY% = xyTempRect.top + iYPixels% + + ' move the window + WSetWndPos GetActiveWindow(), iXPixels%, iYPixels% + END IF +END SUB diff --git a/private/oleauto/tools/win16/os2/inc/ftestlog.mst b/private/oleauto/tools/win16/os2/inc/ftestlog.mst new file mode 100644 index 000000000..8cedfb3c4 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ftestlog.mst @@ -0,0 +1,1468 @@ +'XTestLog.inc - definitions for Fast Test Utility routines +' +' Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +' +'Purpose: +' This file defines the Log and Dialog functions of the Fast Test +' functionality +' + + +'********************************************************** +'***************** Log Subroutines ************************ +'********************************************************** + +' XSetLogFileName(stFilename$) +' Description: Sets global variable for use as the log name +' The global variable gsCurrentDir$ can be used to build +' the log name (it is the current directory for when the +' script is started). The default log name if this function +' is not called, is gsCurrentDir$ + "\TESTLOG.LOG" +' +' Example: XSetLogFileName "c:\test\app.log" +' XSetLogFileName gsCurrentDir$ + "\app.log" + +SUB XSetLogFilename(sFilename$) + + gsLogFileName = sFilename$ + +END SUB + +' XSetTerminate(fTerminate%) +' Description: +' Sets the terminate state to argument. If terminate is FALSE +' the XLogfailure will log the failure but execution will +' continue. This can lead to many failures in the log do to +' one early failure. It can also give many valid failures in +' a single run (checking all menu states for instance). + +SUB XSetTerminate(fTerminate%) + gfTerminate% = fTerminate% +END SUB + + +' +' XLog(stString$) +' +' Description: Logs string to one or several destinations +' 1. Disk 2. Screen 3. COM1 port 4. MsgBox +' based on a OR'd Global flag gfLogOptions. The CONST's to +' work with are LOG_DISK, LOG_SCREEN, LOG_COM, and +' LOG_MSGBOX respectively. These are definded in GLOBAL.WTD +' +' Parameters: stString$ - string to Log +' +' Returns: nothing +' +' Example: XSetLogOptions LOG_DISK + LOG_SCREEN +' XLog "Something to Log" 'this will be logged to disk and viewport +' +' +SUB XLog (stLog$) + DIM fh% + + fh% = FREEFILE + + IF gfLogOptions THEN + gErrorType = EC_LOG + + + IF (LOG_DISK AND gfLogOptions) THEN + Open gsLogFileName$ For Append As #fh% + Print #fh%, stLog$ + Close #fh% + + END IF + + IF (LOG_SCREEN AND gfLogOptions) THEN + 'Print the string to the Viewport + Print stLog$ + END IF + + IF (LOG_COM1 AND gfLogOptions) THEN + 'log to comport COM1 + + OPEN "COM1" For Append as #fh% + Print #fh%, stLog$ + Close #fh% + END IF + + IF (LOG_COM2 AND gfLogOptions) THEN + 'log to comport COM2 + + OPEN "COM2" For Append as #fh% + Print #fh%, stLog$ + Close #fh% + END IF + + IF (LOG_MSGBOX AND gfLogOptions) THEN + 'Put the string in a MsgBox + IF stLog$ <> "" THEN + Pause stLog$ + END IF + END IF + gErrorType = EC_NOTHING + + END IF 'gfLogOptions +END SUB + + + +' +' XLogBanner(stString$) +' +' Description: Logs string with a blank line before and after, +' and adds five *'s before and after the string. +' +' Parameters: stString$ - string to Log +' +' Returns: nothing +' +' Example: XLogBanner "Starting FOO Test" +' +' + + +SUB XLogBanner(lpszInput$) + + XLog "" + XLog "***** " + lpszInput$ + " *****" + XLog "" + +END SUB + + + +' +' XLogWarning(stString$) +' +' Description: Adds Warning banner to string +' +' Parameters: stString$ - string to Log +' +' Returns: nothing +' +' Example: XLogWarning "Too many menu items??" +' +' + +SUB XLogWarning(lpszInput$) + + XLog "" + XLog "!!! =====> WARNING <===== !!!" + XLog "***** " + lpszInput$ + " *****" + XLog "" + +END SUB + + + +' XLogFailure (stFailure$) +' +' Description: +' Logs failure with banner and ends the script +' Parameters: +' stFailure - Error string to logged +' Return: +' nothing +' Example: +' XLogFailure "Button does not exist" +' +' + +SUB XLogFailure(stFailure$) + XLog "" + XLog "***************** FAILURE ******************" + XLog stFailure$ + XLog "********************************************" + XLog "" + IF gfTerminate THEN + End + ELSE + gfFailure = TRUE + END IF +END SUB + +' XFailureCheck +' Description: this routine checks to see IF any failures +' have occured. IF so, the script is stopped. This would +' be used IF XSetTerminate has been used to disable the stopping +' of the script on failures. +' +SUB XFailureCheck + IF gfFailure THEN + XSetTerminate TRUE + XLogFailure "Ending script; failures have occurred" + END IF +END SUB + + + + + +' +' XSetLogOptions (wLogOptions%) +' +' Description: +' Sets the global log options flag to the passed options +' Parameters: +' wOptions - a set of bits OR'ed together. +' currently we have LOG_COM1 LOG_COM2 LOG_SCREEN LOG_DISK +' Return: +' nothing +' Example: +' XSetLogOptions LOG_COM1+LOG_SCREEN 'enable logging to screen and com1 +' +SUB XSetLogOptions (wLogOptions%) + 'set the global log flag + gfLogOptions = wLogOptions + gfTmpLogOptions = gfLogOptions ' allows XLogOn after XSetLogOptions +END SUB + + +' +' XLogOff () +' +' Description: +' Turn off logging +' Parameters: +' none +' Return: +' nothing +' Example: +' XLogOff +' +' +SUB XLogOff () + 'save the global log flag to a temporary and set options to zero + gfTmpLogOptions = gfLogOptions + gfLogOptions = 0 +END SUB + + + +' +' XLogOn () +' +' Description: +' Turn on logging +' Parameters: +' none +' Return: +' nothing +' Example: +' XLogOn +' +' +SUB XLogOn () + 'restore log options saved in temporary + gfLogOptions = gfTmpLogOptions +END SUB + + + +'********************************************************** +'***************** Dialog Subroutines ********************* +'********************************************************** + + + +' XDialogBoxExists(string) +'wait for dialog box with string argument for caption and +'log error IF it doesn't exist +SUB XDialogBoxExists(s$) + ' won't work IF app creates special class for its dialogs + + IF FindWindow(gsDialogClass$,s$) = 0 THEN + XLogFailure "dialog box " + s$ + " doesn't exist" + END IF + +END SUB + +' XDialogBoxNotExists(string) +'look for dialog box with string argument for caption and +'log error IF it exists +' +SUB XDialogBoxNotExists(s$) + + ' won't work IF app creates special class for its dialogs + + IF FindWindow(gsDialogClass$,s$) <> 0 THEN + XLogFailure "dialog box " + s$ + " exists" + END IF + +END SUB + +' BDialogBoxExists(string) +'look for dialog box with string argument for caption and +'return whether it exists or not +' +FUNCTION BDialogBoxExists%(s$) + + ' won't work IF app creates special class for its dialogs + + BDialogBoxExists = FindWindow(gsDialogClass$,s$) <> 0 + +END FUNCTION + +' XWaitDialogBox(string,integer) +'wait for dialog box with string argument for caption and +'integer argument as estimate of time to keep trying before +'logging a failure +SUB XWaitDialogBox(s$, WaitTime%) + + DIM hWnd% + DIM fDone% + DIM fFound% + DIM ret% + + fDone = FALSE + fFound = FALSE + + + WHILE NOT fDone% + + ' class for dialogs created by windows is gsDialogClass$ + ' won't work IF app creates special class for its dialogs + hWnd% = FindWindow(gsDialogClass$,s$) + IF hWnd% <> 0 THEN + fFound = TRUE + fDone = TRUE + ELSE + SLEEP 1 + WaitTime% = WaitTime% - 1 + IF WaitTime% <= 0 THEN + fDone = TRUE + END IF + END IF + + WEND + IF NOT fFound% THEN + XLogFailure "FAIL """ + s$ + """ dialogbox not found" + END IF +END SUB + + + + + +' ********************************************************** +' ***************** Dialog: Button Subroutines ************* +' ********************************************************** + + +' +' BButtonExists(stButtonName$) +' +' Description: This procedure checks to see IF the specified button +' exists or not. +' Parameters: stButtonName$ = button to be checked. +' Returns: -1(true): button exists. +' 0(false): button does not exist. +' Example: fExists% = BButtonExists("OK") +' +FUNCTION BButtonExists%(stButtonName$) + + BButtonExists = WButtonExists(stButtonName$) <> 0 + +END FUNCTION + + +' +' XButtonExists (stButtonName$) +' +' Description: +' Reports error IF button does not exist in active window. +' +' Parameters: stButtonName$ - button to be found. +' +' Returns: nothing +' +' Example: XButtonExists "Cancel" +' +' +' +SUB XButtonExists(stButton$) + IF BButtonExists(stButton$) = 0 THEN + XLogFailure stButton$ + " does not Exist" + END IF +END SUB + + +' +' XButtonNotExists (stButtonName$) +' +' Description: +' Reports error IF button Exists in active window. +' +' Parameters: stButtonName$ - button to not be found. +' +' Returns: nothing +' +' Example: XButtonNotExists "Cancel" +' +' +' +SUB XButtonNotExists(stButton$) + IF BButtonExists(stButton$) THEN + XLogFailure stButton$ + " Exists" + END IF +END SUB + + +' +' BButtonEnabled(stButtonName$) +' +' Description: This procedure checks to see IF the specified button +' is enabled or not. +' Parameters: stButtonName$ = button to be checked. +' Returns: -1(true): button enabled. +' 0(false): button not enabled. +' Example: fEnabled% = BButtonEnabled("OK") +' +FUNCTION BButtonEnabled%(stButtonName$) + + BButtonEnabled = WButtonEnabled(stButtonName$) <> 0 + +END FUNCTION + + +' +' XButtonEnabled (stButtonName$) +' +' Description: +' Reports error IF button is not Enabled. +' +' Parameters: stButtonName$ - button to be checked. +' +' Returns: nothing +' +' Example: XButtonEnabled "Cancel" +' +' +SUB XButtonEnabled(stButton$) + XButtonExists stButton$ + IF BButtonEnabled(stButton$) = 0 THEN + XLogFailure stButton$ + " is not Enabled" + END IF +END SUB + + +' +' XButtonNotEnabled (stButtonName$) +' +' Description: +' Reports error IF button is Enabled. +' +' Parameters: stButtonName$ - button to be checked. +' +' Returns: nothing +' +' Example: XButtonNotEnabled "Cancel" +' +' +SUB XButtonNotEnabled(stButton$) + XButtonExists stButton$ + IF BButtonEnabled(stButton$) THEN + XLogFailure stButton$ + " Enabled" + END IF +END SUB + + +' +' XClickButton(stButtonName$) +' +' Description: This procedure clicks the specified button in the +' currently active window. +' Parameters: stButtonName$ = button to be clicked. +' Returns: Nothing. +' Example: XClickButton "OK" +' +' +SUB XClickButton(stButtonName$) + XButtonExists stButtonName$ + WButtonClick stButtonName$ + +END SUB + + + +' ********************************************************** +' ************* Dialog: List Box Subroutines *************** +' ********************************************************** + + + +' +' BListboxExists(stListbox$) +' +' Description: This procedure checks to see IF the specified Listbox +' exists or not. +' Parameters: stListbox$ = Listbox to be checked. +' Returns: -1(true): Listbox exists. +' 0(false): Listbox does not exist. +' Example: fExists% = BListboxExists("OK") +' +FUNCTION BListboxExists%(stListbox$) + + BListboxExists = WListExists(stListbox$) <> 0 + +END FUNCTION + + +' +' XListBoxExists (stListbox$) +' +' Description: +' Reports error IF Listbox does not exist in active window. +' +' Parameters: stListbox$ - Listbox to be found. +' +' Returns: nothing +' +' Example: XListBoxExists "Cancel" +' +' +SUB XListBoxExists(stListbox$) + + IF WListExists(stListbox$) = 0 THEN + XLogFailure "Listbox " + stListbox$ + " does not Exist" + END IF + +END SUB + +' +' XListBoxNotExists (stListbox$) +' +' Description: +' Reports error IF Listbox exists in active window. +' +' Parameters: stListbox$ - Listbox not to be found. +' +' Returns: nothing +' +' Example: XListBoxNotExists "Cancel" +' +SUB XListBoxNotExists(stListbox$) + + IF WListExists(stListbox$) THEN + XLogFailure "Listbox " + stListbox$ + " exists" + END IF + +END SUB + + + + + +' +' XFocusListbox(stListbox$) +' +' Description: This procedure puts focus to the specified Listbox in the +' currently active window. +' Parameters: stListbox$ = Listbox to be given focus. +' Returns: Nothing. +' Example: XFocusListbox "&Files:" +' +SUB XFocusListbox(stListbox$) + + IF WListExists(stListbox$) THEN + 'it now has focus + ELSE + XLogFailure "Could not put focus on " + stListbox$ + " Listbox" + END IF + +END SUB + + + + +' +' WGetListboxItemCount%(stListbox$) +' +' Description: Returns the number of items in listbox stListbox$. +' +' Parameters: stListbox$ - Listbox to get item count from +' +' Returns: Int - List box item count +' +' Example: num% = WListboxItemCount () +' +' +FUNCTION WGetListboxItemCount%(stListbox$) + XListBoxExists stListbox$ + WGetListboxItemCount = WListCount(stListbox$) + +END FUNCTION + + + +' +' BListboxItemExists%(stListbox$, stListboxItem$) +' +' Description: Returns true IF list box item exists, false otherwise. +' +' Parameters: stListbox$- Listbox to look in +' stListboxItem$ - Item to look for +' +' Returns: Int - 0 IF item does not exist, positive val otherwise +' +' Example: flag% = BListboxItemExists ("&Files:","FOO.C") +' +' +FUNCTION BListboxItemExists%(stListbox$, stListboxItem$) + + BListboxItemExists = WListItemExists (stListbox$, stListboxItem$) <> 0 + +END FUNCTION + + + + +' +' XListBoxItemExists(stListbox$, stListboxItem$) +' +' Description: Logs failure IF list box item does not exist +' +' Parameters: stListbox$- Listbox to look in +' stListboxItem$ - Item to look for +' +' Returns: Nothing +' +' Example: XListBoxItemExists "&Files:","FOO.C" +' +' +SUB XListBoxItemExists (stListbox$, stListboxItem$) + + XListBoxExists stListbox$ + IF WListItemExists (stListbox$, stListboxItem$) = 0 THEN + XLogFailure "ListboxItem " + stListboxItem$ + " does not exist" + END IF + +END SUB + + +' +' XListBoxItemNotExists(stListbox$, stListboxItem$) +' +' Description: Logs failure IF list box item exists +' +' Parameters: stListbox$ - Listbox to look in +' stListboxItem$ - Item to look for +' +' Returns: Nothing +' +' Example: XListBoxItemNotExists "&Files:","FOO.C" +' +' +SUB XListBoxItemNotExists (stListbox$, stListboxItem$) + + XListBoxExists stListbox$ + IF WListItemExists (stListbox$, stListboxItem$) <> 0 THEN + XLogFailure "ListboxItem " + stListboxItem$ + " exists" + END IF + +END SUB + + + + +' +' XClickListboxItem(stListbox$, stListboxItem$) +' +' Description: Clicks on list box item +' +' Parameters: stListbox$ - Listbox to look in +' stListboxItem$ - Item to click on +' +' Returns: Nothing +' +' Example: XClickListboxItem "&Files:","FOO.C" +' +' +SUB XClickListboxItem (stListbox$, stListboxItem$) + + XListBoxExists stListbox$ + XListBoxItemExists stListbox$, stListboxItem$ + WListItemClkT stListbox$, stListboxItem$ + +END SUB + + + + +' +' XDblClickListboxItem% (stListbox$, stListboxItem$) +' +' Description: Clicks on list box item +' +' Parameters: stListbox$ - Listbox to look in +' stListboxItem$ - Item to click on +' +' Returns: Nothing +' +' Example: XDblClickListboxItem "&Files:","FOO.C" +' +' +SUB XDblClickListboxItem (stListbox$, stListboxItem$) + + XListBoxExists stListbox$ + XListBoxItemExists stListbox$, stListboxItem$ + WListItemDblClkT stListbox$, stListboxItem$ + +END SUB + + + + +' +' SGetListboxItemText (stListbox$) +' +' Description: Returns currently selected list box item +' +' Parameters: stListbox$ is the listbox to get item from +' +' Returns: Listbox Item string +' +' Example: a$ = StGetListboxItemText ("&User List:") +' +' +FUNCTION SGetListboxItemText$(stListbox$) + + XListBoxExists stListbox$ + SGetListboxItemText = ListText(stListbox$) + +END FUNCTION + + + +' ********************************************************** +' ************* Dialog: Combo Box Subroutines ************** +' ********************************************************** + + + +' +' BComboBoxExists%(stComboBox$) +' +' Description: This procedure checks to see IF the specified ComboBox +' exists or not. +' Parameters: stComboBox$ = ComboBox to be checked. +' Returns: -1(true): ComboBox exists. +' 0(false): ComboBox does not exist. +' Example: fExists% = BComboBoxExists("&File") +' +FUNCTION BComboBoxExists%(stComboBox$) + + BComboBoxExists = WComboExists(stComboBox$) <> 0 + +END FUNCTION + + +' +' XComboBoxExists (stComboBox$) +' +' Description: +' Reports error IF ComboBox does not exist in active window. +' +' Parameters: stComboBox$ - ComboBox to be found. +' +' Returns: nothing +' +' Example: XComboBoxExists "&File" +' +' +SUB XComboBoxExists(stComboBox$) + + IF WComboExists(stComboBox$) = 0 THEN + XLogFailure "ComboBox " + stComboBox$ + " does not Exist" + END IF + +END SUB + +' +' XComboBoxNotExists (stComboBox$) +' +' Description: +' Reports error IF ComboBox exists in active window. +' +' Parameters: stComboBox$ - ComboBox not to be found. +' +' Returns: nothing +' +' Example: XComboBoxNotExists "&File" +' +SUB XComboBoxNotExists(stComboBox$) + + IF WComboExists(stComboBox$) THEN + XLogFailure "ComboBox " + stComboBox$ + " exists" + END IF + +END SUB + + + + + +' +' XFocusComboBox(stComboBox$) +' +' Description: This procedure puts focus to the specified ComboBox in the +' currently active window. +' Parameters: stComboBox$ = ComboBox to be given focus. +' Returns: Nothing. +' Example: XFocusComboBox("&Files:") +' +SUB XFocusComboBox(stComboBox$) + + IF WComboExists(stComboBox$) THEN + 'it now has focus + ELSE + XLogFailure "Could not put focus on " + stComboBox$ + " ComboBox" + END IF + +END SUB + + + + +' +' WGetComboBoxItemCount%(stComboBox$) +' +' Description: Returns the number of items in ComboBox stComboBox$. +' +' Parameters: stComboBox$ - ComboBox to get item count from +' +' Returns: Int - Combo box item count +' +' Example: num% = WComboBoxItemCount () +' +' +FUNCTION WGetComboBoxItemCount%(stComboBox$) + XComboboxExists stComboBox$ + WGetComboBoxItemCount = WComboCount(stComboBox$) + +END FUNCTION + + + +' +' BComboBoxItemExists%(stComboBox$, stComboBoxItem$) +' +' Description: Returns true IF Combo box item exists, false otherwise. +' +' Parameters: stComboBox$ - ComboBox to look in +' stComboBoxItem$ - Item to look for +' +' Returns: Int - 0 IF item does not exist, positive val otherwise +' +' Example: flag% = BComboBoxItemExists("&Files","FOO.C") +' +FUNCTION BComboBoxItemExists%(stComboBox$, stComboBoxItem$) + + BComboBoxItemExists = WComboItemExists (stComboBox$, stComboBoxItem$) <> 0 + +END FUNCTION + + + + +' +' XComboBoxItemExists(stComboBox$, stComboBoxItem$) +' +' Description: Logs failure IF combo box item does not exist +' +' Parameters: stComboBox$ - ComboBox to look in +' stComboBoxItem$ - Item to look for +' +' Returns: Nothing +' +' Example: XComboBoxItemExists "&Files","FOO.C" +' +' +SUB XComboBoxItemExists (stComboBox$, stComboBoxItem$) + XComboBoxExists stComboBox$ + IF WComboItemExists (stComboBox$, stComboBoxItem$) = 0 THEN + XLogFailure "ComboBoxItem " + stComboBoxItem$ + " does not exist" + END IF + +END SUB + + +' +' XComboBoxItemNotExists(stComboBox$, stComboBoxItem$) +' +' Description: Logs failure IF combo box item exists +' +' Parameters: stComboBox$ - ComboBox to look in +' stComboBoxItem$ - Item to look for +' +' Returns: Nothing +' +' Example: XComboBoxItemNotExists "&Files","FOO.C" +' +' +SUB XComboBoxItemNotExists (stComboBox$, stComboBoxItem$) + + XComboBoxExists stComboBox$ + IF WComboItemExists (stComboBox$, stComboBoxItem$) THEN + XLogFailure "ComboBoxItem " + stComboBoxItem$ + " exists" + END IF + +END SUB + + + + +' +' XClickComboBoxItem(stComboBox$, stComboBoxItem$) +' +' Description: Clicks on Combo box item +' +' Parameters: stComboBox$ - ComboBox to look in +' stComboBoxItem$ - Item to click on +' +' Returns: Nothing +' +' Example: XClickComboBoxItem "&Files","FOO.C" +' +' +SUB XClickComboBoxItem (stComboBox$, stComboBoxItem$) + + XComboBoxExists stComboBox$ + XComboBoxItemExists stComboBox$,stComboBoxItem$ + WComboItemClkT stComboBox$, stComboBoxItem$ + +END SUB + + + + +' +' XDblClickComboBoxItem% (stComboBox$, stComboBoxItem$) +' +' Description: Clicks on combo box item +' +' Parameters: stComboBox$ - ComboBox to look in +' stComboBoxItem$ - Item to click on +' +' Returns: Nothing +' +' Example: XDblClickComboBoxItem "&Files","FOO.C" +' +' +SUB XDblClickComboBoxItem (stComboBox$, stComboBoxItem$) + + XComboBoxExists stComboBox$ + XComboBoxItemExists stComboBox$,stComboBoxItem$ + WComboItemDblClkT stComboBox$, stComboBoxItem$ + +END SUB + + + + +' +' StGetComboBoxItemText (stComboBox$) +' +' Description: Returns currently selected Combo box item +' +' Parameters: stComboBox$ is the ComboBox to get item from +' +' Returns: ComboBox Item string +' +' Example: a$ = StGetComboBoxItemText ("&User List:") +' +FUNCTION SGetComboBoxItemText$(stComboBox$) + + XComboBoxExists stComboBox$ + XComboBoxItemExists stComboBox$,stComboBoxItem$ + SGetComboBoxItemText = ComboText(stComboBox$) + +END FUNCTION + + + +' ********************************************************** +' ************* Dialog: Check Box Subroutines ************** +' ********************************************************** + + + +' +' BCheckboxExists(stCheckbox$) +' +' Description: This procedure checks to see IF the specified Checkbox +' exists or not. +' Parameters: stCheckbox$ = Checkbox to be checked. +' Returns: -1(true): Checkbox exists. +' 0(false): Checkbox does not exist. +' Example: fExists% = BCheckboxExists("&Delete") +' +FUNCTION BCheckboxExists%(stCheckbox$) + + BCheckboxExists = WCheckExists(stCheckbox$) <> 0 + +END FUNCTION + + +' +' XCheckboxExists (stCheckbox$) +' +' Description: +' Reports error IF Checkbox does not exist in active window. +' +' Parameters: stCheckbox$ - Checkbox to be found. +' +' Returns: nothing +' +' Example: XCheckboxExists "&Delete" +' +SUB XCheckboxExists(stCheckbox$) + IF BCheckboxExists(stCheckbox$) = 0 THEN + XLogFailure "Checkbox " + stCheckbox$ + " does not Exist" + END IF +END SUB + + +' +' XCheckboxNotExists (stCheckbox$) +' +' Description: +' Reports error IF Checkbox Exists in active window. +' +' Parameters: stCheckbox$ - Checkbox to not be found. +' +' Returns: nothing +' +' Example: XCheckboxNotExists "&Delete" +' +' +SUB XCheckboxNotExists(stCheckbox$) + IF BCheckboxExists(stCheckbox$) THEN + XLogFailure "Checkbox " + stCheckbox$ + " Exists" + END IF +END SUB + +' +' BCheckboxChecked(stCheckbox$) +' +' Description: This procedure checks the state of checkbox +' Parameters: stCheckbox$ = Checkbox to check state of. +' Returns: -1(true) IF the check box is checked. +' 0(false) IF the check box is not checked. +' Example: state% = BCheckboxChecked("Special") +' +FUNCTION BCheckboxChecked%(stCheckbox$) + BCheckboxChecked = WCheckState(stCheckbox$) <> 0 +END FUNCTION + + +' +' XCheckboxChecked(stCheckbox$) +' +' Description: This procedure checks the state of checkbox +' Parameters: stCheckbox$ = Checkbox to check state of. +' Returns: -1(true) IF the check box is checked. +' 0(false) IF the check box is not checked. +' Example: XCheckboxChecked "Special" +' +SUB XCheckboxChecked(stCheckbox$) + XCheckBoxExists stCheckbox$ + IF BCheckboxChecked(stCheckbox$) = 0 THEN + XLogFailure "Checkbox " + stCheckbox$ + " is not checked" + END IF + +END SUB + +' +' XCheckboxNotChecked(stCheckbox$) +' +' Description: This procedure checks the state of checkbox +' Parameters: stCheckbox$ = Checkbox to check state of. +' Returns: -1(true) IF the check box is checked. +' 0(false) IF the check box is not checked. +' Example: XCheckboxNotChecked "Special" +' +SUB XCheckboxNotChecked(stCheckbox$) + XCheckBoxExists stCheckbox$ + IF BCheckboxChecked(stCheckbox$) THEN + XLogFailure "Checkbox " + stCheckbox$ + " is checked" + END IF + +END SUB + + +' +' BCheckboxEnabled(stCheckbox$) +' +' Description: This procedure checks to see IF the specified Checkbox +' is enabled or not. +' Parameters: stCheckbox$ = Checkbox to be checked. +' Returns: -1(true): Checkbox enabled. +' 0(false): Checkbox not enabled. +' Example: fEnabled% = BCheckboxEnabled("&Delete") +' +FUNCTION BCheckboxEnabled%(stCheckbox$) + + BCheckboxEnabled = WCheckEnabled(stCheckbox$) <> 0 + +END FUNCTION + + +' +' XCheckboxEnabled (stCheckbox$) +' +' Description: +' Reports error IF Checkbox is not Enabled. +' +' Parameters: stCheckbox$ - Checkbox to be checked. +' +' Returns: nothing +' +' Example: XCheckboxEnabled "&Delete" +' +' +SUB XCheckboxEnabled(stCheckbox$) + XCheckBoxExists(stCheckbox$) + IF BCheckboxEnabled(stCheckbox$) = 0 THEN + XLogFailure "Checkbox " + stCheckbox$ + " is not Enabled" + END IF +END SUB + + +' +' XCheckboxNotEnabled (stCheckbox$) +' +' Description: +' Reports error IF Checkbox is Enabled. +' +' Parameters: stCheckbox$ - Checkbox to be checked. +' +' Returns: nothing +' +' Example: XCheckboxNotEnabled "&Delete" +' +SUB XCheckboxNotEnabled(stCheckbox$) + XCheckBoxExists(stCheckbox$) + IF BCheckboxEnabled(stCheckbox$) THEN + XLogFailure "Checkbox " + stCheckbox$ + " is Enabled" + END IF + +END SUB + + +' +' XClickCheckbox(stCheckbox$) +' +' Description: This procedure clicks the specified Checkbox in the +' currently active window. +' Parameters: stCheckbox$ = Checkbox to be clicked. +' Returns: Nothing. +' Example: XClickCheckbox "&Delete" +' +SUB XClickCheckbox(stCheckbox$) + XCheckBoxExists stCheckbox$ + WCheckClick stCheckbox$ + +END SUB + + + +' ********************************************************** +' ************* Dialog: Edit Control Subroutines *********** +' ********************************************************** + + +' +' XEditTextExists(stEditText$) +' +' Description: This procedure checks to see IF the specified EditText +' exists or not. +' Parameters: stEditText$ = EditText to be checked. +' Returns: -1(true): EditText exists. +' 0(false): EditText does not exist. +' Example: XEditTextExists "File" +' +SUB XEditTextExists(stEditText$) + + IF BEditTextExists(stEditText$) = 0 THEN + XLogFailure "Edit Text control " + stEditText$ + " does not exist" + END IF + +END SUB + +' +' XEditTextNotExists(stEditTextNot$) +' +' Description: This procedure checks to see that the specified EditText +' doesn't exist +' Parameters: stEditTextNot$ = EditText to be checked. +' Example: XEditTextNotExists "File" +' +SUB XEditTextNotExists(stEditTextNot$) + + IF BEditTextExists(stEditTextNot$) THEN + XLogFailure "Edit Text control " + stEditTextNot$ + " exists" + END IF + +END SUB + +' +' BEditTextExists(stEditText$) +' +' Description: This procedure checks to see IF the specified EditText +' exists or not. +' Parameters: stEditText$ = EditText to be checked. +' Returns: -1(true): EditText exists. +' 0(false): EditText does not exist. +' Example: fExists% = BEditTextExists("File") +' +FUNCTION BEditTextExists%(stEditText$) + + BEditTextExists = WEditExists(stEditText$) <> 0 + +END FUNCTION + +' +' StGetEditText (stEditCaption$) +' +' Description: +' Returns string in Edit box with caption stEditCaption$ +' Logs error IF stEditCaption$ is not found, or IF Edit control +' is not found following stEditCaption$ in the tabbing order. +' +' Parameters: stEditCaption$ - Caption that is associated with edit control +' +' Returns: String that is in the Edit control +' +' Example: a$ = StGetEditText("&FileName:") +' +' +FUNCTION SGetEditText$(stEditCaption$) + XEditTextExists stEditCaption$ + SGetEditText = EditText(stEditCaption$) + +END FUNCTION + + + + + +' +' XSetEditText (stEditCaption$, stEditText$) +' +' Description: +' Puts string stEditText$ in Edit box with caption stEditCaption$ +' Logs error IF stEditCaption$ is not found, or IF Edit control +' is not found following stEditCaption$ in the tabbing order. +' +' Parameters: stEditCaption$ - Caption that is associated with edit control +' stEditText$ - Text to put in the Edit control +' +' Returns: nothing +' +' Example: XSetEditText "&FileName:", "calc.exe" +' +' + +SUB XSetEditText (stEditCaption$, stEditText$) + + XEditTextExists stEditCaption$ + WEditSetText stEditCaption$, stEditText$ + +END SUB + + + + + +' ********************************************************** +' ************* Dialog: Radio Button Subroutines *********** +' ********************************************************** + + + +' +' BRadiobuttonExists(stRadiobutton$) +' +' Description: This procedure checks to see IF the specified Radiobutton +' exists or not. +' Parameters: stRadiobutton$ = Radiobutton to be checked. +' Returns: -1(true): Radiobutton exists. +' 0(false): Radiobutton does not exist. +' Example: fExists% = BRadiobuttonExists("Blue") +' +FUNCTION BRadiobuttonExists%(stRadiobutton$) + + BRadiobuttonExists = WOptionExists(stRadiobutton$) <> 0 + +END FUNCTION + + +' +' XRadiobuttonExists (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton does not exist in active window. +' +' Parameters: stRadiobutton$ - Radiobutton to be found. +' +' Returns: nothing +' +' Example: XRadiobuttonExists "Blue" +' +SUB XRadiobuttonExists(stRadiobutton$) + IF BRadiobuttonExists(stRadiobutton$) = 0 THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " does not Exist" + END IF +END SUB + + +' +' XRadiobuttonNotExists (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton Exists in active window. +' +' Parameters: stRadiobutton$ - Radiobutton to not be found. +' +' Returns: nothing +' +' Example: XRadiobuttonNotExists "Blue" +' +SUB XRadiobuttonNotExists(stRadiobutton$) + IF BRadiobuttonExists(stRadiobutton$) THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " Exists" + END IF +END SUB + + +' +' BRadiobuttonEnabled(stRadiobutton$) +' +' Description: This procedure checks to see IF the specified Radiobutton +' is enabled or not. +' Parameters: stRadiobutton$ = Radiobutton to be checked. +' Returns: -1(true): Radiobutton enabled. +' 0(false): Radiobutton not enabled. +' Example: fEnabled% = BRadiobuttonEnabled("Blue") +' +FUNCTION BRadiobuttonEnabled%(stRadiobutton$) + BRadiobuttonEnabled = WOptionEnabled(stRadiobutton$) <> 0 +END FUNCTION + + +' +' XRadiobuttonEnabled (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton is not Enabled. +' +' Parameters: stRadiobutton$ - Radiobutton to be checked. +' +' Returns: nothing +' +' Example: XRadiobuttonEnabled "Blue" +' +SUB XRadiobuttonEnabled(stRadiobutton$) + XRadiobuttonExists stRadiobutton$ + IF BRadiobuttonEnabled(stRadiobutton$) = 0 THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " is not Enabled" + END IF +END SUB + + +' +' XRadiobuttonNotEnabled (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton is Enabled. +' +' Parameters: stRadiobutton$ - Radiobutton to be checked. +' +' Returns: nothing +' +' Example: XRadiobuttonNotEnabled "Blue" +' +' +SUB XRadiobuttonNotEnabled(stRadiobutton$) + XRadiobuttonExists stRadiobutton$ + IF BRadiobuttonEnabled(stRadiobutton$) THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " Enabled" + END IF +END SUB + +' +' BRadiobuttonChecked(stRadiobutton$) +' +' Description: This procedure checks to see IF the specified Radiobutton +' is Checked or not. +' Parameters: stRadiobutton$ = Radiobutton to be checked. +' Returns: -1(true): Radiobutton Checked. +' 0(false): Radiobutton not Checked. +' Example: fChecked% = BRadiobuttonChecked("Blue") +' +FUNCTION BRadiobuttonChecked%(stRadiobutton$) + + BRadiobuttonChecked = WOptionState(stRadiobutton$) <> 0 + +END FUNCTION + + +' +' XRadiobuttonChecked (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton is not Checked. +' +' Parameters: stRadiobutton$ - Radiobutton to be checked. +' +' Returns: nothing +' +' Example: XRadiobuttonChecked "Blue" +' +SUB XRadiobuttonChecked(stRadiobutton$) + XRadiobuttonExists stRadiobutton$ + IF BRadiobuttonChecked(stRadiobutton$) = 0 THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " is not Checked" + END IF +END SUB + + +' +' XRadiobuttonNotChecked (stRadiobutton$) +' +' Description: +' Reports error IF Radiobutton is Checked. +' +' Parameters: stRadiobutton$ - Radiobutton to be checked. +' +' Returns: nothing +' +' Example: XRadiobuttonNotChecked "Blue" +' +' +SUB XRadiobuttonNotChecked(stRadiobutton$) + XRadiobuttonExists stRadiobutton$ + IF BRadiobuttonChecked(stRadiobutton$) THEN + XLogFailure "Radiobutton " + stRadiobutton$ + " Checked" + END IF +END SUB + + +' +' XClickRadiobutton(stRadiobutton$) +' +' Description: This procedure clicks the specified Radiobutton in the +' currently active window. +' Parameters: stRadiobutton$ = Radiobutton to be clicked. +' Returns: Nothing. +' Example: XClickRadiobutton "Blue" +' +SUB XClickRadiobutton(stRadiobutton$) + XRadioButtonExists stRadiobutton$ + WOptionClick stRadiobutton$ + +END SUB + diff --git a/private/oleauto/tools/win16/os2/inc/ftestutl.mst b/private/oleauto/tools/win16/os2/inc/ftestutl.mst new file mode 100644 index 000000000..211143b45 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ftestutl.mst @@ -0,0 +1,954 @@ +'FTESTUtl.inc - definitions for Fast Test Utility routines +' +' Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +' +'Purpose: +' This file defines the utility functions of the Fast Test functionality +' + + +'********************************************************** +'***************** File Subroutines *********************** +'********************************************************** + + +' +' XFileExist(stFileSpec$) +' +' Description: +' Will check IF stFileSpec$ exists. +' logs a failure IF it can't find it (them) +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XFileExist SGetWinDir() + "\*.bak" +' 'checks for any .bak files in windows directory +' +' +SUB XFileExist(stFileSpec$) + IF NOT EXISTS(stFileSpec$) THEN + XLogFailure stFileSpec$ + " doesn't exist" + END IF +END SUB + +' +' XFileNotExist(stFileSpec$) +' +' Description: +' Will check IF stFileSpec$ exists. +' logs a failure IF it can't find it (them) +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XFileNotExist SGetWinDir() + "\*.bak" +' 'checks for any .bak files in windows directory +' +' +SUB XFileNotExist(stFileSpec$) + IF EXISTS(stFileSpec$) THEN + XLogFailure stFileSpec$ + " exists" + END IF +END SUB + +' +' BFileExist(stFileSpec$) +' +' Description: +' Will check IF stFileSpec$ exists. +' logs a failure IF it can't find it (them) +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' +' +FUNCTION BFileExist%(stFileSpec$) + BFileExist = EXISTS(stFileSpec$) +END FUNCTION + + +' +' XFileCmp(stFileSpec1$,stFileSpec2$) +' +' Description: +' Compares two files, line by line +' +' Parameters: stFileSpec1$,stFileSpec2 - file specifications +' +' Returns: nothing +' +' Example: XFileCmp "Foo.dat","foo.bsl" +' +' +' +SUB XFileCmp(stFileSpec1$,stFileSpec2$) + DIM fh1% + DIM fh2% + DIM line1$ + DIM line2$ + DIM done + DIM diff + + gfErrorType = ET_NEXT + fh1% = FREEFILE + OPEN stFileSpec1$ FOR INPUT AS #fh1% + fh2% = FREEFILE + OPEN stFileSpec2$ FOR INPUT AS #fh2% + + IF gfError THEN + XLogFailure "Could not open files for XFileCmp" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + + done = FALSE + diff = FALSE + + IF EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + + WHILE NOT done + + INPUT #fh1%,line1$ + INPUT #fh2%,line2$ + + IF gfError THEN + XLogFailure "XFileCmp INPUT or EOF errors" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + + IF line1$ <> line2$ THEN + done = TRUE + diff = TRUE + END IF + + IF NOT done AND EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + WEND + + CLOSE #fh1% + CLOSE #fh2% + + IF gfError THEN + XLogFailure "XFileCmp CLOSE errors" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + gfErrorType = ET_NOTHING + + IF diff THEN + XLogFailure "Files " + stFileSpec1$ + "," + stFileSpec2$ + " don't compare" + END IF + +END SUB + +' +' XFileNotCmp(stFileSpec1$,stFileSpec2$) +' +' Description: +' Compares two files, line by line +' +' Parameters: stFileSpec1$,stFileSpec2 - file specifications +' +' Returns: nothing +' +' Example: XFileNotCmp "Foo.dat","foo.bsl" +' +' +' +SUB XFileNotCmp(stFileSpec1$,stFileSpec2$) + DIM fh1% + DIM fh2% + DIM line1$ + DIM line2$ + DIM done + DIM diff + + gfErrorType = ET_NEXT + + fh1% = FREEFILE + OPEN stFileSpec1$ FOR INPUT AS #fh1% + fh2% = FREEFILE + OPEN stFileSpec2$ FOR INPUT AS #fh2% + + IF gfError THEN + XLogFailure "Could not open files for XFileNotCmp" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + done = FALSE + diff = FALSE + + IF EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + WHILE NOT done + + INPUT #fh1%,line1$ + INPUT #fh2%,line2$ + + IF gfError THEN + XLogFailure "XFileNotCmp INPUT or EOF errors" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + IF line1$ <> line2$ THEN + done = TRUE + diff = TRUE + END IF + + IF NOT done AND EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + WEND + + CLOSE #fh1% + CLOSE #fh2% + + IF gfError THEN + XLogFailure "XFileNotCmp CLOSE errors" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + gfErrorType = ET_NOTHING + + IF NOT diff THEN + XLogFailure "Files " + stFileSpec1$ + "," + stFileSpec2$ + " do compare" + END IF +END SUB + +' +' BFileCmp%(stFileSpec1$,stFileSpec2$) +' +' Description: +' Compares two files, line by line +' +' Parameters: stFileSpec1$,stFileSpec2 - file specifications +' +' Returns: FALSE IF XFileCmp would detect an error +' +' Example: x% = BFileCmp "Foo.dat","foo.bsl" +' +' +' +FUNCTION BFileCmp%(stFileSpec1$,stFileSpec2$) + DIM fh1% + DIM fh2% + DIM line1$ + DIM line2$ + DIM done + DIM diff + + gfErrorType = ET_NEXT + fh1% = FREEFILE + OPEN stFileSpec1$ FOR INPUT AS #fh1% + fh2% = FREEFILE + OPEN stFileSpec2$ FOR INPUT AS #fh2% + + IF gfError THEN + BFileCmp = FALSE + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT FUNCTION + END IF + + done = FALSE + diff = FALSE + + IF EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + WHILE NOT done + + INPUT #fh1%,line1$ + INPUT #fh2%,line2$ + + IF gfError THEN + BFileCmp = FALSE + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT FUNCTION + END IF + + IF line1$ <> line2$ THEN + done = TRUE + diff = TRUE + END IF + + IF NOT done AND EOF(fh1%) AND EOF(fh2%) THEN + done = TRUE + END IF + + IF NOT done AND (EOF(fh1%) OR EOF(fh2%)) THEN + diff = TRUE + done = TRUE + END IF + + WEND + + CLOSE #fh1% + CLOSE #fh2% + + IF gfError THEN + BFileCmp = FALSE + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT FUNCTION + END IF + + BFileCmp = NOT diff ' IF different a log failure would normally happen + +END FUNCTION + + +' +' XDeleteFile(stFileSpec$) +' +' Description: +' Will delete stFileSpec$ IF it, they, exists. +' logs a failure IF it can't delete them or IF the file(s) +' doesn't exist +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XDeleteFile SGetWinDir() + "\*.bak" +' 'deletes all .bak files in windows directory +' +' +SUB XDeleteFile(stFileSpec$) + IF EXISTS(stFileSpec$) THEN + gfErrorType = ET_NEXT + KILL stFileSpec$ + IF gfError THEN + XLogFailure "XDeleteFile " + stFileSpec$ + " could NOT be deleted" + gfError = FALSE + END IF + gfErrorType = ET_NOTHING + ELSE + XLogFailure "XDeleteFile " + stFileSpec$ + " NOT deleted (doesn't exist)." + END IF +END SUB + +' +' XDeleteFileIfExist(stFileSpec$) +' +' Description: +' Will delete stFileSpec$ IF it, they, exists. +' logs a failure IF it can't delete them but doesn't IF the file(s) +' doesn't exist +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XDeleteFileIfExist SGetWinDir() + "\*.bak" +' 'deletes all .bak files in windows directory +' +' +SUB XDeleteFileIfExist(stFileSpec$) + IF EXISTS(stFileSpec$) THEN + gfErrorType = ET_NEXT + KILL stFileSpec$ + IF gfError THEN + XLogFailure "XDeleteFileIfExists " + stFileSpec$ + " could NOT be deleted" + gfError = FALSE + END IF + gfErrorType = ET_NOTHING + END IF +END SUB + +' +' XCreateFile(stFileSpec$,s$) +' +' Description: +' Will Create stFileSpec$ and put string in it +' logs a failure IF it can't Create it +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XCreateFile "foo.dat","Hello world" +' +' +' + +SUB XCreateFile(stFileSpec$,s$) + DIM fh% + gfErrorType = ET_NEXT + fh% = FREEFILE + + OPEN stFileSpec$ FOR OUTPUT AS #fh% + + PRINT #fh%,s$ + + CLOSE #fh% + + IF gfError THEN + XLogFailure "XCreateFile encountered runtime errors" + gfError = FALSE + END IF + gfErrorType = ET_NOTHING + +END SUB + +' +' XAppendFile(stFileSpec$,s$) +' +' Description: +' Will Append stFileSpec$ and put string in it +' logs a failure IF it can't Append it +' +' Parameters: stFileSpec$ - file specification +' +' Returns: nothing +' +' Example: XAppendFile "foo.dat","Hello world" +' +' +' + +SUB XAppendFile(stFileSpec$,s$) + DIM fh% + + gfErrorType = ET_NEXT + + fh% = FREEFILE + + OPEN stFileSpec$ FOR APPEND AS #fh% + + PRINT #fh%,s$ + + CLOSE #fh% + + IF gfError THEN + XLogFailure "XCreateFile encountered runtime errors" + gfError = FALSE + END IF + gfErrorType = ET_NOTHING + +END SUB + + + +' XWaitMessageFile(string,string,integer) +' Wait for a file to exist, check IF string argument is in file anywhere +' log failures + +SUB XWaitMessageFile(s$,Message$, WaitTime%) + + DIM fDone% + DIM fFound% + DIM ret% + DIM line$ + DIM inret% + DIM fh% + + fh% = FREEFILE + + fDone = FALSE + fFound = FALSE + + WHILE NOT fDone + + IF EXISTS(s$) THEN + fDone = TRUE + fFound = TRUE + ELSE + SLEEP 1 + + WaitTime% = WaitTime% - 1 + IF WaitTime% <= 0 THEN + fDone = TRUE + END IF + END IF + WEND + + IF NOT fFound% THEN + XLogFailure "FAIL """ + s$ + """ Message File not found" + ELSE + + fDone = FALSE + fFOUND = FALSE + + gfErrorType = ET_NEXT + + OPEN s$ FOR INPUT AS # fh% + + IF EOF(fh%) THEN + fDone% = TRUE + END IF + + IF gfError THEN + XLogFailure "XWaitMessageFile encountered runtime error during OPEN" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + WHILE NOT fDone% + + INPUT # fh%, line$ + + IF gfError THEN + XLogFailure "XWaitMessageFile encountered runtime error during INPUT" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + + inret% = INSTR(line$,Message$) + + IF inret% <> 0 THEN + fFound% = TRUE + fDone = TRUE + END IF + + IF EOF(fh%) THEN + fDone% = TRUE + END IF + WEND + + CLOSE # fh% + + IF gfError THEN + XLogFailure "XWaitMessageFile encountered runtime error during CLOSE" + gfErrorType = ET_NOTHING + gfError = FALSE + EXIT SUB + END IF + gfErrorType = ET_NOTHING + + IF NOT fFound% THEN + XLogFailure "FAIL, found """ + s$ + """ Message File, """ + Message$ + """ not in it" + END IF + END IF +END SUB + +'********************************************************** +'***************** Directory Subroutines ****************** +'********************************************************** + +' XCWDCmp(s$) +' Cmp the current working directory to given string +' and log a failure IF they don't match + +SUB XCWDCmp(s$) + + IF BCWDCmp(s$) THEN + XLogFailure "Current working directory (" + UCASE$(CURDIR$) + ") doesn't match " + UCASE$(s$) + END IF +END SUB + +' XCWDNotCmp(s$) +' Cmp the current working directory to given string +' and log a failure IF they match + +SUB XCWDNotCmp(s$) + + IF UCASE$(CURDIR$) = UCASE$(s$) THEN + XLogFailure "Current working directory (" + UCASE$(CURDIR$) + ") matches " + UCASE$(s$) + END IF +END SUB + +' BCWDCmp(s$) +' Cmp the current working directory to given string +' and return result (FALSE if normally a failure would be logged) + +FUNCTION BCWDCmp%(s$) + + BCWDCmp = UCASE$(CURDIR$) = UCASE$(s$) + +END FUNCTION + +' XDriveCmp(s$) +' Cmp the current working Drive to given string +' and log a failure IF they don't match + +SUB XDriveCmp(s$) + + IF BDriveCmp%(s$) THEN + XLogFailure "Current working Drive (" + MID$(UCASE$(CURDIR$),1,2) + ") doesn't match " + UCASE$(s$) + END IF +END SUB + +' XDriveNotCmp(s$) +' Cmp the current working Drive to given string +' and log a failure IF they match + +SUB XDriveNotCmp(s$) + + IF MID$(UCASE$(CURDIR$),1,2) = UCASE$(s$) THEN + XLogFailure "Current working Drive (" + MID$(UCASE$(CURDIR$),1,2) + ") matches " + s$ + END IF +END SUB + +' BDriveCmp(s$) +' Cmp the current working Drive to given string +' and return result + +FUNCTION BDriveCmp%(s$) + + BDriveCmp = MID$(UCASE$(CURDIR$),1,2) = UCASE$(s$) + +END FUNCTION + +' XChangeCWD(s$) +' change to given working directory, log failure IF doesn't succeed +' +SUB XChangeCWD(s$) + gfErrorType = EC_NEXT + CHDIR s$ + IF gfError THEN + XLogFailure "XChangeCWD could not change directory" + gfError = FALSE + END IF + gfErrorType = EC_NOTHING +END SUB + +' XChangeDrive(s$) +' change to given working drive, log failure IF doesn't succeed +' +SUB XChangeDrive(s$) + gfErrorType = EC_NEXT + CHDRIVE s$ + IF gfError THEN + XLogFailure "XChangeDrive could not change drive" + gfError = FALSE + END IF + gfErrorType = EC_NOTHING +END SUB + +'********************************************************** +'***************** Program Subroutines ******************** +'********************************************************** + + + +' +' HStartApp%(stAppName$) +' +' Description: Starts app AppName and returns the handle to the App +' +' Parameters: stAppName$ - name of app to WinExec and get handle to +' +' Returns: handle to application started +' +' Example: hWinHelp% = HStartApp("winhelp.exe") +' +' +FUNCTION HStartApp%(stAppName$) + DIM Bogus% + DIM lpszTemp$ + Bogus% = WinExec (stAppName$, SW_SHOWNORMAL) + lpszTemp$ = "WinExec error with " + stAppName$ + " :" + + ' WinExec defines SOME of the values between 0 and 32 + ' as errors... any return value greater than 32 + ' should be considered a success! + SELECT CASE Bogus% + CASE 0 + XLogFailure lpszTemp$ + "Out of memory - exiting" + + CASE 2 + XLogFailure lpszTemp$ + "File not found" + End + CASE 3 + XLogFailure lpszTemp$ + "Path not found" + + CASE 5 + XLogFailure lpszTemp$ + "Attempt to dynamically link to a task" + + CASE 6 + XLogFailure lpszTemp$ + "Library requires separate data segments" + + CASE 10 + XLogFailure lpszTemp$ + "Incorrect Windows version" + + CASE 11 + XLogFailure lpszTemp$ + "Invalid EXE file" + + CASE 12 + XLogFailure lpszTemp$ + "OS/2 application" + + CASE 13 + XLogFailure lpszTemp$ + "DOS 4.0 application" + + CASE 14 + XLogFailure lpszTemp$ + "Unknown EXE type" + + CASE 15 + XLogFailure lpszTemp$ + "Must run in real mode Windows" + + CASE 16 + XLogFailure lpszTemp$ + "Cannot run more than one instance" + + CASE 17 + XLogFailure lpszTemp$ + "Large-frame EMS allows only one instance" + + CASE 18 + XLogFailure lpszTemp$ + "Must run in standard or enhanced mode Windows" + + CASE 0 TO 32 + XLogFailure lpszTemp$ + "Unknown Error in WinExec" + + END SELECT + + HStartApp = GetActiveWindow () +END FUNCTION + +' +' XStartApp(stAppName$) +' +' Description: Starts app AppName and sets handle to ghAppHwnd. +' IF we get a null handle, THEN we end the script here. +' +' Parameters: stAppName$ - name of app to WinExec +' +' Returns: nothing +' +' Example: XStartApp "winhelp.exe" +' +' +SUB XStartApp(stAppName$, stClassname$) + 'ghAppHwnd is a global + ghAppHwnd = HStartApp(stAppName$) + IF (ghAppHwnd = 0) THEN + 'we didn't get a handle + XLogFailure "Unable to start app " + stAppName$ + END IF + IF stClassname$ <> "" THEN + gsAppClassname = stClassname$ ' remember it for later + IF FindWindow(stClassname$,NULL) = 0 THEN + ' The app isn't around + XLog "The app " + stAppName$ + " started but didn't stay OR..." + XLogFailure "the given class name (" + stClassname$ + ") is incorrect" + END IF + END IF +END SUB + +' XSetCleanup sCleanup$ +' Description: gets the users cleanup string to be sent to +' an application to get it to quit IF a failure in a test suite +' occurs. The string is a DoKeys formatted string +SUB XSetCleanup (sCleanup$) + gsCleanup$ = sCleanup$ +END SUB + +' This routine is executed when the script finishes with an END +' statement. Its purpose is to find the application started with +' XStartapp using the classname supplied there. IF it exists, +' and the gsCleanup string is nonempty, the gsCleanup string will +' be played. This may still not get rid of the app for various +' reasons: maybe it is prompting to save a file, or it won't exit +' a dialog... + +SUB XDoCleanup + IF gsCleanup$ <> "" AND gsAppClassname$ <> "" THEN + DoKeys gsCleanup$ + END IF + IF FindWindow(gsAppClassname$,NULL) <> 0 THEN + XLog "The app with class name " + gsAppClassname$ + " was not" + XLogFailure "halted by the cleanup string " + gsCleanup$ + END IF + +END SUB + +'$ifdef DOFINDAPP +' +' HFindApplication (Caption$) +' +' Description: Returns the handle to window with caption Caption$ +' +' Parameters: Caption$ - a string representing a substring of +' caption to find +' +' Returns: Handle to window IF window with caption Caption$ exists +' IF no such caption is found THEN 0 (zero) is returned +' +' Example: HFindApplication ("Excel") +' +' +' +' +FUNCTION HFindApplication%(stCaption$) + DIM stTitle$ + DIM x% + + stTitle$ = String$(100,32) + + hwnd1% = GetDesktopWindow () + hwnd1% = GetWindow (hwnd1%, GWCHILD) + + WHILE(hwnd1%) + x% = GetWindowText (hwnd1%, stTitle$, len(stTitle$)-1) + IF InStr(1, stTitle$, stCaption$) THEN + 'window was found + HFindApplication = hwnd1% + Exit Function + END IF + hwnd1% = GetWindow (hwnd1%, GWHWNDNEXT) + WEND + + 'no such window was found, so return 0 + HFindApplication = 0 + +END FUNCTION +'$endif + + + +'********************************************************** +'***************** Mouse Subroutines ********************** +'********************************************************** + +' The mouse routines use the VK_LBUTTON, VK_RBUTTON, VK_MBUTTON +' constants to determine which button to use + + +SUB XMoveMouse (x%, y%) + + QueMouseMove x%,y% + QueFlush FALSE +END SUB + + +' XClick(integer,integer,integer) +'NOTE: the x and y optional WIT version can't be done with mouseevent call +' Click the given mouse button at the current location +' the three predefined CONST values for button are LEFT%,MIDDLE% and RIGHT% + +SUB XClick(button%, x%, y%) + + QueMouseDn button%,x%,y% + QueMouseUp button%,x%,y% + QueFlush FALSE + +END SUB + +' XDblClick(integer,integer,integer) +'NOTE: the x and y optional WIT version can't be done with mouseevent call +' Double Click the given mouse button at the current location +' the three predefined CONST values for button are LEFT%,MIDDLE% and RIGHT% + +SUB XDblClick (button%, x%, y%) + + QueMouseDblClk button%,x%,y% + QueFlush FALSE + +END SUB + +' XDragMouse(integer,integer,integer) +'NOTE: the x and y optional WIT version can't be done with mouseevent call +' Drag the given mouse button from the current location to x,y coordinates +' the three predefined CONST values for button are LEFT%,MIDDLE% and RIGHT% + +SUB XDragMouse (button%, x%, y%) + + QueMouseDn button%,x%,y% + QueMouseMove x%,y% + QueMouseUp button%,x%,y% + QueFlush FALSE +END SUB + + + + +'********************************************************** +'***************** ClipBoard Subroutines ****************** +'********************************************************** + + + +' XClipBoardCmp(string) +' compare information in clipboard against passed argument +' log results to logfile and return TRUE IF compared, FALSE IF not +SUB XClipBoardCmp (s$) + + DIM cs$ + + cs$ = ClipBoard$ + + IF s$ <> cs$ THEN + XLogFailure "String does not match clipboard" + END IF +END SUB + + +'********************************************************** +'***************** Misc Subroutines *********************** +'********************************************************** + + +' +' STStripNull(target$) +' +' Description: This routine removes the Null character from a null terminated string +' Parameters: target$ = string to remove Null from. +' Returns: a string without Null character. +' Example: Print SStripNull$("aaa"+chr$(0)) 'output is 'aaa' without chr$(0). +' +FUNCTION SStripNull$(target$) + DIM pos% + + pos% = InStr(1, target$, Chr$(0)) 'find the null terminator + IF pos% > 1 THEN + target$ = Mid$(target$, 1, pos% - 1) 'save only chars up to null + SStripNull = target$ 'return target$ + ELSE + SStripNull = "" + END IF +END FUNCTION + diff --git a/private/oleauto/tools/win16/os2/inc/graph.h b/private/oleauto/tools/win16/os2/inc/graph.h new file mode 100644 index 000000000..f9c374d11 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/graph.h @@ -0,0 +1,471 @@ +/*** +*graph.h - declare constants, functions, and macros for graphics library +* +* Copyright (c) 1987 - 1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the graphics library functions and the +* structures and manifest constants that are used with them. +* +***************************************************************************/ + + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#endif + +/* force word packing to avoid possible -Zp override */ +#pragma pack(2) + + +/* user-visible declarations for Quick-C Graphics Library */ + +#ifndef _VIDEOCONFIG_DEFINED +/* structure for _getvideoconfig() as visible to user */ +struct _videoconfig { + short numxpixels; /* number of pixels on X axis */ + short numypixels; /* number of pixels on Y axis */ + short numtextcols; /* number of text columns available */ + short numtextrows; /* number of text rows available */ + short numcolors; /* number of actual colors */ + short bitsperpixel; /* number of bits per pixel */ + short numvideopages; /* number of available video pages */ + short mode; /* current video mode */ + short adapter; /* active display adapter */ + short monitor; /* active display monitor */ + short memory; /* adapter video memory in K bytes */ +}; +#define _VIDEOCONFIG_DEFINED +#endif + +#ifndef _XYCOORD_DEFINED +/* return value of _setvieworg(), etc. */ +struct _xycoord { + short xcoord; + short ycoord; +}; +#define _XYCOORD_DEFINED +#endif + +/* structure for text position */ +#ifndef _RCCOORD_DEFINED +struct _rccoord { + short row; + short col; +}; +#define _RCCOORD_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define videoconfig _videoconfig +#define xycoord _xycoord +#define rccoord _rccoord +#endif + + +/* ERROR HANDLING */ +short __far __cdecl _grstatus(void); + +/* Error Status Information returned by _grstatus() */ + +/* successful */ +#define _GROK 0 + +/* errors */ +#define _GRERROR (-1) +#define _GRMODENOTSUPPORTED (-2) +#define _GRNOTINPROPERMODE (-3) +#define _GRINVALIDPARAMETER (-4) +#define _GRFONTFILENOTFOUND (-5) +#define _GRINVALIDFONTFILE (-6) +#define _GRCORRUPTEDFONTFILE (-7) +#define _GRINSUFFICIENTMEMORY (-8) +#define _GRINVALIDIMAGEBUFFER (-9) + +/* warnings */ +#define _GRNOOUTPUT 1 +#define _GRCLIPPED 2 +#define _GRPARAMETERALTERED 3 + + +/* SETUP AND CONFIGURATION */ + +short __far __cdecl _setvideomode(short); +short __far __cdecl _setvideomoderows(short,short); /* return rows; 0 if error */ + +/* arguments to _setvideomode() */ +#define _MAXRESMODE (-3) /* graphics mode with highest resolution */ +#define _MAXCOLORMODE (-2) /* graphics mode with most colors */ +#define _DEFAULTMODE (-1) /* restore screen to original mode */ +#define _TEXTBW40 0 /* 40-column text, 16 grey */ +#define _TEXTC40 1 /* 40-column text, 16/8 color */ +#define _TEXTBW80 2 /* 80-column text, 16 grey */ +#define _TEXTC80 3 /* 80-column text, 16/8 color */ +#define _MRES4COLOR 4 /* 320 x 200, 4 color */ +#define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */ +#define _HRESBW 6 /* 640 x 200, BW */ +#define _TEXTMONO 7 /* 80-column text, BW */ +#define _HERCMONO 8 /* 720 x 348, BW for HGC */ +#define _MRES16COLOR 13 /* 320 x 200, 16 color */ +#define _HRES16COLOR 14 /* 640 x 200, 16 color */ +#define _ERESNOCOLOR 15 /* 640 x 350, BW */ +#define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */ +#define _VRES2COLOR 17 /* 640 x 480, BW */ +#define _VRES16COLOR 18 /* 640 x 480, 16 color */ +#define _MRES256COLOR 19 /* 320 x 200, 256 color */ +#define _ORESCOLOR 64 /* 640 x 400, 1 of 16 colors (Olivetti only) */ + +/* the following 8 modes require VESA SuperVGA BIOS extensions */ +#define _ORES256COLOR 0x0100 /* 640 x 400, 256 color */ +#define _VRES256COLOR 0x0101 /* 640 x 480, 256 color */ + +/* WARNING: DO NOT attempt to set the following modes without ensuring that + your monitor can safely handle that resolution. Otherwise, you may risk + damaging your display monitor! Consult your owner's manual for details. + Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES modes */ + +/* requires NEC MultiSync 3D or equivalent, or better */ +#define _SRES16COLOR 0x0102 /* 800 x 600, 16 color */ +#define _SRES256COLOR 0x0103 /* 800 x 600, 256 color */ + +/* requires NEC MultiSync 4D or equivalent, or better */ +#define _XRES16COLOR 0x0104 /* 1024 x 768, 16 color */ +#define _XRES256COLOR 0x0105 /* 1024 x 768, 256 color */ + +/* requires NEC MultiSync 5D or equivalent, or better */ +#define _ZRES16COLOR 0x0106 /* 1280 x 1024, 16 color */ +#define _ZRES256COLOR 0x0107 /* 1280 x 1024, 256 color */ + + +short __far __cdecl _setactivepage(short); +short __far __cdecl _setvisualpage(short); +short __far __cdecl _getactivepage(void); +short __far __cdecl _getvisualpage(void); + +/* _videoconfig adapter values */ +/* these manifest constants can be used to determine the type of the active */ +/* adapter, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */ +#define _CGA 0x0002 /* Color Graphics Adapter (CGA) */ +#define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */ +#define _VGA 0x0008 /* Video Graphics Array (VGA) */ +#define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */ +#define _HGC 0x0020 /* Hercules Graphics Card (HGC) */ +#define _OCGA 0x0042 /* Olivetti Color Graphics Adapter (OCGA) */ +#define _OEGA 0x0044 /* Olivetti Enhanced Graphics Adapter (OEGA) */ +#define _OVGA 0x0048 /* Olivetti Video Graphics Array (OVGA) */ +#define _SVGA 0x0088 /* Super VGA with VESA BIOS support (SVGA) */ + +/* _videoconfig monitor values */ +/* these manifest constants can be used to determine the type of monitor in */ +/* use, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MONO 0x0001 /* Monochrome */ +#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */ +#define _ENHCOLOR 0x0004 /* Enhanced Color */ +#define _ANALOGMONO 0x0008 /* Analog Monochrome only */ +#define _ANALOGCOLOR 0x0010 /* Analog Color only */ +#define _ANALOG 0x0018 /* Analog Monochrome and Color modes */ + +struct _videoconfig __far * __far __cdecl _getvideoconfig(struct _videoconfig __far *); + + +/* COORDINATE SYSTEMS */ + +struct _xycoord __far __cdecl _setvieworg(short, short); +#define _setlogorg _setvieworg /* obsolescent */ + +struct _xycoord __far __cdecl _getviewcoord(short, short); +#define _getlogcoord _getviewcoord /* obsolescent */ + +struct _xycoord __far __cdecl _getphyscoord(short, short); + +void __far __cdecl _setcliprgn(short, short, short, short); +void __far __cdecl _setviewport(short, short, short, short); + + +/* OUTPUT ROUTINES */ + +/* control parameters for _ellipse, _rectangle, _pie and _polygon */ +#define _GBORDER 2 /* draw outline only */ +#define _GFILLINTERIOR 3 /* fill using current fill mask */ + +/* parameters for _clearscreen */ +#define _GCLEARSCREEN 0 +#define _GVIEWPORT 1 +#define _GWINDOW 2 + +void __far __cdecl _clearscreen(short); + +struct _xycoord __far __cdecl _moveto(short, short); +struct _xycoord __far __cdecl _getcurrentposition(void); + +short __far __cdecl _lineto(short, short); +short __far __cdecl _rectangle(short, short, short, short, short); +short __far __cdecl _polygon(short, const struct _xycoord __far *, short); +short __far __cdecl _arc(short, short, short, short, short, short, short, short); +short __far __cdecl _ellipse(short, short, short, short, short); +short __far __cdecl _pie(short, short, short, short, short, short, short, short, short); + +short __far __cdecl _getarcinfo(struct _xycoord __far *, struct _xycoord __far *, struct _xycoord __far *); + +short __far __cdecl _setpixel(short, short); +short __far __cdecl _getpixel(short, short); +short __far __cdecl _floodfill(short, short, short); + + +/* PEN COLOR, LINE STYLE, WRITE MODE, FILL PATTERN */ + +short __far __cdecl _setcolor(short); +short __far __cdecl _getcolor(void); + +void __far __cdecl _setlinestyle(unsigned short); +unsigned short __far __cdecl _getlinestyle(void); + +short __far __cdecl _setwritemode(short); +short __far __cdecl _getwritemode(void); + +void __far __cdecl _setfillmask(const unsigned char __far *); +unsigned char __far * __far __cdecl _getfillmask(unsigned char __far *); + + +/* COLOR SELECTION */ + +long __far __cdecl _setbkcolor(long); +long __far __cdecl _getbkcolor(void); + +long __far __cdecl _remappalette(short, long); +short __far __cdecl _remapallpalette(const long __far *); +short __far __cdecl _selectpalette(short); + + +/* TEXT */ +/* parameters for _displaycursor */ +#define _GCURSOROFF 0 +#define _GCURSORON 1 + +/* parameters for _wrapon */ +#define _GWRAPOFF 0 +#define _GWRAPON 1 + + +/* direction parameters for _scrolltextwindow */ +#define _GSCROLLUP 1 +#define _GSCROLLDOWN (-1) + +/* request maximum number of rows in _settextrows and _setvideomoderows */ +#define _MAXTEXTROWS (-1) + +short __far __cdecl _settextrows(short); /* returns # rows set; 0 if error */ +void __far __cdecl _settextwindow(short, short, short, short); +void __far __cdecl _gettextwindow(short __far *, short __far *, short __far *, short __far *); +void __far __cdecl _scrolltextwindow(short); +void __far __cdecl _outmem(const char __far *, short); +void __far __cdecl _outtext(const char __far *); +short __far __cdecl _inchar(void); +short __far __cdecl _wrapon(short); + +short __far __cdecl _displaycursor(short); +short __far __cdecl _settextcursor(short); +short __far __cdecl _gettextcursor(void); + +struct _rccoord __far __cdecl _settextposition(short, short); +struct _rccoord __far __cdecl _gettextposition(void); + +short __far __cdecl _settextcolor(short); +short __far __cdecl _gettextcolor(void); + + +/* SCREEN IMAGES */ + +void __far __cdecl _getimage(short, short, short, short, char __huge *); +void __far __cdecl _putimage(short, short, char __huge *, short); +long __far __cdecl _imagesize(short, short, short, short); + +/* "action verbs" for _putimage() and _setwritemode() */ +#define _GPSET 3 +#define _GPRESET 2 +#define _GAND 1 +#define _GOR 0 +#define _GXOR 4 + + +/* Color values are used with _setbkcolor in graphics modes and also by + _remappalette and _remapallpalette. Also known as palette colors. + Not to be confused with color indices (aka. color attributes). */ + +/* universal color values (all color modes): */ +#define _BLACK 0x000000L +#define _BLUE 0x2a0000L +#define _GREEN 0x002a00L +#define _CYAN 0x2a2a00L +#define _RED 0x00002aL +#define _MAGENTA 0x2a002aL +#define _BROWN 0x00152aL +#define _WHITE 0x2a2a2aL +#define _GRAY 0x151515L +#define _LIGHTBLUE 0x3F1515L +#define _LIGHTGREEN 0x153f15L +#define _LIGHTCYAN 0x3f3f15L +#define _LIGHTRED 0x15153fL +#define _LIGHTMAGENTA 0x3f153fL +#define _YELLOW 0x153f3fL +#define _BRIGHTWHITE 0x3f3f3fL + +/* the following is obsolescent and defined only for backward compatibility */ +#define _LIGHTYELLOW _YELLOW + +/* mono mode F (_ERESNOCOLOR) color values: */ +#define _MODEFOFF 0L +#define _MODEFOFFTOON 1L +#define _MODEFOFFTOHI 2L +#define _MODEFONTOOFF 3L +#define _MODEFON 4L +#define _MODEFONTOHI 5L +#define _MODEFHITOOFF 6L +#define _MODEFHITOON 7L +#define _MODEFHI 8L + +/* mono mode 7 (_TEXTMONO) color values: */ +#define _MODE7OFF 0L +#define _MODE7ON 1L +#define _MODE7HI 2L + + +/* Warning: these '_xy' entrypoints are undocumented. + They may or may not be supported in future versions. */ +struct _xycoord __far __cdecl _moveto_xy(struct _xycoord); +short __far __cdecl _lineto_xy(struct _xycoord); +short __far __cdecl _rectangle_xy(short,struct _xycoord,struct _xycoord); +short __far __cdecl _arc_xy(struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _ellipse_xy(short, struct _xycoord, struct _xycoord); +short __far __cdecl _pie_xy(short, struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _getpixel_xy(struct _xycoord); +short __far __cdecl _setpixel_xy(struct _xycoord); +short __far __cdecl _floodfill_xy(struct _xycoord, short); +void __far __cdecl _getimage_xy(struct _xycoord,struct _xycoord, char __huge *); +long __far __cdecl _imagesize_xy(struct _xycoord,struct _xycoord); +void __far __cdecl _putimage_xy(struct _xycoord, char __huge *, short); + + +/* WINDOW COORDINATE SYSTEM */ + +#ifndef _WXYCOORD_DEFINED +/* structure for window coordinate pair */ +struct _wxycoord { + double wx; /* window x coordinate */ + double wy; /* window y coordinate */ + }; +#define _WXYCOORD_DEFINED +#endif + + +/* define real coordinate window - returns non-zero if successful */ +short __far __cdecl _setwindow(short,double,double,double,double); + +/* convert from view to window coordinates */ +struct _wxycoord __far __cdecl _getwindowcoord(short,short); +struct _wxycoord __far __cdecl _getwindowcoord_xy(struct _xycoord); + +/* convert from window to view coordinates */ +struct _xycoord __far __cdecl _getviewcoord_w(double,double); +struct _xycoord __far __cdecl _getviewcoord_wxy(const struct _wxycoord __far *); + +/* return the window coordinates of the current graphics output + position as an _wxycoord structure. no error return. */ +struct _wxycoord __far __cdecl _getcurrentposition_w(void); + + +/* window coordinate entry points for graphics output routines */ + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _arc_w(double, double, double, double, double, double, double, double); +short __far __cdecl _arc_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _ellipse_w(short, double, double, double, double); +short __far __cdecl _ellipse_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _floodfill_w(double, double, short); + +/* returns pixel value at given point; -1 if unsuccessful. */ +short __far __cdecl _getpixel_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _lineto_w(double, double); + +/* returns the view coordinates of the previous output + position as a _wxycoord structure. no error return */ +struct _wxycoord __far __cdecl _moveto_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _pie_w(short, double, double, double, double, double, double, double, double); +short __far __cdecl _pie_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _rectangle_w(short, double, double, double, double); +short __far __cdecl _rectangle_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _polygon_w(short, const double __far *, short); +short __far __cdecl _polygon_wxy(short, const struct _wxycoord __far *, short); + +/* returns previous color; -1 if unsuccessful */ +short __far __cdecl _setpixel_w(double, double); + + +/* window coordinate image routines */ + +/* no return value */ +void __far __cdecl _getimage_w(double, double, double, double, char __huge *); +void __far __cdecl _getimage_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, char __huge *); + +/* returns the image's storage size in bytes */ +long __far __cdecl _imagesize_w(double, double, double, double); +long __far __cdecl _imagesize_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* no return value */ +void __far __cdecl _putimage_w(double, double ,char __huge * ,short); + + +/* FONTS */ + +#ifndef _FONTINFO_DEFINED +/* structure for _getfontinfo() */ +struct _fontinfo { + int type; /* b0 set = vector,clear = bit map */ + int ascent; /* pix dist from top to baseline */ + int pixwidth; /* character width in pixels, 0=prop */ + int pixheight; /* character height in pixels */ + int avgwidth; /* average character width in pixels */ + char filename[81]; /* file name including path */ + char facename[32]; /* font name */ +}; +#define _FONTINFO_DEFINED +#endif + + +/* font function prototypes */ +short __far __cdecl _registerfonts( const char __far *); +void __far __cdecl _unregisterfonts( void ); +short __far __cdecl _setfont( const char __far * ); +short __far __cdecl _getfontinfo( struct _fontinfo __far * ); +void __far __cdecl _outgtext( const char __far * ); +short __far __cdecl _getgtextextent( const char __far * ); +struct _xycoord __far __cdecl _setgtextvector( short, short ); +struct _xycoord __far __cdecl _getgtextvector(void); + + +/* restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/ime.h b/private/oleauto/tools/win16/os2/inc/ime.h new file mode 100644 index 000000000..bb7bb334a --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ime.h @@ -0,0 +1,333 @@ +/*** +*ime.h - declarations for the Input Method Editor (IME) +* +* Copyright (C) 1993, Microsoft Corporation. All Rights Reserved. +* Information Contained Herein Is Proprietary and Confidential. +* +*Purpose: +* Defines the interface constants and types for communicating with the IME. +* +*Notes: +* Constants commented with 'FKorea' are only valid when FKorea is TRUE. +* Constants commented with 'FJapan' are only valid when FJapan is TRUE. +* Constants commented with 'FKorea || FJapan' are valid for both. +* +* Some constants are not really constants - they are switched at runtime +* based on the country. +* +*Revision History: +* +* [] ??-???-?? JinWoo/Mattsh Created from Korean Windows ime.h +* [01] ??-???-?? w-BarryB Added some constants for Japan +* [02] 17-Aug-93 w-BarryB Merge Japanese and Korean ime.h together +* [03] 28-Oct-93 MakotoM Added IMEPRO structure +* +*****************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +/* (FKorea) */ +#define CP_HWND 0 +#define CP_OPEN 1 +#define CP_DIRECT 2 +#define CP_LEVEL 3 + +/* (FKorea) */ +#define lpSource(lpks) (LPSTR)((LPSTR)lpks+lpks->dchSource) +#define lpDest(lpks) (LPSTR)((LPSTR)lpks+lpks->dchDest) + +/* virtual key */ +#define VK_FINAL 0x18 //FKorea:dummy VK to make final on mouse down +#define VK_CONVERT 0x1C //FKorea +#define VK_NONCONVERT 0x1D //FKorea +#define VK_ACCEPT 0x1E //FKorea +#define VK_MODECHANGE 0x1F //FKorea +#define VK_HANGEUL 0x15 //FKorea +#define VK_JUNJA 0x17 //FKorea +#define VK_HANJA 0x19 //FKorea +#define VK_KANA 0x15 //FJapan +#define VK_KANJI 0x19 //FJapan +#define VK_DBE_ALPHANUMERIC 0x0f0 //FJapan +#define VK_DBE_KATAKANA 0x0f1 //FJapan +#define VK_DBE_HIRAGANA 0x0f2 //FJapan +#define VK_DBE_SBCSCHAR 0x0f3 //FJapan +#define VK_DBE_DBCSCHAR 0x0f4 //FJapan +#define VK_DBE_ROMAN 0x0f5 //FJapan +#define VK_DBE_NOROMAN 0x0f6 //FJapan +#define VK_DBE_IME_WORDREGISTER 0x0f7 //FJapan +#define VK_DBE_IME_DIALOG 0x0f8 //FJapan +#define VK_DBE_FLUSH 0x0f9 //FJapan +#define VK_DBE_CODEINPUT 0x0fa //FJapan +#define VK_DBE_NOCODEINPUT 0x0fb //FJapan + + + +/* switch for wParam of IME_MOVECONVERTWINDOW (IME_SETCONVERSIONWINDOW) */ +#define MCW_DEFAULT 0x00 //FKorea || FJapan +#define MCW_RECT 0x01 //FKorea || FJapan +#define MCW_WINDOW 0x02 //FKorea || FJapan +#define MCW_SCREEN 0x04 //FKorea || FJapan +#define MCW_VERTICAL 0x08 //FKorea || FJapan +#define MCW_HIDDEN 0x10 //FKorea +//#define MCW_CMD 0x16 //FKorea: Conflict with FJapan +//#define MCW_CMD 0x06 //FJapan: Conflict with FKorea +#define MCW_CMD ((FKorea) ? 0x16 : 0x06) // command mask FKorea||FJapan + +/* switch for wParam of IME_SETCONVERSIONMODE(IME_SET_MODE) and +** IME_GETCONVERSIONMODE(IME_GET_MODE) +*/ + +#define IME_MODE_ALPHANUMERIC 0x0001 //FKorea || FJapan +//#define IME_MODE_SBCSCHAR 0x0002 //FKorea: Conflict with FJapan +//#define IME_MODE_SBCSCHAR 0x0008 //FJapan: Conflict with FKorea +#define IME_MODE_SBCSCHAR ( (FKorea) ? 0x0002 : 0x0008 ) //FKorea||FJapan +#define IME_MODE_HANJACONVERT 0x0004 //FKorea +#define IME_MODE_KATAKANA 0x0002 //FJapan +#define IME_MODE_HIRAGANA 0x0004 //FJapan +#define IME_MODE_DBCSCHAR 0x0010 //FJapan +#define IME_MODE_ROMAN 0x0020 //FJapan +#define IME_MODE_NOROMAN 0x0040 //FJapan +#define IME_MODE_CODEINPUT 0x0080 //FJapan +#define IME_MODE_NOCODEINPUT 0x0100 //FJapan + +/* functions */ +#define IME_GETIMECAPS 0x03 /* 3.1 */ +#define IME_QUERY IME_GETIMECAPS /* for 3.0 */ +#define IME_SETOPEN 0x04 +#define IME_GETOPEN 0x05 +#define IME_ENABLEDOSIME 0x06 /* 3.1 */ /* ;Internal-ISV */ +#define IME_ENABLE IME_ENABLEDOSIME /* for 3.0 */ /* ;Internal-ISV */ +#define IME_GETVERSION 0x07 /* 3.1 */ +#define IME_SETCONVERSIONWINDOW 0x08 /* 3.1 */ +#define IME_MOVEIMEWINDOW IME_SETCONVERSIONWINDOW /* for 3.0 */ +#define IME_MOVECONVERTWINDOW 0x08 // FJapan +#define IME_SETCONVERSIONMODE 0x10 /* 3.1 */ +//#define IME_SET_MODE 0x12 //FKorea +//#define IME_SET_MODE 0x10 //FJapan +#define IME_SET_MODE ( (FKorea) ? 0x12 : 0x10 ) //FKorea||FJapan +#define IME_GETCONVERSIONMODE 0x11 /* 3.1 */ +#define IME_GET_MODE IME_GETCONVERSIONMODE /* for 3.0 */ +#define IME_SETCONVERSIONFONT 0x12 /* 3.1 */ +#define IME_SETFONT IME_SETCONVERSIONFONT /* for 3.0 */ +#define IME_SENDVKEY 0x13 /* 3.1 */ +#define IME_SENDKEY IME_SENDVKEY /* for 3.0 */ +#define IME_DESTROYIME 0x14 /* ;Internal-ISV */ +#define IME_DESTROY IME_DESTROYIME /* ;Internal-ISV */ +#define IME_PRIVATE 0x15 +#define IME_WINDOWUPDATE 0x16 +#define IME_SELECT 0x17 /* ;Internal-ISV */ +#define IME_ENTERWORDREGISTERMODE 0x18 /* 3.1 */ +#define IME_WORDREGISTER IME_ENTERWORDREGISTERMODE /* for 3.0 */ +#define IME_SETCONVERSIONFONTEX 0x19 /* New for 3.1 */ +#define IME_DBCSNAME 0x1A /* reserved for CWIN */ /* ;Internal */ +#define IME_MAXKEY 0x1B /* reserved for CWIN */ /* ;Internal */ +#define IME_CODECONVERT 0x20 /* reserved for HWIN */ /* ;Internal */ +#define IME_SETUSRFONT 0x20 /* reserved for CWIN */ /* ;Internal */ +#define IME_CONVERTLIST 0x21 /* reserved for HWIN */ /* ;Internal */ +#define IME_QUERYUSRFONT 0x21 /* reserved for CWIN */ /* ;Internal */ +#define IME_INPUTKEYTOSEQUENCE 0x22 /* reserved for CWIN */ /* ;Internal */ +#define IME_SEQUENCETOINTERNAL 0x23 /* reserved for CWIN */ /* ;Internal */ +#define IME_QUERYIMEINFO 0x24 /* reserved for CWIN */ /* ;Internal */ +#define IME_DIALOG 0x25 /* reserved for CWIN */ /* ;Internal */ +#define IME_AUTOMATA 0x30 /* reserved for HWIN */ /* ;Internal */ +#define IME_HANJAMODE 0x31 /* reserved for HWIN */ /* ;Internal */ +#define IME_GETLEVEL 0x40 /* reserved for HWIN */ /* ;Internal */ +#define IME_SETLEVEL 0x41 /* reserved for HWIN */ /* ;Internal */ +#define IME_GETMNTABLE 0x42 /* reserved for HWIN */ /* ;Internal */ + +//#ifdef PEN /* ;Internal */ +#define IME_SETUNDETERMINESTRING 0x50 /* New for 3.1 (PENWIN) */ +#define IME_SETCAPTURE 0x51 /* New for 3.1 (PENWIN) */ +//#endif /* ;Internal */ + +#define IME_PRIVATEFIRST 0x0100 /* New for 3.1 */ +#define IME_PRIVATELAST 0x04FF /* New for 3.1 */ + +/* IME_CODECONVERT subfunctions (FKorea) */ +#define IME_BANJAtoJUNJA 0x13 +#define IME_JUNJAtoBANJA 0x14 +#define IME_JOHABtoKS 0x15 +#define IME_KStoJOHAB 0x16 + +/* IME_AUTOMATA subfunctions (FKorea) */ +#define IMEA_INIT 0x01 +#define IMEA_NEXT 0x02 +#define IMEA_PREV 0x03 + +/* IME_HANJAMODE subfunctions (FKorea) */ +#define IME_REQUEST_CONVERT 0x01 +#define IME_ENABLE_CONVERT 0x02 + +/* IME_MOVEIMEWINDOW subfunctions (FKorea) */ +#define INTERIM_WINDOW 0x00 +#define MODE_WINDOW 0x01 +#define HANJA_WINDOW 0x02 + +/* (FKorea) */ +#define IMEPROC_SWITCH 0x0001 /* ;Internal */ +/* the IMEPROC_SK is from 0x0010 ~ 0x001F */ /* ;Internal */ +#define IMEPROC_SK 0x0010 /* ;Internal */ +#define IMEPROC_SK0 0x0010 /* ;Internal */ +#define IMEPROC_SK1 0x0011 /* ;Internal */ +#define IMEPROC_SK2 0x0012 /* ;Internal */ + +/* (FKorea) */ +#define PROC_INFO 0x0001 /* ;Internal */ +#define PROC_SHOW 0x0002 /* ;Internal */ +#define PROC_HIDE 0x0004 /* ;Internal */ + +/* (FKorea) */ +#define BY_IME_HWND 0x0000 /* ;Internal */ +#define BY_IME_NAME 0x0001 /* ;Internal */ +#define BY_IME_DESCRIPTION 0x0002 /* ;Internal */ +#define BY_IME_DEFAULT 0x000F /* ;Internal */ + +/* (FKorea) */ +/* Those bits are used by ControlIMEMessage() */ /* ;Internal */ +/* 0x0030 - the two bits are for post/send messages control */ /* ;Internal */ +#define CTRL_MSG_MASK 0x0030 /* ;Internal */ +/* CTRL_SEND is default one, because it is usually used */ /* ;Internal */ +#define CTRL_SEND 0x0000 /* ;Internal */ +#define CTRL_POST 0x0010 /* ;Internal */ +/* CTRL_NONE - don't send and post */ /* ;Internal */ +#define CTRL_NONE 0x0030 /* ;Internal */ + +#define CTRL_USER_ALLOC 0x0040 /* ;Internal */ + +/* CTRL_MODIFY_??? - modify imepro of specified IME */ /* ;Internal */ +#define CTRL_MODIFY_USR_DIC 0x0080 /* ;Internal */ +// CTRL_MODIFY is "or" all modify bits, but now only one +#define CTRL_MODIFY CTRL_MODIFY_USR_DIC /* ;Internal */ + +/* error code */ +#define IME_RS_ERROR 0x01 /* general error */ +#define IME_RS_NOIME 0x02 /* IME is not installed */ +#define IME_RS_TOOLONG 0x05 /* given string is too long */ +#define IME_RS_ILLEGAL 0x06 /* illegal charactor(s) is string */ +#define IME_RS_NOTFOUND 0x07 /* no (more) candidate */ +#define IME_RS_NOROOM 0x0a /* no disk/memory space */ +#define IME_RS_DISKERROR 0x0e /* disk I/O error */ +#define IME_RS_CAPTURED 0x10 /* IME is captured (PENWIN) */ +#define IME_RS_INVALID 0x11 /* invalid sub-function was specified */ +#define IME_RS_NEST 0x12 /* called nested */ +#define IME_RS_SYSTEMMODAL 0x13 /* called when system mode */ + +/* messge ids */ +#define WM_IME_REPORT 0x0280 +#define IR_STRINGSTART 0x100 +#define IR_STRINGEND 0x101 +#define IR_MOREROOM 0x110 /* reserved for CWIN */ /* ;Internal */ +#define IR_OPENCONVERT 0x120 +#define IR_CHANGECONVERT 0x121 +#define IR_CLOSECONVERT 0x122 +#define IR_FULLCONVERT 0x123 +#define IR_IMESELECT 0x130 +#define IR_STRING 0x140 +#define IR_IMERELEASED 0x150 /* reserved for PENWIN */ /* ;Internal */ +#define IR_DBCSCHAR 0x160 /* New for 3.1 */ +#define IR_UNDETERMINE 0x170 /* New for 3.1 */ +#define IR_STRINGEX 0x180 /* New for 3.1 */ + +#define WM_IMEKEYDOWN 0x290 +#define WM_IMEKEYUP 0x291 + +/* return value for IME_VERSION (Internal) */ /* ;Internal */ +#define IMEVER_31 0x0a03 /* ;Internal */ + +WORD WINAPI SendIMEMessage( HWND, LPARAM ); +LRESULT WINAPI SendIMEMessageEx( HWND, LPARAM ); /* New for 3.1 */ + + +typedef struct tagIMESTRUCT { + UINT fnc; /* function code */ + WPARAM wParam; /* word parameter */ + UINT wCount; /* word counter */ + UINT dchSource;/* offset to Source from top of memory object */ + UINT dchDest; /* offset to Desrination from top of memory object */ + LPARAM lParam1; + LPARAM lParam2; + LPARAM lParam3; + +} IMESTRUCT; +typedef IMESTRUCT *PIMESTRUCT; +typedef IMESTRUCT NEAR *NPIMESTRUCT; +typedef IMESTRUCT FAR *LPIMESTRUCT; + +typedef struct tagDATETIME { + WORD year; + WORD month; + WORD day; + WORD hour; + WORD min; + WORD sec; +} DATETIME; + +// This is the Taiwanese version of struct IMEPRO. This is identical +// to Japanese and Korean versions, except it has two extra members +// at the end (szUsrFontName and fEnable). +typedef struct _tagIMEPRO { + HWND hWnd; + DATETIME InstDate; + UINT wVersion; + BYTE szDescription[50]; + BYTE szName[80]; + BYTE szOptions[30]; + BYTE szUsrFontName[80]; + BOOL fEnable; +} IMEPRO; +typedef IMEPRO far *LPIMEPRO; + +/* (FKorea) */ +typedef struct tagOLDUNDETERMINESTRUCT { + UINT uSize; + UINT uDefIMESize; + UINT uLength; + UINT uDeltaStart; + UINT uCursorPos; + BYTE cbColor[16]; +/* -- These members will have variable length. -- + BYTE cbAttrib[]; + BYTE cbText[]; + BYTE cbIMEDef[]; +*/ +} OLDUNDETERMINESTRUCT, + NEAR *NPOLDUNDETERMINESTRUCT, + FAR *LPOLDUNDETERMINESTRUCT; + +/* (FKorea) */ +typedef struct tagUNDETERMINESTRUCT { + DWORD dwSize; + UINT uDefIMESize; + UINT uDefIMEPos; + UINT uUndetTextLen; + UINT uUndetTextPos; + UINT uUndetAttrPos; + UINT uCursorPos; + UINT uDeltaStart; + UINT uDetermineTextLen; + UINT uDetermineTextPos; + UINT uDetermineDelimPos; + UINT uYomiTextLen; + UINT uYomiTextPos; + UINT uYomiDelimPos; +} UNDETERMINESTRUCT, + NEAR *NPUNDETERMINESTRUCT, + FAR *LPUNDETERMINESTRUCT; + +/* (FKorea) */ +typedef struct tagSTRINGEXSTRUCT { + DWORD dwSize; + UINT uDeterminePos; + UINT uDetermineDelimPos; + UINT uYomiPos; + UINT uYomiDelimPos; +} STRINGEXSTRUCT, + NEAR *NPSTRINGEXSTRUCT, + FAR *LPSTRINGEXSTRUCT; + +#ifdef __cplusplus +} +#endif + diff --git a/private/oleauto/tools/win16/os2/inc/io.h b/private/oleauto/tools/win16/os2/inc/io.h new file mode 100644 index 000000000..f4ecdad7f --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/io.h @@ -0,0 +1,162 @@ +/*** +*io.h - declarations for low-level file handling and I/O functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the low-level +* file handling and I/O functions. +* +****/ + +#ifndef _INC_IO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _WINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; + +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +int __cdecl _access(const char *, int); +int __cdecl _chmod(const char *, int); +int __cdecl _chsize(int, long); +int __cdecl _close(int); +int __cdecl _commit(int); +int __cdecl _creat(const char *, int); +int __cdecl _dup(int); +int __cdecl _dup2(int, int); +int __cdecl _eof(int); +long __cdecl _filelength(int); +int __cdecl _isatty(int); +int __cdecl _locking(int, int, long); +long __cdecl _lseek(int, long, int); +char * __cdecl _mktemp(char *); +int __cdecl _open(const char *, int, ...); +int __cdecl _read(int, void *, unsigned int); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +int __cdecl _setmode(int, int); +int __cdecl _sopen(const char *, int, int, ...); +long __cdecl _tell(int); +int __cdecl _umask(int); +int __cdecl _unlink(const char *); +int __cdecl _write(int, const void *, unsigned int); +#ifdef _WINDOWS +#ifndef _WINDLL +int __cdecl _wabout(char *); +int __cdecl _wclose(int, int); +int __cdecl _wgetexit(void); +int __cdecl _wgetfocus(void); +long __cdecl _wgetscreenbuf(int); +int __cdecl _wgetsize(int, int, struct _wsizeinfo *); +int __cdecl _wmenuclick(int); +int __cdecl _wopen(struct _wopeninfo *, struct _wsizeinfo *, int); +int __cdecl _wsetexit(int); +int __cdecl _wsetfocus(int); +int __cdecl _wsetscreenbuf(int, long); +int __cdecl _wsetsize(int, struct _wsizeinfo *); +void __cdecl _wyield(void); +#endif +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl access(const char *, int); +int __cdecl chmod(const char *, int); +int __cdecl chsize(int, long); +int __cdecl close(int); +int __cdecl creat(const char *, int); +int __cdecl dup(int); +int __cdecl dup2(int, int); +int __cdecl eof(int); +long __cdecl filelength(int); +int __cdecl isatty(int); +int __cdecl locking(int, int, long); +long __cdecl lseek(int, long, int); +char * __cdecl mktemp(char *); +int __cdecl open(const char *, int, ...); +int __cdecl read(int, void *, unsigned int); +int __cdecl setmode(int, int); +int __cdecl sopen(const char *, int, int, ...); +long __cdecl tell(int); +int __cdecl umask(int); +int __cdecl unlink(const char *); +int __cdecl write(int, const void *, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_IO +#endif /* _INC_IO */ diff --git a/private/oleauto/tools/win16/os2/inc/iomanip.h b/private/oleauto/tools/win16/os2/inc/iomanip.h new file mode 100644 index 000000000..8004be153 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/iomanip.h @@ -0,0 +1,125 @@ +/*** +*iomanip.h - definitions/declarations for iostream's parameterized manipulators +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes' paramterized manipulators. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOMANIP +#define _INC_IOMANIP +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +// CONSIDER: use macro to define these +// #define __MKMANIP(X) \#define X##(T) __##X##_ \#\# T +// __MKMANIP(SMANIP); +// __MKMANIP(SAPP); +// __MKMANIP(IMANIP); +// __MKMANIP(IAPP); +// __MKMANIP(OMANIP); +// __MKMANIP(OAPP); +// __MKMANIP(IOMANIP); +// __MKMANIP(IOAPP); + +#define SMANIP(T) __SMANIP_##T +#define SAPP(T) __SAPP_##T +#define IMANIP(T) __IMANIP_##T +#define IAPP(T) __IAPP_##T +#define OMANIP(T) __OMANIP_##T +#define OAPP(T) __OAPP_##T +#define IOMANIP(T) __IOMANIP_##T +#define IOAPP(T) __IOAPP_##T + +#define IOMANIPdeclare(T) \ +class SMANIP(T) { \ +public: \ + SMANIP(T)(ios& (*f)(ios&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ + friend ostream& operator<<(ostream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ +private: \ + ios& (* _fp)(ios&,T); \ + T _tp; \ +}; \ +class SAPP(T) { \ +public: \ + SAPP(T)( ios& (*f)(ios&,T)) { _fp = f; } \ + SMANIP(T) operator()(T t) { return SMANIP(T)(_fp,t); } \ +private: \ + ios& (* _fp)(ios&,T); \ +}; \ +class IMANIP(T) { \ +public: \ + IMANIP(T)(istream& (*f)(istream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, IMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + istream& (* _fp)(istream&,T); \ + T _tp; \ +}; \ +class IAPP(T) { \ +public: \ + IAPP(T)( istream& (*f)(istream&,T)) { _fp = f; } \ + IMANIP(T) operator()(T t) { return IMANIP(T)(_fp,t); } \ +private: \ + istream& (* _fp)(istream&,T); \ +}; \ +class OMANIP(T) { \ +public: \ + OMANIP(T)(ostream& (*f)(ostream&,T), T t) { _fp = f; _tp = t; } \ + friend ostream& operator<<(ostream& s, OMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + ostream& (* _fp)(ostream&,T); \ + T _tp; \ +}; \ +class OAPP(T) { \ +public: \ + OAPP(T)(ostream& (*f)(ostream&,T)) { _fp = f; } \ + OMANIP(T) operator()(T t) { return OMANIP(T)(_fp,t); } \ +private: \ + ostream& (* _fp)(ostream&,T); \ +}; \ +\ +class IOMANIP(T) { \ +public: \ + IOMANIP(T)(iostream& (*f)(iostream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ + friend ostream& operator<<(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + iostream& (* _fp)(iostream&,T); \ + T _tp; \ +}; \ +class IOAPP(T) { \ +public: \ + IOAPP(T)( iostream& (*f)(iostream&,T)) { _fp = f; } \ + IOMANIP(T) operator()(T t) { return IOMANIP(T)(_fp,t); } \ +private: \ + iostream& (* _fp)(iostream&,T); \ +}; \ + + +IOMANIPdeclare(int) + +IOMANIPdeclare(long) + +inline ios& __resetiosflags(ios& s, long _flg) { s.setf(0,_flg); return s; } +inline ios& __setfill(ios& s, int _fc) { s.fill((char)_fc); return s; } +inline ios& __setiosflags(ios& s, long _flg) { s.setf(_flg); return s; } +inline ios& __setprecision(ios& s, int _pre) { s.precision(_pre); return s; } +inline ios& __setw(ios& s, int _wid) { s.width(_wid); return s; } + +inline SMANIP(long) resetiosflags(long _l) { return SMANIP(long)(__resetiosflags, _l); } +inline SMANIP(int) setfill(int _m) {return SMANIP(int)(__setfill, _m); } +inline SMANIP(long) setiosflags(long _l) {return SMANIP(long)(__setiosflags, _l); } +inline SMANIP(int) setprecision(int _p) {return SMANIP(int)(__setprecision, _p); } +inline SMANIP(int) setw(int _w) { return SMANIP(int)(__setw, _w); } + +// Restore default packing +#pragma pack() + +#endif // !_INC_IOMANIP diff --git a/private/oleauto/tools/win16/os2/inc/ios.h b/private/oleauto/tools/win16/os2/inc/ios.h new file mode 100644 index 000000000..6cd1f1341 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ios.h @@ -0,0 +1,191 @@ +/*** +*ios.h - definitions/declarations for the ios class. +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ios class. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOS +#define _INC_IOS + + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +class streambuf; +class ostream; + +class ios { + +public: + enum io_state { goodbit = 0x00, + eofbit = 0x01, + failbit = 0x02, + badbit = 0x04 }; + + enum open_mode { in = 0x01, + out = 0x02, + ate = 0x04, + app = 0x08, + trunc = 0x10, + nocreate = 0x20, + noreplace = 0x40, + binary = 0x80 }; // CONSIDER: not in latest spec. + + enum seek_dir { beg=0, cur=1, end=2 }; + + enum { skipws = 0x0001, + left = 0x0002, + right = 0x0004, + internal = 0x0008, + dec = 0x0010, + oct = 0x0020, + hex = 0x0040, + showbase = 0x0080, + showpoint = 0x0100, + uppercase = 0x0200, + showpos = 0x0400, + scientific = 0x0800, + fixed = 0x1000, + unitbuf = 0x2000, + stdio = 0x4000 + }; + + static const long basefield; // dec | oct | hex + static const long adjustfield; // left | right | internal + static const long floatfield; // scientific | fixed + + ios(streambuf*); // differs from ANSI + virtual ~ios(); + + inline long flags() const; + inline long flags(long _l); + + inline long setf(long _f,long _m); + inline long setf(long _l); + inline long unsetf(long _l); + + inline int width() const; + inline int width(int _i); + + inline ostream* tie(ostream* _os); + inline ostream* tie() const; + + inline char fill() const; + inline char fill(char _c); + + inline int precision(int _i); + inline int precision() const; + + inline int rdstate() const; + inline void clear(int _i = 0); + +// inline operator void*() const; + operator void*() const { if(state&(badbit|failbit) ) return 0; return (void*)this; } + inline int operator!() const; + + inline int good() const; + inline int eof() const; + inline int fail() const; + inline int bad() const; + + inline streambuf* rdbuf() const; + + inline long & iword(int) const; + inline void*& pword(int) const; + + static long bitalloc(); + static int xalloc(); + static void sync_with_stdio(); + +protected: + ios(); // CONSIDER: not in current spec. + void init(streambuf*); + + enum { skipping, tied }; + streambuf* bp; + + int state; + int ispecial; + int ospecial; + int isfx_special; + int osfx_special; + int x_delbuf; // if set, rdbuf() deleted by ~ios + + ostream* x_tie; + long x_flags; + short x_precision; + char x_fill; + short x_width; + + static void (*stdioflush)(); +public: + int delbuf() const { return x_delbuf; } + void delbuf(int _i) { x_delbuf = _i; } + +private: + ios(const ios&); + void operator=(const ios&); + static const int x_maxindex; + static long x_maxbit; + static long x_statebuf[]; // used by xalloc() + static int x_curindex; +// consider: make interal static to ios::sync_with_stdio() + static int sunk_with_stdio; // make sure sync_with done only once +}; + +/* inline ios& dec(ios& _strm) { _strm.setf(ios::dec,ios::basefield); return _strm; } +inline ios& hex(ios& _strm) { _strm.setf(ios::hex,ios::basefield); return _strm; } +inline ios& oct(ios& _strm) { _strm.setf(ios::oct,ios::basefield); return _strm; } +UNDONE: c3 /Fa bug */ + +inline ios& dec(ios& _strm) { _strm.setf(ios::dec,ios::dec|ios::hex|ios::oct); return _strm; } +inline ios& hex(ios& _strm) { _strm.setf(ios::hex,ios::dec|ios::hex|ios::oct); return _strm; } +inline ios& oct(ios& _strm) { _strm.setf(ios::oct,ios::dec|ios::hex|ios::oct); return _strm; } + +inline long ios::flags() const { return x_flags; } +inline long ios::flags(long _l){ long _lO; _lO = x_flags; x_flags = _l; return _lO; } + +inline long ios::setf(long _l,long _m){ long _lO; _lO = x_flags; x_flags = (_l&_m) | (x_flags&(~_m)); return _lO; } +inline long ios::setf(long _l){ long _lO; _lO = x_flags; x_flags |= _l; return _lO; } +inline long ios::unsetf(long _l){ long _lO; _lO = x_flags; x_flags &= (~_l); return _lO; } + +inline int ios::width() const { return x_width; } +inline int ios::width(int _i){ int _iO; _iO = x_width; x_width = _i; return _iO; } + +inline ostream* ios::tie(ostream* _os){ ostream* _osO; _osO = x_tie; x_tie = _os; return _osO; } +inline ostream* ios::tie() const { return x_tie; } +inline char ios::fill() const { return x_fill; } +inline char ios::fill(char _c){ char _cO; _cO = x_fill; x_fill = _c; return _cO; } +inline int ios::precision(int _i){ int _iO; _iO = x_precision; x_precision = _i; return _iO; } +inline int ios::precision() const { return x_precision; } + +inline int ios::rdstate() const { return state; } + +// inline ios::operator void*() const { if(state&(badbit|failbit) ) return 0; return (void*)this; } +inline int ios::operator!() const { return state&(badbit|failbit); } + +inline int ios::bad() const { return state & badbit; } +inline void ios::clear(int _i){ state = _i; } +inline int ios::eof() const { return state & eofbit; } +inline int ios::fail() const { return state & (badbit | failbit); } +inline int ios::good() const { return state == 0; } + +inline streambuf* ios::rdbuf() const { return bp; } + +inline long & ios::iword(int _i) const { return x_statebuf[_i] ; } +inline void * & ios::pword(int _i) const { return (void * &)x_statebuf[_i]; } + +// Restore default packing +#pragma pack() + +#endif // !_INC_IOS diff --git a/private/oleauto/tools/win16/os2/inc/iostream.h b/private/oleauto/tools/win16/os2/inc/iostream.h new file mode 100644 index 000000000..14f54e10a --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/iostream.h @@ -0,0 +1,58 @@ +/*** +*iostream.h - definitions/declarations for iostream classes +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOSTREAM +#define _INC_IOSTREAM + +typedef long streamoff, streampos; + +#include <ios.h> // Define ios. + +#include <streamb.h> // Define streambuf. + +#include <istream.h> // Define istream. + +#include <ostream.h> // Define ostream. + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +class iostream : public istream, public ostream { +public: + iostream(streambuf*); + virtual ~iostream(); +protected: +// consider: make private?? + iostream(); +private: + iostream(ios&); + iostream(istream&); + iostream(ostream&); + iostream(iostream&); +void operator=(iostream&); +}; + +class Iostream_init { +public: // UNDONE: public? + Iostream_init(); + ~Iostream_init(); +private: + static int x_fIsInit; +}; + +// used internally +// static Iostream_init __iostreaminit; // initializes cin/cout/cerr/clog + +// Restore default packing +#pragma pack() + +#endif /* !_INC_IOSTREAM */ diff --git a/private/oleauto/tools/win16/os2/inc/istream.h b/private/oleauto/tools/win16/os2/inc/istream.h new file mode 100644 index 000000000..50a7c73b8 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/istream.h @@ -0,0 +1,139 @@ +/*** +*istream.h - definitions/declarations for the istream class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the istream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_ISTREAM +#define _INC_ISTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +typedef long streamoff, streampos; + +class istream: /* virtual */ public ios { + +public: + istream(streambuf*); + virtual ~istream(); + + int ipfx(int =0); + void isfx() { } + + inline istream& operator>>(istream& (*_f)(istream&)); + inline istream& operator>>(ios& (*_f)(ios&)); + istream& operator>>(char*); + inline istream& operator>>(unsigned char*); + inline istream& operator>>(signed char*); + istream& operator>>(char&); + inline istream& operator>>(unsigned char&); + inline istream& operator>>(signed char&); + istream& operator>>(short&); + istream& operator>>(unsigned short&); + istream& operator>>(int&); + istream& operator>>(unsigned int&); + istream& operator>>(long&); + istream& operator>>(unsigned long&); + istream& operator>>(float&); + istream& operator>>(double&); + istream& operator>>(long double&); + istream& operator>>(streambuf*); + + int get(); + istream& get(char*,int,char ='\n'); + inline istream& get(unsigned char*,int,char ='\n'); + inline istream& get(signed char*,int,char ='\n'); + istream& get(char&); + inline istream& get(unsigned char&); + inline istream& get(signed char&); + istream& get(streambuf&,char ='\n'); + inline istream& getline(char*,int,char ='\n'); + inline istream& getline(unsigned char*,int,char ='\n'); + inline istream& getline(signed char*,int,char ='\n'); + + inline istream& ignore(int =1,int =EOF); + istream& read(char *,int); + inline istream& read(unsigned char *,int); + inline istream& read(signed char *,int); + + int gcount() const { return x_gcount; } + int peek() const; + istream& putback(char); + int sync(); + + istream& seekg(streampos); + istream& seekg(streamoff,ios::seek_dir); + streampos tellg(); + + void eatwhite(); // consider: protect and friend with manipulator ws +protected: + istream(); + int do_ipfx(int); + +private: + istream(istream&); + istream(ios&); + void operator=(istream&); + int getint(char *, int); + int getdouble(char *, int); + int _fGline; + int x_gcount; +}; + + inline istream& istream::operator>>(istream& (*_f)(istream&)) { (*_f)(*this); return *this; } + inline istream& istream::operator>>(ios& (*_f)(ios&)) { (*_f)(*this); return *this; } + + inline istream& istream::operator>>(unsigned char* _s) { return operator>>((char *)_s); } + inline istream& istream::operator>>(signed char* _s) { return operator>>((char *)_s); } + + inline istream& istream::operator>>(unsigned char& _c) { return operator>>((char&) _c); } + inline istream& istream::operator>>(signed char& _c) { return operator>>((char&) _c); } + + inline istream& istream::get(unsigned char* b, int lim ,char delim) { return get((char *)b, lim, delim); } + inline istream& istream::get(signed char* b, int lim, char delim) { return get((char *)b, lim, delim); } + + inline istream& istream::get(unsigned char& _c) { return get((char&)_c); } + inline istream& istream::get(signed char& _c) { return get((char&)_c); } + + inline istream& istream::getline(char* _b,int _lim,char _delim) { _fGline++; return get(_b, _lim, _delim); } + inline istream& istream::getline(unsigned char* _b,int _lim,char _delim) { _fGline++; return get((char *)_b, _lim, _delim); } + inline istream& istream::getline(signed char* _b,int _lim,char _delim) { return get((char *)_b, _lim, _delim); } + + inline istream& istream::ignore(int _n,int delim) { _fGline++; return get((char *)0, _n+1, delim); } + + inline istream& istream::read(unsigned char * _ptr, int _n) { return read((char *) _ptr, _n); } + inline istream& istream::read(signed char * _ptr, int _n) { return read((char *) _ptr, _n); } + +class istream_withassign : public istream { + public: // not in spec. + istream_withassign(); +// CONSIDER: is this necessary? + istream_withassign(streambuf*); + ~istream_withassign(); + istream& operator=(const istream&); + istream& operator=(streambuf*); +}; + +#if ((!defined(_WINDOWS)) || defined(_QWIN)) +extern istream_withassign cin; +#endif + +inline istream& ws(istream& _ins) { _ins.eatwhite(); return _ins; } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif // !_INC_ISTREAM diff --git a/private/oleauto/tools/win16/os2/inc/limits.h b/private/oleauto/tools/win16/os2/inc/limits.h new file mode 100644 index 000000000..f05133e65 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/limits.h @@ -0,0 +1,44 @@ +/*** +*limits.h - implementation dependent values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains defines for a number of implementation dependent values +* which are commonly used in C programs. +* [ANSI] +* +****/ + +#ifndef _INC_LIMITS + +#define CHAR_BIT 8 /* number of bits in a char */ +#define SCHAR_MIN (-127) /* minimum signed char value */ +#define SCHAR_MAX 127 /* maximum signed char value */ +#define UCHAR_MAX 0xff /* maximum unsigned char value */ +#ifndef _CHAR_UNSIGNED +#define CHAR_MIN SCHAR_MIN /* mimimum char value */ +#define CHAR_MAX SCHAR_MAX /* maximum char value */ +#else +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#ifndef __cplusplus +unsigned int _charmax; /* unsigned CHAR_MAX value */ +#else +extern unsigned int _charmax; /* unsigned CHAR_MAX value */ +static unsigned int *_char_max = &_charmax; +#endif +#endif +#define MB_LEN_MAX 2 /* max. # bytes in multibyte char */ +#define SHRT_MIN (-32767) /* minimum (signed) short value */ +#define SHRT_MAX 32767 /* maximum (signed) short value */ +#define USHRT_MAX 0xffff /* maximum unsigned short value */ +#define INT_MIN (-32767) /* minimum (signed) int value */ +#define INT_MAX 32767 /* maximum (signed) int value */ +#define UINT_MAX 0xffff /* maximum unsigned int value */ +#define LONG_MIN (-2147483647) /* minimum (signed) long value */ +#define LONG_MAX 2147483647 /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffff /* maximum unsigned long value */ + +#define _INC_LIMITS +#endif /* _INC_LIMITS */ diff --git a/private/oleauto/tools/win16/os2/inc/locale.h b/private/oleauto/tools/win16/os2/inc/locale.h new file mode 100644 index 000000000..cdfa0c371 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/locale.h @@ -0,0 +1,84 @@ +/*** +*locale.h - definitions/declarations for localization routines +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the localization routines. +* [ANSI] +* +****/ + +#ifndef _INC_LOCALE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Locale categories */ + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 + +#define LC_MIN LC_ALL +#define LC_MAX LC_TIME + + +/* Locale convention structure */ + +#ifndef _LCONV_DEFINED +struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + }; +#define _LCONV_DEFINED +#endif + +/* function prototypes */ + +char * __cdecl setlocale(int, const char *); +struct lconv * __cdecl localeconv(void); + +#ifdef __cplusplus +} +#endif + +#define _INC_LOCALE +#endif /* _INC_LOCALE */ diff --git a/private/oleauto/tools/win16/os2/inc/malloc.h b/private/oleauto/tools/win16/os2/inc/malloc.h new file mode 100644 index 000000000..f26210834 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/malloc.h @@ -0,0 +1,159 @@ +/*** +*malloc.h - declarations and definitions for memory allocation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for memory allocation functions; +* also defines manifest constants and types used by the heap routines. +* [System V] +* +****/ + +#ifndef _INC_MALLOC + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __based _based +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#define __near _near +#define __segment _segment +#endif + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* constants for _heapchk/_heapset/_heapwalk routines */ + +#define _HEAPEMPTY (-1) +#define _HEAPOK (-2) +#define _HEAPBADBEGIN (-3) +#define _HEAPBADNODE (-4) +#define _HEAPEND (-5) +#define _HEAPBADPTR (-6) +#define _FREEENTRY 0 +#define _USEDENTRY 1 + +/* maximum heap request that can ever be honored */ + +#ifdef _WINDOWS +#define _HEAP_MAXREQ 0xFFE6 +#else +#define _HEAP_MAXREQ 0xFFE8 +#endif + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _HEAPINFO_DEFINED +typedef struct _heapinfo { + int __far * _pentry; + size_t _size; + int _useflag; + } _HEAPINFO; +#define _HEAPINFO_DEFINED +#endif + + +/* external variable declarations */ + +extern unsigned int __near __cdecl _amblksiz; + + +/* based heap function prototypes */ + +void __based(void) * __cdecl _bcalloc(__segment, size_t, size_t); +void __based(void) * __cdecl _bexpand(__segment, + void __based(void) *, size_t); +void __cdecl _bfree(__segment, void __based(void) *); +int __cdecl _bfreeseg(__segment); +int __cdecl _bheapadd(__segment, void __based(void) *, size_t); +int __cdecl _bheapchk(__segment); +int __cdecl _bheapmin(__segment); +__segment __cdecl _bheapseg(size_t); +int __cdecl _bheapset(__segment, unsigned int); +int __cdecl _bheapwalk(__segment, _HEAPINFO *); +void __based(void) * __cdecl _bmalloc(__segment, size_t); +size_t __cdecl _bmsize(__segment, void __based(void) *); +void __based(void) * __cdecl _brealloc(__segment, + void __based(void) *, size_t); + + +/* function prototypes */ + +#ifndef _WINDOWS +void * __cdecl _alloca(size_t); +#endif +void * __cdecl calloc(size_t, size_t); +void * __cdecl _expand(void *, size_t); +void __far * __cdecl _fcalloc(size_t, size_t); +void __far * __cdecl _fexpand(void __far *, size_t); +void __cdecl _ffree(void __far *); +int __cdecl _fheapchk(void); +int __cdecl _fheapmin(void); +int __cdecl _fheapset(unsigned int); +int __cdecl _fheapwalk(_HEAPINFO *); +void __far * __cdecl _fmalloc(size_t); +size_t __cdecl _fmsize(void __far *); +void __far * __cdecl _frealloc(void __far *, size_t); +unsigned int __cdecl _freect(size_t); +void __cdecl free(void *); +void __huge * __cdecl _halloc(long, size_t); +void __cdecl _hfree(void __huge *); +#ifndef _WINDOWS +int __cdecl _heapadd(void __far *, size_t); +int __cdecl _heapchk(void); +#endif +int __cdecl _heapmin(void); +#ifndef _WINDOWS +int __cdecl _heapset(unsigned int); +int __cdecl _heapwalk(_HEAPINFO *); +#endif +void * __cdecl malloc(size_t); +size_t __cdecl _memavl(void); +size_t __cdecl _memmax(void); +size_t __cdecl _msize(void *); +void __near * __cdecl _ncalloc(size_t, size_t); +void __near * __cdecl _nexpand(void __near *, size_t); +void __cdecl _nfree(void __near *); +#ifndef _WINDOWS +int __cdecl _nheapchk(void); +#endif +int __cdecl _nheapmin(void); +#ifndef _WINDOWS +int __cdecl _nheapset(unsigned int); +int __cdecl _nheapwalk(_HEAPINFO *); +#endif +void __near * __cdecl _nmalloc(size_t); +size_t __cdecl _nmsize(void __near *); +void __near * __cdecl _nrealloc(void __near *, size_t); +void * __cdecl realloc(void *, size_t); +size_t __cdecl _stackavail(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _WINDOWS +void * __cdecl alloca(size_t); +#endif +void __huge * __cdecl halloc(long, size_t); +void __cdecl hfree(void __huge *); +size_t __cdecl stackavail(void); +#endif /* __STDC__*/ + +#ifdef __cplusplus +} +#endif + +#define _INC_MALLOC +#endif /* _INC_MALLOC */ diff --git a/private/oleauto/tools/win16/os2/inc/math.h b/private/oleauto/tools/win16/os2/inc/math.h new file mode 100644 index 000000000..a1d97f7c1 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/math.h @@ -0,0 +1,252 @@ +/*** +*math.h - definitions and declarations for math library +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains constant definitions and external subroutine +* declarations for the math subroutine library. +* [ANSI/System V] +* +****/ + +#ifndef _INC_MATH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* definition of _exception struct - this struct is passed to the _matherr + * routine when a floating point exception is detected + */ + +#ifndef _EXCEPTION_DEFINED +#pragma pack(2) + +struct _exception { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + double arg1; /* first argument to function */ + double arg2; /* second argument (if any) to function */ + double retval; /* value to be returned by function */ + } ; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define exception _exception +#endif + +#pragma pack() +#define _EXCEPTION_DEFINED +#endif + + +/* definition of a _complex struct to be used by those who use cabs and + * want type checking on their argument + */ + +#ifndef _COMPLEX_DEFINED + +struct _complex { + double x,y; /* real and imaginary parts */ + } ; + +#ifndef __cplusplus /* avoid "complex" name collision */ +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct complex { + double x,y; /* real and imaginary parts */ + } ; +#endif +#endif + +#define _COMPLEX_DEFINED +#endif + + +/* Constant definitions for the exception type passed in the _exception struct + */ + +#define _DOMAIN 1 /* argument domain error */ +#define _SING 2 /* argument singularity */ +#define _OVERFLOW 3 /* overflow range error */ +#define _UNDERFLOW 4 /* underflow range error */ +#define _TLOSS 5 /* total loss of precision */ +#define _PLOSS 6 /* partial loss of precision */ + +#define EDOM 33 +#define ERANGE 34 + + +/* definitions of _HUGE (XENIX) and HUGE_VAL (ANSI) error return values used + * by several floating point math routines + */ + +extern double __near __cdecl _HUGE; +#define HUGE_VAL _HUGE + + +/* function prototypes */ + +int __cdecl abs(int); +double __cdecl acos(double); +double __cdecl asin(double); +double __cdecl atan(double); +double __cdecl atan2(double, double); +double __cdecl atof(const char *); +double __cdecl _cabs(struct _complex); +double __cdecl ceil(double); +double __cdecl cos(double); +double __cdecl cosh(double); +int __cdecl _dieeetomsbin(double *, double *); +int __cdecl _dmsbintoieee(double *, double *); +double __cdecl exp(double); +double __cdecl fabs(double); +int __cdecl _fieeetomsbin(float *, float *); +double __cdecl floor(double); +double __cdecl fmod(double, double); +int __cdecl _fmsbintoieee(float *, float *); +double __cdecl frexp(double, int *); +double __cdecl _hypot(double, double); +double __cdecl _j0(double); +double __cdecl _j1(double); +double __cdecl _jn(int, double); +long __cdecl labs(long); +double __cdecl ldexp(double, int); +double __cdecl log(double); +double __cdecl log10(double); +int __cdecl _matherr(struct _exception *); +double __cdecl modf(double, double *); +double __cdecl pow(double, double); +double __cdecl sin(double); +double __cdecl sinh(double); +double __cdecl sqrt(double); +double __cdecl tan(double); +double __cdecl tanh(double); +double __cdecl _y0(double); +double __cdecl _y1(double); +double __cdecl _yn(int, double); + + +/* definition of _exceptionl struct - this struct is passed to the _matherrl + * routine when a floating point exception is detected in a long double routine + */ + +#ifndef _LD_EXCEPTION_DEFINED +#pragma pack(2) +struct _exceptionl { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + long double arg1; /* first argument to function */ + long double arg2; /* second argument (if any) to function */ + long double retval; /* value to be returned by function */ + } ; +#pragma pack() +#define _LD_EXCEPTION_DEFINED +#endif + + +/* definition of a _complexl struct to be used by those who use _cabsl and + * want type checking on their argument + */ + +#ifndef _LD_COMPLEX_DEFINED +#pragma pack(2) +struct _complexl { + long double x,y; /* real and imaginary parts */ + } ; +#pragma pack() +#define _LD_COMPLEX_DEFINED +#endif + +extern long double __near __cdecl _LHUGE; +#define _LHUGE_VAL _LHUGE + + +long double __cdecl acosl(long double); +long double __cdecl asinl(long double); +long double __cdecl atanl(long double); +long double __cdecl atan2l(long double, long double); +long double __cdecl _atold(const char *); +long double __cdecl _cabsl(struct _complexl); +long double __cdecl ceill(long double); +long double __cdecl cosl(long double); +long double __cdecl coshl(long double); +long double __cdecl expl(long double); +long double __cdecl fabsl(long double); +long double __cdecl floorl(long double); +long double __cdecl fmodl(long double, long double); +long double __cdecl frexpl(long double, int *); +long double __cdecl _hypotl(long double, long double); +long double __cdecl _j0l(long double); +long double __cdecl _j1l(long double); +long double __cdecl _jnl(int, long double); +long double __cdecl ldexpl(long double, int); +long double __cdecl logl(long double); +long double __cdecl log10l(long double); +int __cdecl _matherrl(struct _exceptionl *); +long double __cdecl modfl(long double, long double *); +long double __cdecl powl(long double, long double); +long double __cdecl sinl(long double); +long double __cdecl sinhl(long double); +long double __cdecl sqrtl(long double); +long double __cdecl tanl(long double); +long double __cdecl tanhl(long double); +long double __cdecl _y0l(long double); +long double __cdecl _y1l(long double); +long double __cdecl _ynl(int, long double); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DOMAIN _DOMAIN +#define SING _SING +#define OVERFLOW _OVERFLOW +#define UNDERFLOW _UNDERFLOW +#define TLOSS _TLOSS +#define PLOSS _PLOSS + +#define matherr _matherr + +#if 0 +/* NOTE: the following conflicts w/may other definitions of HUGE, + including those in our current Ole2 headers. -bradlo */ +extern double __near __cdecl HUGE; +#endif + +#ifndef __cplusplus /* avoid "complex" name collision */ +double __cdecl cabs(struct complex); +#endif +double __cdecl hypot(double, double); +double __cdecl j0(double); +double __cdecl j1(double); +double __cdecl jn(int, double); +double __cdecl y0(double); +double __cdecl y1(double); +double __cdecl yn(int, double); + +int __cdecl dieeetomsbin(double *, double *); +int __cdecl dmsbintoieee(double *, double *); +int __cdecl fieeetomsbin(float *, float *); +int __cdecl fmsbintoieee(float *, float *); + +long double __cdecl cabsl(struct _complexl); +long double __cdecl hypotl(long double, long double); + +#endif /* __STDC__ */ + + +#ifdef __cplusplus +} +#endif + +#define _INC_MATH +#endif /* _INC_MATH */ diff --git a/private/oleauto/tools/win16/os2/inc/memory.h b/private/oleauto/tools/win16/os2/inc/memory.h new file mode 100644 index 000000000..c43f796aa --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/memory.h @@ -0,0 +1,75 @@ +/*** +*memory.h - declarations for buffer (memory) manipulation routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the +* buffer (memory) manipulation routines. +* [System V] +* +****/ + +#ifndef _INC_MEMORY + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +void * __cdecl memcpy(void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_MEMORY +#endif /* _INC_MEMORY */ diff --git a/private/oleauto/tools/win16/os2/inc/mmsystem.h b/private/oleauto/tools/win16/os2/inc/mmsystem.h new file mode 100644 index 000000000..e3bfa4234 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/mmsystem.h @@ -0,0 +1,1917 @@ +/****************************************************************************/ +/* */ +/* MMSYSTEM.H - Include file for Multimedia APIs */ +/* */ +/* Note: You must include WINDOWS.H before including this file. */ +/* */ +/* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. */ +/* */ +/****************************************************************************/ + + + +/* If defined, the following flags inhibit inclusion + * of the indicated items: + * + * MMNODRV - Installable driver support + * MMNOSOUND - Sound support + * MMNOWAVE - Waveform support + * MMNOMIDI - MIDI support + * MMNOAUX - Auxiliary audio support + * MMNOTIMER - Timer support + * MMNOJOY - Joystick support + * MMNOMCI - MCI support + * MMNOMMIO - Multimedia file I/O support + * MMNOMMSYSTEM - General MMSYSTEM functions + */ + +#ifndef _INC_MMSYSTEM +#define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + + +/**************************************************************************** + + General constants and data types + +****************************************************************************/ + +/* general constants */ +#define MAXPNAMELEN 32 /* max product name length (including NULL) */ +#define MAXERRORLENGTH 128 /* max error text length (including NULL) */ + +/* general data types */ +typedef WORD VERSION; /* major (high byte), minor (low byte) */ + +/* MMTIME data structure */ +typedef struct mmtime_tag { + UINT wType; /* indicates the contents of the union */ + union { + DWORD ms; /* milliseconds */ + DWORD sample; /* samples */ + DWORD cb; /* byte count */ + struct { /* SMPTE */ + BYTE hour; /* hours */ + BYTE min; /* minutes */ + BYTE sec; /* seconds */ + BYTE frame; /* frames */ + BYTE fps; /* frames per second */ + BYTE dummy; /* pad */ + } smpte; + struct { /* MIDI */ + DWORD songptrpos; /* song pointer position */ + } midi; + } u; + } MMTIME; +typedef MMTIME *PMMTIME; +typedef MMTIME NEAR *NPMMTIME; +typedef MMTIME FAR *LPMMTIME; + +/* types for wType field in MMTIME struct */ +#define TIME_MS 0x0001 /* time in milliseconds */ +#define TIME_SAMPLES 0x0002 /* number of wave samples */ +#define TIME_BYTES 0x0004 /* current byte offset */ +#define TIME_SMPTE 0x0008 /* SMPTE time */ +#define TIME_MIDI 0x0010 /* MIDI time */ + + +/**************************************************************************** + + Multimedia Extensions Window Messages + +****************************************************************************/ + +#define MM_JOY1MOVE 0x3A0 /* joystick */ +#define MM_JOY2MOVE 0x3A1 +#define MM_JOY1ZMOVE 0x3A2 +#define MM_JOY2ZMOVE 0x3A3 +#define MM_JOY1BUTTONDOWN 0x3B5 +#define MM_JOY2BUTTONDOWN 0x3B6 +#define MM_JOY1BUTTONUP 0x3B7 +#define MM_JOY2BUTTONUP 0x3B8 + +#define MM_MCINOTIFY 0x3B9 /* MCI */ + +#define MM_WOM_OPEN 0x3BB /* waveform output */ +#define MM_WOM_CLOSE 0x3BC +#define MM_WOM_DONE 0x3BD + +#define MM_WIM_OPEN 0x3BE /* waveform input */ +#define MM_WIM_CLOSE 0x3BF +#define MM_WIM_DATA 0x3C0 + +#define MM_MIM_OPEN 0x3C1 /* MIDI input */ +#define MM_MIM_CLOSE 0x3C2 +#define MM_MIM_DATA 0x3C3 +#define MM_MIM_LONGDATA 0x3C4 +#define MM_MIM_ERROR 0x3C5 +#define MM_MIM_LONGERROR 0x3C6 + +#define MM_MOM_OPEN 0x3C7 /* MIDI output */ +#define MM_MOM_CLOSE 0x3C8 +#define MM_MOM_DONE 0x3C9 + + +/**************************************************************************** + + String resource number bases (internal use) + +****************************************************************************/ + +#define MMSYSERR_BASE 0 +#define WAVERR_BASE 32 +#define MIDIERR_BASE 64 +#define TIMERR_BASE 96 +#define JOYERR_BASE 160 +#define MCIERR_BASE 256 + +#define MCI_STRING_OFFSET 512 +#define MCI_VD_OFFSET 1024 +#define MCI_CD_OFFSET 1088 +#define MCI_WAVE_OFFSET 1152 +#define MCI_SEQ_OFFSET 1216 + +/**************************************************************************** + + General error return values + +****************************************************************************/ + +/* general error return values */ +#define MMSYSERR_NOERROR 0 /* no error */ +#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */ +#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */ +#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */ +#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */ +#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */ +#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */ +#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */ +#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */ +#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */ +#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */ +#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */ +#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */ + + +#if (WINVER < 0x030a) +DECLARE_HANDLE(HDRVR); +#endif /* ifdef WINVER < 0x030a */ + +#ifndef MMNODRV +/**************************************************************************** + + Installable driver support + +****************************************************************************/ + +#if (WINVER < 0x030a) + +/* return values from DriverProc() function */ +#define DRV_CANCEL 0x0000 +#define DRV_OK 0x0001 +#define DRV_RESTART 0x0002 + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO { + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO *PDRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR *NPDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR *LPDRVCONFIGINFO; + +/* installable driver function prototypes */ +LRESULT WINAPI DrvClose(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); +HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, + LPARAM lParam2); +LRESULT WINAPI DrvSendMessage(HDRVR hDriver, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hDriver); + +LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, + UINT uMessage, LPARAM lParam1, LPARAM lParam2); + +#define DefDriverProc DrvDefDriverProc + +#endif /* ifdef WINVER < 0x030a */ + +#if (WINVER >= 0x030a) + + +/* return values from DriverProc() function */ +#define DRV_CANCEL DRVCNF_CANCEL +#define DRV_OK DRVCNF_OK +#define DRV_RESTART DRVCNF_RESTART + +#endif /* ifdef WINVER >= 0x030a */ + +#define DRV_MCI_FIRST DRV_RESERVED +#define DRV_MCI_LAST (DRV_RESERVED + 0xFFF) + +#endif /* ifndef MMNODRV */ + + +/**************************************************************************** + + Driver callback support + +****************************************************************************/ + +/* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */ +/* midiOutOpen() to specify the type of the dwCallback parameter. */ + +#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */ +#define CALLBACK_NULL 0x00000000l /* no callback */ +#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */ +#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */ +#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */ + +/* driver callback prototypes */ +typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef DRVCALLBACK FAR *LPDRVCALLBACK; + +/**************************************************************************** + + Manufacturer and product IDs + + Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS, + MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures. + +****************************************************************************/ + +/* manufacturer IDs */ +#define MM_MICROSOFT 1 /* Microsoft Corp. */ + +/* product IDs */ +#define MM_MIDI_MAPPER 1 /* MIDI Mapper */ +#define MM_WAVE_MAPPER 2 /* Wave Mapper */ + +#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */ +#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */ +#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */ +#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */ +#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */ + +#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */ + +#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */ +#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */ + +#define MM_PC_JOYSTICK 12 /* Joystick adapter */ + + +#ifndef MMNOMMSYSTEM +/**************************************************************************** + + General MMSYSTEM support + +****************************************************************************/ + +WORD WINAPI mmsystemGetVersion(void); +void WINAPI OutputDebugStr(LPCSTR); + +#endif /* ifndef MMNOMMSYSTEM */ + + +#ifndef MMNOSOUND +/**************************************************************************** + + Sound support + +****************************************************************************/ + +BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags); + +/* flag values for wFlags parameter */ +#define SND_SYNC 0x0000 /* play synchronously (default) */ +#define SND_ASYNC 0x0001 /* play asynchronously */ +#define SND_NODEFAULT 0x0002 /* don't use default sound */ +#define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */ +#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */ +#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */ + +#endif /* ifndef MMNOSOUND */ + + +#ifndef MMNOWAVE +/**************************************************************************** + + Waveform audio support + +****************************************************************************/ + +/* waveform audio error return values */ +#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */ +#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */ +#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */ +#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */ +#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */ + +/* waveform audio data types */ +DECLARE_HANDLE(HWAVE); +DECLARE_HANDLE(HWAVEIN); +DECLARE_HANDLE(HWAVEOUT); +typedef HWAVEIN FAR *LPHWAVEIN; +typedef HWAVEOUT FAR *LPHWAVEOUT; +typedef DRVCALLBACK WAVECALLBACK; +typedef WAVECALLBACK FAR *LPWAVECALLBACK; + +/* wave callback messages */ +#define WOM_OPEN MM_WOM_OPEN +#define WOM_CLOSE MM_WOM_CLOSE +#define WOM_DONE MM_WOM_DONE +#define WIM_OPEN MM_WIM_OPEN +#define WIM_CLOSE MM_WIM_CLOSE +#define WIM_DATA MM_WIM_DATA + +/* device ID for wave device mapper */ +#define WAVE_MAPPER (-1) + +/* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */ +#define WAVE_FORMAT_QUERY 0x0001 +#define WAVE_ALLOWSYNC 0x0002 + +/* wave data block header */ +typedef struct wavehdr_tag { + LPSTR lpData; /* pointer to locked data buffer */ + DWORD dwBufferLength; /* length of data buffer */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + DWORD dwLoops; /* loop control counter */ + struct wavehdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} WAVEHDR; +typedef WAVEHDR *PWAVEHDR; +typedef WAVEHDR NEAR *NPWAVEHDR; +typedef WAVEHDR FAR *LPWAVEHDR; + +/* flags for dwFlags field of WAVEHDR */ +#define WHDR_DONE 0x00000001 /* done bit */ +#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */ +#define WHDR_BEGINLOOP 0x00000004 /* loop start block */ +#define WHDR_ENDLOOP 0x00000008 /* loop end block */ +#define WHDR_INQUEUE 0x00000010 /* reserved for driver */ + +/* waveform output device capabilities structure */ +typedef struct waveoutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of sources supported */ + DWORD dwSupport; /* functionality supported by driver */ +} WAVEOUTCAPS; +typedef WAVEOUTCAPS *PWAVEOUTCAPS; +typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS; +typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS; + +/* flags for dwSupport field of WAVEOUTCAPS */ +#define WAVECAPS_PITCH 0x0001 /* supports pitch control */ +#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */ +#define WAVECAPS_VOLUME 0x0004 /* supports volume control */ +#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */ +#define WAVECAPS_SYNC 0x0010 + +/* waveform input device capabilities structure */ +typedef struct waveincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of channels supported */ +} WAVEINCAPS; +typedef WAVEINCAPS *PWAVEINCAPS; +typedef WAVEINCAPS NEAR *NPWAVEINCAPS; +typedef WAVEINCAPS FAR *LPWAVEINCAPS; + +/* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */ +#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */ +#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */ + +/* general waveform format structure (information common to all formats) */ +typedef struct waveformat_tag { + WORD wFormatTag; /* format type */ + WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */ + DWORD nSamplesPerSec; /* sample rate */ + DWORD nAvgBytesPerSec; /* for buffer estimation */ + WORD nBlockAlign; /* block size of data */ +} WAVEFORMAT; +typedef WAVEFORMAT *PWAVEFORMAT; +typedef WAVEFORMAT NEAR *NPWAVEFORMAT; +typedef WAVEFORMAT FAR *LPWAVEFORMAT; + +/* flags for wFormatTag field of WAVEFORMAT */ +#define WAVE_FORMAT_PCM 1 + +/* specific waveform format structure for PCM data */ +typedef struct pcmwaveformat_tag { + WAVEFORMAT wf; + WORD wBitsPerSample; +} PCMWAVEFORMAT; +typedef PCMWAVEFORMAT *PPCMWAVEFORMAT; +typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT; +typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT; + +/* waveform audio function prototypes */ +UINT WINAPI waveOutGetNumDevs(void); +UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveOutClose(HWAVEOUT hWaveOut); +UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr, + UINT uSize); +UINT WINAPI waveOutPause(HWAVEOUT hWaveOut); +UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut); +UINT WINAPI waveOutReset(HWAVEOUT hWaveOut); +UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut); +UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch); +UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch); +UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate); +UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate); +UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI waveInGetNumDevs(void); +UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveInClose(HWAVEIN hWaveIn); +UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInStart(HWAVEIN hWaveIn); +UINT WINAPI waveInStop(HWAVEIN hWaveIn); +UINT WINAPI waveInReset(HWAVEIN hWaveIn); +UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOWAVE */ + + +#ifndef MMNOMIDI +/**************************************************************************** + + MIDI audio support + +****************************************************************************/ + +/* MIDI error return values */ +#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */ +#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */ +#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */ +#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */ +#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */ +#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */ +#define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */ + +/* MIDI audio data types */ +DECLARE_HANDLE(HMIDI); +DECLARE_HANDLE(HMIDIIN); +DECLARE_HANDLE(HMIDIOUT); +typedef HMIDIIN FAR *LPHMIDIIN; +typedef HMIDIOUT FAR *LPHMIDIOUT; +typedef DRVCALLBACK MIDICALLBACK; +typedef MIDICALLBACK FAR *LPMIDICALLBACK; +#define MIDIPATCHSIZE 128 +typedef WORD PATCHARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPPATCHARRAY; +typedef WORD KEYARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPKEYARRAY; + +/* MIDI callback messages */ +#define MIM_OPEN MM_MIM_OPEN +#define MIM_CLOSE MM_MIM_CLOSE +#define MIM_DATA MM_MIM_DATA +#define MIM_LONGDATA MM_MIM_LONGDATA +#define MIM_ERROR MM_MIM_ERROR +#define MIM_LONGERROR MM_MIM_LONGERROR +#define MOM_OPEN MM_MOM_OPEN +#define MOM_CLOSE MM_MOM_CLOSE +#define MOM_DONE MM_MOM_DONE + +/* device ID for MIDI mapper */ +#define MIDIMAPPER (-1) +#define MIDI_MAPPER (-1) + +/* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */ +#define MIDI_CACHE_ALL 1 +#define MIDI_CACHE_BESTFIT 2 +#define MIDI_CACHE_QUERY 3 +#define MIDI_UNCACHE 4 + +/* MIDI output device capabilities structure */ +typedef struct midioutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + UINT wVoices; /* # of voices (internal synth only) */ + UINT wNotes; /* max # of notes (internal synth only) */ + UINT wChannelMask; /* channels used (internal synth only) */ + DWORD dwSupport; /* functionality supported by driver */ +} MIDIOUTCAPS; +typedef MIDIOUTCAPS *PMIDIOUTCAPS; +typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS; +typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS; + +/* flags for wTechnology field of MIDIOUTCAPS structure */ +#define MOD_MIDIPORT 1 /* output port */ +#define MOD_SYNTH 2 /* generic internal synth */ +#define MOD_SQSYNTH 3 /* square wave internal synth */ +#define MOD_FMSYNTH 4 /* FM internal synth */ +#define MOD_MAPPER 5 /* MIDI mapper */ + +/* flags for dwSupport field of MIDIOUTCAPS structure */ +#define MIDICAPS_VOLUME 0x0001 /* supports volume control */ +#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */ +#define MIDICAPS_CACHE 0x0004 + +/* MIDI output device capabilities structure */ +typedef struct midiincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ +} MIDIINCAPS; +typedef MIDIINCAPS *PMIDIINCAPS; +typedef MIDIINCAPS NEAR *NPMIDIINCAPS; +typedef MIDIINCAPS FAR *LPMIDIINCAPS; + +/* MIDI data block header */ +typedef struct midihdr_tag { + LPSTR lpData; /* pointer to locked data block */ + DWORD dwBufferLength; /* length of data in data block */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + struct midihdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} MIDIHDR; +typedef MIDIHDR *PMIDIHDR; +typedef MIDIHDR NEAR *NPMIDIHDR; +typedef MIDIHDR FAR *LPMIDIHDR; + +/* flags for dwFlags field of MIDIHDR structure */ +#define MHDR_DONE 0x00000001 /* done bit */ +#define MHDR_PREPARED 0x00000002 /* set if header prepared */ +#define MHDR_INQUEUE 0x00000004 /* reserved for driver */ + +/* MIDI function prototypes */ +UINT WINAPI midiOutGetNumDevs(void); +UINT WINAPI midiOutGetDevCaps(UINT uDeviceID, + MIDIOUTCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiOutClose(HMIDIOUT hMidiOut); +UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg); +UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutReset(HMIDIOUT hMidiOut); +UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut, + UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags); +UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut, + UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags); +UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI midiInGetNumDevs(void); +UINT WINAPI midiInGetDevCaps(UINT uDeviceID, + LPMIDIINCAPS lpCaps, UINT uSize); +UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiInClose(HMIDIIN hMidiIn); +UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInStart(HMIDIIN hMidiIn); +UINT WINAPI midiInStop(HMIDIIN hMidiIn); +UINT WINAPI midiInReset(HMIDIIN hMidiIn); +UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOMIDI */ + + +#ifndef MMNOAUX +/**************************************************************************** + + Auxiliary audio support + +****************************************************************************/ + +/* device ID for aux device mapper */ +#define AUX_MAPPER (-1) + +/* Auxiliary audio device capabilities structure */ +typedef struct auxcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + DWORD dwSupport; /* functionality supported by driver */ +} AUXCAPS; +typedef AUXCAPS *PAUXCAPS; +typedef AUXCAPS NEAR *NPAUXCAPS; +typedef AUXCAPS FAR *LPAUXCAPS; + +/* flags for wTechnology field in AUXCAPS structure */ +#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */ +#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */ + +/* flags for dwSupport field in AUXCAPS structure */ +#define AUXCAPS_VOLUME 0x0001 /* supports volume control */ +#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */ + +/* auxiliary audio function prototypes */ +UINT WINAPI auxGetNumDevs(void); +UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); + +#if (WINVER >= 0x030a) +DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOAUX */ + + +#ifndef MMNOTIMER +/**************************************************************************** + + Timer support + +****************************************************************************/ + +/* timer error return values */ +#define TIMERR_NOERROR (0) /* no error */ +#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */ +#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */ + +/* timer data types */ +typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef TIMECALLBACK FAR *LPTIMECALLBACK; + +/* flags for wFlags parameter of timeSetEvent() function */ +#define TIME_ONESHOT 0 /* program timer for single event */ +#define TIME_PERIODIC 1 /* program for continuous periodic event */ + +/* timer device capabilities data structure */ +typedef struct timecaps_tag { + UINT wPeriodMin; /* minimum period supported */ + UINT wPeriodMax; /* maximum period supported */ + } TIMECAPS; +typedef TIMECAPS *PTIMECAPS; +typedef TIMECAPS NEAR *NPTIMECAPS; +typedef TIMECAPS FAR *LPTIMECAPS; + +/* timer function prototypes */ +UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize); +DWORD WINAPI timeGetTime(void); +UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution, + LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags); +UINT WINAPI timeKillEvent(UINT uTimerID); +UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize); +UINT WINAPI timeBeginPeriod(UINT uPeriod); +UINT WINAPI timeEndPeriod(UINT uPeriod); + +#endif /* ifndef MMNOTIMER */ + + +#ifndef MMNOJOY +/**************************************************************************** + + Joystick support + +****************************************************************************/ + +/* joystick error return values */ +#define JOYERR_NOERROR (0) /* no error */ +#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */ +#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */ +#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */ + +/* constants used with JOYINFO structure and MM_JOY* messages */ +#define JOY_BUTTON1 0x0001 +#define JOY_BUTTON2 0x0002 +#define JOY_BUTTON3 0x0004 +#define JOY_BUTTON4 0x0008 +#define JOY_BUTTON1CHG 0x0100 +#define JOY_BUTTON2CHG 0x0200 +#define JOY_BUTTON3CHG 0x0400 +#define JOY_BUTTON4CHG 0x0800 + +/* joystick ID constants */ +#define JOYSTICKID1 0 +#define JOYSTICKID2 1 + +/* joystick device capabilities data structure */ +typedef struct joycaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wXmin; /* minimum x position value */ + UINT wXmax; /* maximum x position value */ + UINT wYmin; /* minimum y position value */ + UINT wYmax; /* maximum y position value */ + UINT wZmin; /* minimum z position value */ + UINT wZmax; /* maximum z position value */ + UINT wNumButtons; /* number of buttons */ + UINT wPeriodMin; /* minimum message period when captured */ + UINT wPeriodMax; /* maximum message period when captured */ + } JOYCAPS; +typedef JOYCAPS *PJOYCAPS; +typedef JOYCAPS NEAR *NPJOYCAPS; +typedef JOYCAPS FAR *LPJOYCAPS; + +/* joystick information data structure */ +typedef struct joyinfo_tag { + UINT wXpos; /* x position */ + UINT wYpos; /* y position */ + UINT wZpos; /* z position */ + UINT wButtons; /* button states */ + } JOYINFO; +typedef JOYINFO *PJOYINFO; +typedef JOYINFO NEAR *NPJOYINFO; +typedef JOYINFO FAR *LPJOYINFO; + +/* joystick function prototypes */ +UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI joyGetNumDevs(void); +UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo); +UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold); +UINT WINAPI joyReleaseCapture(UINT uJoyID); +UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod, + BOOL bChanged); +UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold); + +#endif /* ifndef MMNOJOY */ + + +#ifndef MMNOMMIO +/**************************************************************************** + + Multimedia File I/O support + +****************************************************************************/ + +/* MMIO error return values */ +#define MMIOERR_BASE 256 +#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */ +#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */ +#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */ +#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */ +#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */ +#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */ +#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */ +#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */ +#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */ +#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */ + +/* MMIO constants */ +#define CFSEPCHAR '+' /* compound file name separator char. */ + +/* MMIO data types */ +typedef DWORD FOURCC; /* a four character code */ +typedef char _huge * HPSTR; /* a huge version of LPSTR */ +DECLARE_HANDLE(HMMIO); /* a handle to an open file */ +typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +typedef MMIOPROC FAR *LPMMIOPROC; + +/* general MMIO information data structure */ +typedef struct _MMIOINFO +{ + /* general fields */ + DWORD dwFlags; /* general status flags */ + FOURCC fccIOProc; /* pointer to I/O procedure */ + LPMMIOPROC pIOProc; /* pointer to I/O procedure */ + UINT wErrorRet; /* place for error to be returned */ + HTASK htask; /* alternate local task */ + + /* fields maintained by MMIO functions during buffered I/O */ + LONG cchBuffer; /* size of I/O buffer (or 0L) */ + HPSTR pchBuffer; /* start of I/O buffer (or NULL) */ + HPSTR pchNext; /* pointer to next byte to read/write */ + HPSTR pchEndRead; /* pointer to last valid byte to read */ + HPSTR pchEndWrite; /* pointer to last byte to write */ + LONG lBufOffset; /* disk offset of start of buffer */ + + /* fields maintained by I/O procedure */ + LONG lDiskOffset; /* disk offset of next read or write */ + DWORD adwInfo[3]; /* data specific to type of MMIOPROC */ + + /* other fields maintained by MMIO */ + DWORD dwReserved1; /* reserved for MMIO use */ + DWORD dwReserved2; /* reserved for MMIO use */ + HMMIO hmmio; /* handle to open file */ +} MMIOINFO; +typedef MMIOINFO *PMMIOINFO; +typedef MMIOINFO NEAR *NPMMIOINFO; +typedef MMIOINFO FAR *LPMMIOINFO; + +/* RIFF chunk information data structure */ +typedef struct _MMCKINFO +{ + FOURCC ckid; /* chunk ID */ + DWORD cksize; /* chunk size */ + FOURCC fccType; /* form type or list type */ + DWORD dwDataOffset; /* offset of data portion of chunk */ + DWORD dwFlags; /* flags used by MMIO functions */ +} MMCKINFO; +typedef MMCKINFO *PMMCKINFO; +typedef MMCKINFO NEAR *NPMMCKINFO; +typedef MMCKINFO FAR *LPMMCKINFO; + +/* bit field masks */ +#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */ +#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */ + +/* constants for dwFlags field of MMIOINFO */ +#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */ +#define MMIO_PARSE 0x00000100 /* parse new file returning path */ +#define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */ +#define MMIO_EXIST 0x00004000 /* checks for existence of file */ +#define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */ +#define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */ + +#define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */ + + +/* read/write mode numbers (bit field MMIO_RWMODE) */ +#define MMIO_READ 0x00000000 /* open file for reading only */ +#define MMIO_WRITE 0x00000001 /* open file for writing only */ +#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */ + +/* share mode numbers (bit field MMIO_SHAREMODE) */ +#define MMIO_COMPAT 0x00000000 /* compatibility mode */ +#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */ +#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */ +#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */ +#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */ + +/* various MMIO flags */ +#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */ +#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */ +#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */ +#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */ +#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */ +#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */ +#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */ +#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */ +#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */ +#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */ +#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */ +#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */ + + +/* message numbers for MMIOPROC I/O procedure functions */ +#define MMIOM_READ MMIO_READ /* read */ +#define MMIOM_WRITE MMIO_WRITE /* write */ +#define MMIOM_SEEK 2 /* seek to a new position in file */ +#define MMIOM_OPEN 3 /* open file */ +#define MMIOM_CLOSE 4 /* close file */ +#define MMIOM_WRITEFLUSH 5 /* write and flush */ + +#if (WINVER >= 0x030a) +#define MMIOM_RENAME 6 /* rename specified file */ +#endif /* ifdef WINVER >= 0x030a */ + +#define MMIOM_USER 0x8000 /* beginning of user-defined messages */ + +/* standard four character codes */ +#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F') +#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T') + +/* four character codes used to identify standard built-in I/O procedures */ +#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ') +#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ') + +/* flags for mmioSeek() */ +#ifndef SEEK_SET +#define SEEK_SET 0 /* seek to an absolute position */ +#define SEEK_CUR 1 /* seek relative to current position */ +#define SEEK_END 2 /* seek relative to end of file */ +#endif /* ifndef SEEK_SET */ + +/* other constants */ +#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */ + +/* MMIO macros */ +#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ + ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \ + ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) ) + +/* MMIO function prototypes */ +FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags); +LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, + DWORD dwFlags); +HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo, + DWORD dwOpenFlags); + +#if (WINVER >= 0x030a) +UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName, + MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags); +LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch); +LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch); +LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin); +UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, + UINT uFlags); +UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags); +UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck, + const MMCKINFO FAR* lpckParent, UINT uFlags); +UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); +UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); + +#endif /* ifndef MMNOMMIO */ + + +#ifndef MMNOMCI +/**************************************************************************** + + MCI support + +****************************************************************************/ + +typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData); + +/* MCI function prototypes */ +DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage, + DWORD dwParam1, DWORD dwParam2); +DWORD WINAPI mciSendString (LPCSTR lpstrCommand, + LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback); +UINT WINAPI mciGetDeviceID (LPCSTR lpstrName); +UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID, + LPCSTR lpstrType); +BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer, + UINT uLength); +BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc, + DWORD dwYieldData); + +#if (WINVER >= 0x030a) +HTASK WINAPI mciGetCreatorTask(UINT uDeviceID); +YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData); +#endif /* ifdef WINVER >= 0x030a */ + +#if (WINVER < 0x030a) +BOOL WINAPI mciExecute (LPCSTR lpstrCommand); +#endif /* ifdef WINVER < 0x030a */ + +/* MCI error return values */ +#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1) +#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3) +#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5) +#define MCIERR_HARDWARE (MCIERR_BASE + 6) +#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7) +#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8) +#define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9) +#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10) +#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11) +#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12) +#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13) +#define MCIERR_BAD_INTEGER (MCIERR_BASE + 14) +#define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15) +#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16) +#define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17) +#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18) +#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19) +#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20) +#define MCIERR_INTERNAL (MCIERR_BASE + 21) +#define MCIERR_DRIVER (MCIERR_BASE + 22) +#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23) +#define MCIERR_MULTIPLE (MCIERR_BASE + 24) +#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25) +#define MCIERR_OUTOFRANGE (MCIERR_BASE + 26) +#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28) +#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30) +#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31) +#define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32) +#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33) +#define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34) +#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35) +#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36) +#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37) +#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38) +#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39) +#define MCIERR_INVALID_FILE (MCIERR_BASE + 40) +#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41) +#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42) +#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43) +#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44) +#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45) +#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46) +#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47) +#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48) +#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49) +#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50) +#define MCIERR_GET_CD (MCIERR_BASE + 51) +#define MCIERR_SET_CD (MCIERR_BASE + 52) +#define MCIERR_SET_DRIVE (MCIERR_BASE + 53) +#define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54) +#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55) +#define MCIERR_NO_INTEGER (MCIERR_BASE + 56) + +#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64) +#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65) +#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66) +#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67) +#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68) +#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69) +#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70) +#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71) +#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72) +#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73) + +#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80) +#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81) +#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82) +#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83) +#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84) +#define MCIERR_SEQ_TIMER (MCIERR_BASE + 85) +#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86) +#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87) + +#define MCIERR_NO_WINDOW (MCIERR_BASE + 90) +#define MCIERR_CREATEWINDOW (MCIERR_BASE + 91) +#define MCIERR_FILE_READ (MCIERR_BASE + 92) +#define MCIERR_FILE_WRITE (MCIERR_BASE + 93) + +/* all custom device driver errors must be >= than this value */ +#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256) + +/* MCI command message identifiers */ +#define MCI_OPEN 0x0803 +#define MCI_CLOSE 0x0804 +#define MCI_ESCAPE 0x0805 +#define MCI_PLAY 0x0806 +#define MCI_SEEK 0x0807 +#define MCI_STOP 0x0808 +#define MCI_PAUSE 0x0809 +#define MCI_INFO 0x080A +#define MCI_GETDEVCAPS 0x080B +#define MCI_SPIN 0x080C +#define MCI_SET 0x080D +#define MCI_STEP 0x080E +#define MCI_RECORD 0x080F +#define MCI_SYSINFO 0x0810 +#define MCI_BREAK 0x0811 +#define MCI_SOUND 0x0812 +#define MCI_SAVE 0x0813 +#define MCI_STATUS 0x0814 +#define MCI_CUE 0x0830 +#define MCI_REALIZE 0x0840 +#define MCI_WINDOW 0x0841 +#define MCI_PUT 0x0842 +#define MCI_WHERE 0x0843 +#define MCI_FREEZE 0x0844 +#define MCI_UNFREEZE 0x0845 +#define MCI_LOAD 0x0850 +#define MCI_CUT 0x0851 +#define MCI_COPY 0x0852 +#define MCI_PASTE 0x0853 +#define MCI_UPDATE 0x0854 +#define MCI_RESUME 0x0855 +#define MCI_DELETE 0x0856 + +/* all custom MCI command messages must be >= than this value */ +#define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST) + + +/* device ID for "all devices" */ +#define MCI_ALL_DEVICE_ID 0xFFFF + +/* constants for predefined MCI device types */ +#define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1) +#define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2) +#define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3) +#define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4) +#define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5) +#define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6) +#define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7) +#define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8) +#define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9) +#define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10) +#define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11) + +#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR +#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER + +/* return values for 'status mode' command */ +#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12) +#define MCI_MODE_STOP (MCI_STRING_OFFSET + 13) +#define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14) +#define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15) +#define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16) +#define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17) +#define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18) + +/* constants used in 'set time format' and 'status time format' commands */ +#define MCI_FORMAT_MILLISECONDS 0 +#define MCI_FORMAT_HMS 1 +#define MCI_FORMAT_MSF 2 +#define MCI_FORMAT_FRAMES 3 +#define MCI_FORMAT_SMPTE_24 4 +#define MCI_FORMAT_SMPTE_25 5 +#define MCI_FORMAT_SMPTE_30 6 +#define MCI_FORMAT_SMPTE_30DROP 7 +#define MCI_FORMAT_BYTES 8 +#define MCI_FORMAT_SAMPLES 9 +#define MCI_FORMAT_TMSF 10 + +/* MCI time format conversion macros */ +#define MCI_MSF_MINUTE(msf) ((BYTE)(msf)) +#define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8)) +#define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16)) + +#define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \ + ((WORD)(s)<<8)) | \ + (((DWORD)(BYTE)(f))<<16))) + +#define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf)) +#define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8)) +#define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16)) +#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24)) + +#define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s) | \ + ((WORD)(f)<<8))<<16))) + +#define MCI_HMS_HOUR(hms) ((BYTE)(hms)) +#define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8)) +#define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16)) + +#define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s))<<16))) + + +/* flags for wParam of MM_MCINOTIFY message */ +#define MCI_NOTIFY_SUCCESSFUL 0x0001 +#define MCI_NOTIFY_SUPERSEDED 0x0002 +#define MCI_NOTIFY_ABORTED 0x0004 +#define MCI_NOTIFY_FAILURE 0x0008 + + +/* common flags for dwFlags parameter of MCI command messages */ +#define MCI_NOTIFY 0x00000001L +#define MCI_WAIT 0x00000002L +#define MCI_FROM 0x00000004L +#define MCI_TO 0x00000008L +#define MCI_TRACK 0x00000010L + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OPEN_SHAREABLE 0x00000100L +#define MCI_OPEN_ELEMENT 0x00000200L +#define MCI_OPEN_ALIAS 0x00000400L +#define MCI_OPEN_ELEMENT_ID 0x00000800L +#define MCI_OPEN_TYPE_ID 0x00001000L +#define MCI_OPEN_TYPE 0x00002000L + +/* flags for dwFlags parameter of MCI_SEEK command message */ +#define MCI_SEEK_TO_START 0x00000100L +#define MCI_SEEK_TO_END 0x00000200L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_STATUS_ITEM 0x00000100L +#define MCI_STATUS_START 0x00000200L + +/* flags for dwItem field of the MCI_STATUS_PARMS parameter block */ +#define MCI_STATUS_LENGTH 0x00000001L +#define MCI_STATUS_POSITION 0x00000002L +#define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L +#define MCI_STATUS_MODE 0x00000004L +#define MCI_STATUS_MEDIA_PRESENT 0x00000005L +#define MCI_STATUS_TIME_FORMAT 0x00000006L +#define MCI_STATUS_READY 0x00000007L +#define MCI_STATUS_CURRENT_TRACK 0x00000008L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_INFO_PRODUCT 0x00000100L +#define MCI_INFO_FILE 0x00000200L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_GETDEVCAPS_ITEM 0x00000100L + +/* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L +#define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L +#define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L +#define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L +#define MCI_GETDEVCAPS_USES_FILES 0x00000005L +#define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L +#define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L +#define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L +#define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L + +/* flags for dwFlags parameter of MCI_SYSINFO command message */ +#define MCI_SYSINFO_QUANTITY 0x00000100L +#define MCI_SYSINFO_OPEN 0x00000200L +#define MCI_SYSINFO_NAME 0x00000400L +#define MCI_SYSINFO_INSTALLNAME 0x00000800L + +/* flags for dwFlags parameter of MCI_SET command message */ +#define MCI_SET_DOOR_OPEN 0x00000100L +#define MCI_SET_DOOR_CLOSED 0x00000200L +#define MCI_SET_TIME_FORMAT 0x00000400L +#define MCI_SET_AUDIO 0x00000800L +#define MCI_SET_VIDEO 0x00001000L +#define MCI_SET_ON 0x00002000L +#define MCI_SET_OFF 0x00004000L + +/* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */ +#define MCI_SET_AUDIO_ALL 0x00000000L +#define MCI_SET_AUDIO_LEFT 0x00000001L +#define MCI_SET_AUDIO_RIGHT 0x00000002L + +/* flags for dwFlags parameter of MCI_BREAK command message */ +#define MCI_BREAK_KEY 0x00000100L +#define MCI_BREAK_HWND 0x00000200L +#define MCI_BREAK_OFF 0x00000400L + +/* flags for dwFlags parameter of MCI_RECORD command message */ +#define MCI_RECORD_INSERT 0x00000100L +#define MCI_RECORD_OVERWRITE 0x00000200L + +/* flags for dwFlags parameter of MCI_SOUND command message */ +#define MCI_SOUND_NAME 0x00000100L + +/* flags for dwFlags parameter of MCI_SAVE command message */ +#define MCI_SAVE_FILE 0x00000100L + +/* flags for dwFlags parameter of MCI_LOAD command message */ +#define MCI_LOAD_FILE 0x00000100L + +/* generic parameter block for MCI command messages with no special parameters */ +typedef struct tagMCI_GENERIC_PARMS { + DWORD dwCallback; +} MCI_GENERIC_PARMS; +typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS; + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; +} MCI_OPEN_PARMS; +typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_PLAY_PARMS; +typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS; + +/* parameter block for MCI_SEEK command message */ +typedef struct tagMCI_SEEK_PARMS { + DWORD dwCallback; + DWORD dwTo; +} MCI_SEEK_PARMS; +typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS; + +/* parameter block for MCI_STATUS command message */ +typedef struct tagMCI_STATUS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; + DWORD dwTrack; +} MCI_STATUS_PARMS; +typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS; + +/* parameter block for MCI_INFO command message */ +typedef struct tagMCI_INFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; +} MCI_INFO_PARMS; +typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS; + +/* parameter block for MCI_GETDEVCAPS command message */ +typedef struct tagMCI_GETDEVCAPS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; +} MCI_GETDEVCAPS_PARMS; +typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS; + +/* parameter block for MCI_SYSINFO command message */ +typedef struct tagMCI_SYSINFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; + DWORD dwNumber; + UINT wDeviceType; + UINT wReserved0; +} MCI_SYSINFO_PARMS; +typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; +} MCI_SET_PARMS; +typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS; + +/* parameter block for MCI_BREAK command message */ +typedef struct tagMCI_BREAK_PARMS { + DWORD dwCallback; + int nVirtKey; + UINT wReserved0; + HWND hwndBreak; + UINT wReserved1; +} MCI_BREAK_PARMS; +typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS; + +/* parameter block for MCI_SOUND command message */ +typedef struct tagMCI_SOUND_PARMS { + DWORD dwCallback; + LPCSTR lpstrSoundName; +} MCI_SOUND_PARMS; +typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_SAVE_PARMS; +typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_LOAD_PARMS; +typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS; + +/* parameter block for MCI_RECORD command message */ +typedef struct tagMCI_RECORD_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_RECORD_PARMS; +typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS; + + +/* MCI extensions for videodisc devices */ + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */ +#define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1) + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */ +#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2) +#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3) +#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4) + +#define MCI_VD_FORMAT_TRACK 0x4001 + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_VD_PLAY_REVERSE 0x00010000L +#define MCI_VD_PLAY_FAST 0x00020000L +#define MCI_VD_PLAY_SPEED 0x00040000L +#define MCI_VD_PLAY_SCAN 0x00080000L +#define MCI_VD_PLAY_SLOW 0x00100000L + +/* flag for dwFlags parameter of MCI_SEEK command message */ +#define MCI_VD_SEEK_REVERSE 0x00010000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_VD_STATUS_SPEED 0x00004002L +#define MCI_VD_STATUS_FORWARD 0x00004003L +#define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L +#define MCI_VD_STATUS_SIDE 0x00004005L +#define MCI_VD_STATUS_DISC_SIZE 0x00004006L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_VD_GETDEVCAPS_CLV 0x00010000L +#define MCI_VD_GETDEVCAPS_CAV 0x00020000L + +#define MCI_VD_SPIN_UP 0x00010000L +#define MCI_VD_SPIN_DOWN 0x00020000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L +#define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L +#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L +#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L + +/* flags for the dwFlags parameter of MCI_STEP command message */ +#define MCI_VD_STEP_FRAMES 0x00010000L +#define MCI_VD_STEP_REVERSE 0x00020000L + +/* flag for the MCI_ESCAPE command message */ +#define MCI_VD_ESCAPE_STRING 0x00000100L + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_VD_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; + } MCI_VD_PLAY_PARMS; +typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_VD_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_VD_STEP_PARMS; +typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS; + +/* parameter block for MCI_ESCAPE command message */ +typedef struct tagMCI_VD_ESCAPE_PARMS { + DWORD dwCallback; + LPCSTR lpstrCommand; +} MCI_VD_ESCAPE_PARMS; +typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS; + + +/* MCI extensions for waveform audio devices */ + +/* flags for the dwFlags parameter of MCI_OPEN command message */ +#define MCI_WAVE_OPEN_BUFFER 0x00010000L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_FORMATTAG 0x00010000L +#define MCI_WAVE_SET_CHANNELS 0x00020000L +#define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L +#define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L +#define MCI_WAVE_SET_BLOCKALIGN 0x00100000L +#define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L + +/* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */ +#define MCI_WAVE_INPUT 0x00400000L +#define MCI_WAVE_OUTPUT 0x00800000L + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_WAVE_STATUS_FORMATTAG 0x00004001L +#define MCI_WAVE_STATUS_CHANNELS 0x00004002L +#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L +#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L +#define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L +#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L +#define MCI_WAVE_STATUS_LEVEL 0x00004007L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_ANYINPUT 0x04000000L +#define MCI_WAVE_SET_ANYOUTPUT 0x08000000L + +/* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L +#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_WAVE_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwBufferSeconds; +} MCI_WAVE_OPEN_PARMS; +typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS; + +/* parameter block for MCI_DELETE command message */ +typedef struct tagMCI_WAVE_DELETE_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_WAVE_DELETE_PARMS; +typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_WAVE_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + UINT wInput; + UINT wReserved0; + UINT wOutput; + UINT wReserved1; + UINT wFormatTag; + UINT wReserved2; + UINT nChannels; + UINT wReserved3; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + UINT nBlockAlign; + UINT wReserved4; + UINT wBitsPerSample; + UINT wReserved5; +} MCI_WAVE_SET_PARMS; +typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS; + + +/* MCI extensions for MIDI sequencer devices */ + +/* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */ +/* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */ +#define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET) + +/* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */ +/* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */ +#define MCI_SEQ_FORMAT_SONGPTR 0x4001 +#define MCI_SEQ_FILE 0x4002 +#define MCI_SEQ_MIDI 0x4003 +#define MCI_SEQ_SMPTE 0x4004 +#define MCI_SEQ_NONE 65533 + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_SEQ_STATUS_TEMPO 0x00004002L +#define MCI_SEQ_STATUS_PORT 0x00004003L +#define MCI_SEQ_STATUS_SLAVE 0x00004007L +#define MCI_SEQ_STATUS_MASTER 0x00004008L +#define MCI_SEQ_STATUS_OFFSET 0x00004009L +#define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_SEQ_SET_TEMPO 0x00010000L +#define MCI_SEQ_SET_PORT 0x00020000L +#define MCI_SEQ_SET_SLAVE 0x00040000L +#define MCI_SEQ_SET_MASTER 0x00080000L +#define MCI_SEQ_SET_OFFSET 0x01000000L + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SEQ_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + DWORD dwTempo; + DWORD dwPort; + DWORD dwSlave; + DWORD dwMaster; + DWORD dwOffset; +} MCI_SEQ_SET_PARMS; +typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS; + + +/* MCI extensions for animation devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_ANIM_OPEN_WS 0x00010000L +#define MCI_ANIM_OPEN_PARENT 0x00020000L +#define MCI_ANIM_OPEN_NOSTATIC 0x00040000L + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_ANIM_PLAY_SPEED 0x00010000L +#define MCI_ANIM_PLAY_REVERSE 0x00020000L +#define MCI_ANIM_PLAY_FAST 0x00040000L +#define MCI_ANIM_PLAY_SLOW 0x00080000L +#define MCI_ANIM_PLAY_SCAN 0x00100000L + +/* flags for dwFlags parameter of MCI_STEP command message */ +#define MCI_ANIM_STEP_REVERSE 0x00010000L +#define MCI_ANIM_STEP_FRAMES 0x00020000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_ANIM_STATUS_SPEED 0x00004001L +#define MCI_ANIM_STATUS_FORWARD 0x00004002L +#define MCI_ANIM_STATUS_HWND 0x00004003L +#define MCI_ANIM_STATUS_HPAL 0x00004004L +#define MCI_ANIM_STATUS_STRETCH 0x00004005L + +/* flags for the dwFlags parameter of MCI_INFO command message */ +#define MCI_ANIM_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L +#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L +#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L +#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L +#define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L +#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L +#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L + +/* flags for the MCI_REALIZE command message */ +#define MCI_ANIM_REALIZE_NORM 0x00010000L +#define MCI_ANIM_REALIZE_BKGD 0x00020000L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_ANIM_WINDOW_HWND 0x00010000L +#define MCI_ANIM_WINDOW_STATE 0x00040000L +#define MCI_ANIM_WINDOW_TEXT 0x00080000L +#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */ +/* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */ +#define MCI_ANIM_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_ANIM_RECT 0x00010000L +#define MCI_ANIM_PUT_SOURCE 0x00020000L +#define MCI_ANIM_PUT_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_ANIM_WHERE_SOURCE 0x00020000L +#define MCI_ANIM_WHERE_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_UPDATE command message */ +#define MCI_ANIM_UPDATE_HDC 0x00020000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_ANIM_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; +} MCI_ANIM_OPEN_PARMS; +typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_ANIM_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; +} MCI_ANIM_PLAY_PARMS; +typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_ANIM_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_ANIM_STEP_PARMS; +typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_ANIM_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_ANIM_WINDOW_PARMS; +typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */ +typedef struct tagMCI_ANIM_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_ANIM_RECT_PARMS; +typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS; + +/* parameter block for MCI_UPDATE PARMS */ +typedef struct tagMCI_ANIM_UPDATE_PARMS { + DWORD dwCallback; + RECT rc; + HDC hDC; +} MCI_ANIM_UPDATE_PARMS; +typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS; + + +/* MCI extensions for video overlay devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OVLY_OPEN_WS 0x00010000L +#define MCI_OVLY_OPEN_PARENT 0x00020000L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_OVLY_STATUS_HWND 0x00004001L +#define MCI_OVLY_STATUS_STRETCH 0x00004002L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_OVLY_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L +#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L +#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_OVLY_WINDOW_HWND 0x00010000L +#define MCI_OVLY_WINDOW_STATE 0x00040000L +#define MCI_OVLY_WINDOW_TEXT 0x00080000L +#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */ +#define MCI_OVLY_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_OVLY_RECT 0x00010000L +#define MCI_OVLY_PUT_SOURCE 0x00020000L +#define MCI_OVLY_PUT_DESTINATION 0x00040000L +#define MCI_OVLY_PUT_FRAME 0x00080000L +#define MCI_OVLY_PUT_VIDEO 0x00100000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_OVLY_WHERE_SOURCE 0x00020000L +#define MCI_OVLY_WHERE_DESTINATION 0x00040000L +#define MCI_OVLY_WHERE_FRAME 0x00080000L +#define MCI_OVLY_WHERE_VIDEO 0x00100000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OVLY_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; + } MCI_OVLY_OPEN_PARMS; +typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_OVLY_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_OVLY_WINDOW_PARMS; +typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */ +typedef struct tagMCI_OVLY_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_OVLY_RECT_PARMS; +typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_OVLY_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_SAVE_PARMS; +typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_OVLY_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_LOAD_PARMS; +typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS; + +#endif /* ifndef MMNOMCI */ + +/**************************************************************************** + + DISPLAY Driver extensions + +****************************************************************************/ + +#ifndef C1_TRANSPARENT + #define CAPS1 94 /* other caps */ + #define C1_TRANSPARENT 0x0001 /* new raster cap */ + #define NEWTRANSPARENT 3 /* use with SetBkMode() */ + + #define QUERYROPSUPPORT 40 /* use to determine ROP support */ +#endif /* ifndef C1_TRANSPARENT */ + +/**************************************************************************** + + DIB Driver extensions + +****************************************************************************/ + +#define SELECTDIB 41 /* DIB.DRV select dib escape */ +#define DIBINDEX(n) MAKELONG((n),0x10FF) + + +/**************************************************************************** + + ScreenSaver support + + The current application will receive a syscommand of SC_SCREENSAVE just + before the screen saver is invoked. If the app wishes to prevent a + screen save, return non-zero value, otherwise call DefWindowProc(). + +****************************************************************************/ + +#ifndef SC_SCREENSAVE + + #define SC_SCREENSAVE 0xF140 + +#endif /* ifndef SC_SCREENSAVE */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif + +#endif /* _INC_MMSYSTEM */ diff --git a/private/oleauto/tools/win16/os2/inc/mstest.inc b/private/oleauto/tools/win16/os2/inc/mstest.inc new file mode 100644 index 000000000..88a383fe4 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/mstest.inc @@ -0,0 +1,896 @@ +'---------------------------------------------------------------------------- +' +' MSTEST.INC -- API Declarations for TEST Tools +' +' To include the various portions of this file, any combination of the +' following $DEFINE's must be used in your script prior to $INCLUDEing +' MSTEST.INC: +' +' MSTEST: includes all of MSTEST.INC +' +' TESTCTRL: includes all of TESTCTRL +' W_WINDOW +' W_MENU +' W_ERROR +' W_CONTROL: includes all of the control declares & routines +' W_BUTTON +' W_CHECK +' W_OPTION +' W_EDIT +' W_LIST +' W_COMBO +' +' TESTSCRN: includes all of TESTSCRN, Declares & Error codes +' TESTSCRN_DECL: includes all SCR Declares +' TESTSCRN_ERRS: includes all SCR Error codes +' +' TESTDLGS: includes all of TESTDLGS, Declares & Error codes +' TESTDLGS_DECL: includes all DLGS Declares +' TESTDLGS_ERRS: includes all DLGS Error codes +' +' TESTEVNT: includes all TESTEVNT Declares +' +' +' NOTE: Including MSTEST.INC without out using any of the above $DEFINE's will +' include only TESTDRVR.EXE trappable and untrappable error codes, +' and declares for CRLF, TRUE (-1), FALSE(0), Key values for +' DoKeys() from TESTEVNT and few routines from TESTCtrl. +' +'---------------------------------------------------------------------------- +' +' Copyright (C) 1991 Microsoft Corporation +' +' You have a royalty-free right to use, modify, reproduce and distribute +' this file (and/or any modified version) in any way you find useful, +' provided that you agree that Microsoft has no warranty, obligation or +' liability for its contents. Refer to the Microsoft Windows Programmer's +' Reference for further information. +' +' This file is not garanteed by Microsoft to be error free. Every effort +' has been made to ensure proper data-types and declarations etc., but no +' testing has been performed using this include file. Additionally, some +' API's, though listed, may not be compatible with the TESTDrvr language. +' +'---------------------------------------------------------------------------- +' +' Copyright Microsoft Corporation 1990-1991 +' +'---------------------------------------------------------------------------- + +' ********************* +'$IFNDEF MSTEST_INCLUDED +'$DEFINE MSTEST_INCLUDED +' ********************* + +'---------------------------------------------------------------------------- +' Generic Global Variables +'---------------------------------------------------------------------------- +Global CRLF As String +CRLF = Chr$(13) + Chr$(10) + +Const TRUE = -1 +Const FALSE = 0 + + +'---------------------------------------------------------------------------- +' Unrecoverable TESTDRVR error codes +'---------------------------------------------------------------------------- +Const ERR_STACK_OVERFLOW = 0 +Const ERR_STACK_UNDERFLOW = 1 +Const ERR_OUT_OF_STRING_SPACE = 2 +Const ERR_CANT_LOAD_TESTVIEW_DLL = 3 +Const ERR_OUT_OF_MEMORY = 4 + + +'---------------------------------------------------------------------------- +' Recoverable TESTDRVR error codes +'---------------------------------------------------------------------------- +Const ERR_GOSUB_STACK_OVERFLOW = 5 +Const ERR_RETURN_WITHOUT_GOSUB = 6 +Const ERR_BAD_FILE_NUMBER = 7 +Const ERR_FILE_IO = 8 +Const ERR_RUN_CMD_TOO_LONG = 9 +Const ERR_SHELL_CMD_TOO_LONG = 10 +Const ERR_SETFILE = 11 +Const ERR_FILE_NUMBER_IN_USE = 12 +Const ERR_CANT_OPEN_FILE = 13 +Const ERR_ILLEGAL_FUNCTION_CALL = 14 +Const ERR_INVALID_PATH = 15 +Const ERR_INVALID_DRIVE = 16 +Const ERR_NO_CURRENT_WORKING_DIR = 17 +Const ERR_BAD_RUN_CMD = 18 +Const ERR_DIVISION_BY_ZERO = 19 +Const ERR_CANT_LOAD_DLL = 20 +Const ERR_PROC_NOT_FOUND_IN_DLL = 21 +Const ERR_CANNOT_RESUME = 22 +Const ERR_MEM_ALLOC = 23 +Const ERR_INVALID_POINTER = 24 +Const ERR_INVALID_ALLOC_SIZE = 25 +Const ERR_NULL_PIONTER_REF = 26 +Const ERR_SUBSCRIPT_RANGE = 27 +Const ERR_INPUT_PAST_EOF = 28 + +'---------------------------------------------------------------------------- +' Key contants used with WKey, PlayKeys, & PlayKeyshWnd +'---------------------------------------------------------------------------- +Const K_ENTER = "{ENTER}" +Const K_ESC = "{ESC}" +Const K_UP = "{UP}" +Const K_DOWN = "{DOWN}" +Const K_LEFT = "{LEFT}" +Const K_RIGHT = "{RIGHT}" +Const K_END = "{END}" +Const K_PGUP = "{PGUP}" +Const K_PGDN = "{PGDN}" +Const K_INSERT = "{INSERT}" +Const K_DELETE = "{DELETE}" +Const K_HOME = "{HOME}" +Const K_TAB = "{TAB}" +Const K_BS = "{BS}" +Const K_F1 = "{F1}" +Const K_F2 = "{F2}" +Const K_F3 = "{F3}" +Const K_F4 = "{F4}" +Const K_F5 = "{F5}" +Const K_F6 = "{F6}" +Const K_F7 = "{F7}" +Const K_F8 = "{F8}" +Const K_F9 = "{F9}" +Const K_F10 = "{F10}" +Const K_F11 = "{F11}" +Const K_F12 = "{F12}" +Const K_F13 = "{F13}" +Const K_F14 = "{F14}" +Const K_F15 = "{F15}" +Const K_F16 = "{F16}" +Const K_SHIFT = "+" +Const K_CTRL = "^" +Const K_ALT = "%" + + +'---------------------------------------------------------------------------- +' Routines, types and Constants from TESTCTRL.DLL that are always included. +'---------------------------------------------------------------------------- +Const MAX_CAPTION = 128 + +Type INFO + hWnd As Integer + hWndParent As Integer + szClass As String * MAX_CAPTION + szCaption As String * MAX_CAPTION + szParentClass As String * MAX_CAPTION + szParentCaption As String * MAX_CAPTION + szModuleName As String * MAX_CAPTION + lStyle As Long + fChild As Integer + wID As Integer + left As Integer + top As Integer + right As Integer + bottom As Integer + width As Integer + height As Integer +End Type + +Declare Function WGetActWnd Lib "TESTCtrl.dll" (hWnd%) As Integer +Declare Function WFndWnd Lib "TESTCtrl.dll" (lpszCaption$, wFlags%) As Integer +Declare Function WFndWndC Lib "TESTCtrl.dll" (lpszText$, lpszClass$, wFlags%) As Integer +Declare Sub WDisplayInfo Lib "TESTCtrl.dll" (hWnd%, wDisplay%) +Declare Sub WGetInfo Lib "TESTCtrl.dll" (hWnd%, lpInfo As INFO) + +Const FW_DEFAULT = &h0000 +Const FW_ACTIVE = &h0008 +Const FW_ALL = &h0000 +Const FW_CASE = &h0004 +Const FW_NOCASE = &h0000 +Const FW_PART = &h0002 +Const FW_FULL = &h0000 +Const FW_FOCUS = &h0001 +Const FW_NOFOCUS = &h0000 + +Const DI_DIALOG = 1 +Const DI_DEBUG = 2 +Const DI_BOTH = 3 + + +Declare Sub DoKeys Lib "TESTEvnt.Dll" (lpStr$) + +' ********************* +'$ENDIF +' ********************* + +'---------------------------------------------------------------------------- +' DEFINE's that control the inclusion of the remainder of MSTEST.INC +'---------------------------------------------------------------------------- +'$IFDEF MSTEST + '$DEFINE TESTCTRL + '$DEFINE TESTSCRN + '$DEFINE TESTDLGS + '$DEFINE TESTEVNT +'$ENDIF + +'$IFDEF TESTCTRL + '$DEFINE W_WINDOW + '$DEFINE W_MENU + '$DEFINE W_ERROR + '$DEFINE W_CONTROL +'$ENDIF + +'$IFDEF W_CONTROL + '$DEFINE W_BUTTON + '$DEFINE W_CHECK + '$DEFINE W_OPTION + '$DEFINE W_EDIT + '$DEFINE W_LIST + '$DEFINE W_COMBO +'$ENDIF + +'$IFDEF TESTSCRN + '$DEFINE TESTSCRN_DECL + '$DEFINE TESTSCRN_ERRS +'$ENDIF + +'$IFDEF TESTDLGS + '$DEFINE TESTDLGS_DECL + '$DEFINE TESTDLGS_ERRS +'$ENDIF + +'$IFDEF W_BUTTON OR W_CHECK OR W_OPTION OR W_EDIT OR W_LIST OR W_COMBO + '$DEFINE W_A_CONTROL +'$ENDIF + + +' ********************* +'$IFDEF TESTEVNT AND NOT TESTEVNT_INCLUDED +' ********************* + +'---------------------------------------------------------------------------- +' TESTEvnt.DLL: +' Function declarations for use with TESTEvnt +'---------------------------------------------------------------------------- +'Declare Sub DoKeys Lib "TESTEvnt.Dll" (lpStr$) +Declare Sub QueKeys Lib "TESTEvnt.Dll" (lpStr$) +Declare Sub QueKeyDn Lib "TESTEvnt.Dll" (lpStr$) +Declare Sub QueKeyUp Lib "TESTEvnt.Dll" (lpStr$) +Declare Sub QueSetSpeed Lib "TESTEvnt.Dll" (ms%) +Declare Sub QueFlush Lib "TESTEvnt.Dll" (fRestoreKeyState%) +Declare Sub QueEmpty Lib "TESTEvnt.Dll" () +Declare Sub QueMouseMove Lib "TESTEvnt.Dll" (x%, y%) +Declare Sub QueMouseDn Lib "TESTEvnt.Dll" (iBtn%, x%, y%) +Declare Sub QueMouseUp Lib "TESTEvnt.Dll" (iBtn%, x%, y%) +Declare Sub QueMouseClick Lib "TESTEvnt.Dll" (iBtn%, x%, y%) +Declare Sub QueMouseDblClk Lib "TESTEvnt.Dll" (iBtn%, x%, y%) +Declare Sub QueMouseDblDn Lib "TESTEvnt.Dll" (iBtn%, x%, y%) +Declare Sub QueSetFocus Lib "TESTEvnt.Dll" (hwnd%) +Declare Sub QueSetRelativeWindow Lib "TESTEvnt.Dll" (hwnd%) + +Const VK_LBUTTON = 1 +Const VK_RBUTTON = 2 +Const VK_MBUTTON = 4 + +' ********************* +'$DEFINE TESTEVNT_INCLUDED +'$ENDIF +'$IFDEF TESTSCRN_DECL AND NOT TESTSCRN_DECL_INCLUDED +' ********************* + + +'---------------------------------------------------------------------------- +' TESTScrn.DLL: +' Type, Const, and Function declarations for use with TESTScrn +'---------------------------------------------------------------------------- +Type wRect + x1 As Integer + y1 As Integer + x2 As Integer + y2 As Integer +End Type + +Const SCRNAPPEND = 0 +Const SCRNREPLACE = 1 +Const SCRNINSERT = 2 + +'*** TESTSCRN.DLL Routines +' +Declare Function fCompFiles Lib "TESTScrn.DLL" (lpszFileName1$, Scr1%, lpszFileName2$, Scr2%, CompareType%) As Integer +Declare Function fCompScreen Lib "TESTScrn.DLL" (lpszFileName$, lpRect As wRect, Scr1%, Hide%, Flag%) As Integer +Declare Function fCompWindow Lib "TESTScrn.DLL" (lpszFileName$, hWnd%, Scr1%, Hide%, Flag%) As Integer +Declare Function fDelScreen Lib "TESTScrn.DLL" (lpszFileName$, Scr%) As Integer +Declare Function fDumpFileToClip Lib "TESTScrn.DLL" (lpszFileName$, Scr%) As Integer +Declare Function fDumpScreen Lib "TESTScrn.DLL" (lpszFileName$, lpRect As wRect, Action%, Scr1%, Flag%) As Integer +Declare Function fDumpSrnToClip Lib "TESTScrn.DLL" (lpRect As wRect, Hide%) As Integer +Declare Function fDumpWindow Lib "TESTScrn.DLL" (lpszFileName$, wHnd%, Action%, Scr1%, Flag%) As Integer +Declare Function fDumpWndToClip Lib "TESTScrn.DLL" (hWnd%, Hide%) As Integer +Declare Function fFileInfo Lib "TESTScrn.DLL" (lpszFileName$, Rectangle&, VideoMode%, ScreenNum%) As Integer +Declare Function fGetDLLVersion Lib "TESTScrn.DLL" (lpszFileName$) As Integer +Declare Function fGetMaxScreen Lib "TESTScrn.DLL" (lpszFileName$) As Integer +Declare Function fGetOS Lib "TESTScrn.DLL" (lpszFileName$) As Integer +Declare Function fSaveFileToDIB Lib "TESTScrn.DLL" (lpszFileName1$, Scr%, lpszFileName2$) As Integer +Declare Function fSaveSrnToDIB Lib "TESTScrn.DLL" (lpszFileName$, lpRect As wRect, Hide%) As Integer +Declare Function fSaveWndToDIB Lib "TESTScrn.DLL" (lpszFileName$, hWnd%, Hide%) As Integer +Declare Function fViewScreen Lib "TESTScrn.DLL" (lpszFileName$, hWnd%, Scr1%, Action%) As Integer + + +' ********************* +'$DEFINE TESTSCRN_DECL_INCLUDED +'$ENDIF +'$IFDEF TESTSCRN_ERRS AND NOT TESTSCRN_ERRS_INCLUDED +' ********************* + + +'*** TESTScrn.DLL Error Codes +' +Const ERR_SCR_NOERROR = 0 +Const ERR_SCR_FILEACCESS = 301 +Const ERR_SCR_INVALIDFIL = 302 +Const ERR_SCR_INVALSRNID = 303 +Const ERR_SCR_INVALSRNMD = 304 +Const ERR_SCR_OUTOMEMORY = 305 +Const ERR_SCR_READSRNFIL = 306 +Const ERR_SCR_RELMEMORY = 307 +Const ERR_SCR_CREATEDDB = 308 +Const ERR_SCR_RWSRNTABLE = 309 +Const ERR_SCR_RWCOLTABLE = 310 +Const ERR_SCR_WSRNIMAGE = 311 +Const ERR_SCR_WFILEHEAD = 312 +Const ERR_SCR_CREATEDIB = 313 +Const ERR_SCR_SCREENSIZE = 314 +Const ERR_SCR_DISPSCREEN = 315 +Const ERR_SCR_INVALIDACT = 316 +Const ERR_SCR_IMAGEDIFF = 317 +Const ERR_SCR_SRNSIZEDIF = 318 +Const ERR_SCR_FILEEXIST = 319 +Const ERR_SCR_CTEMPFILE = 320 +Const ERR_SCR_HIDEWIN = 321 +Const ERR_SCR_INVALWHAND = 322 +Const ERR_SCR_OFILEFORM = 323 +Const ERR_SCR_SRNFILEFUL = 324 +Const ERR_SCR_INVALSCALE = 325 +Const ERR_SCR_OPENCB = 326 +Const ERR_SCR_EMPTYCB = 327 +Const ERR_SCR_COPYTOCB = 328 +Const ERR_SCR_CLOSECB = 329 +Const ERR_SCR_CREATEPAL = 330 + + +' ********************* +'$DEFINE TESTSCRN_ERRS_INCLUDED +'$ENDIF +'$IFDEF TESTDLGS_DECL AND NOT TESTDLGS_DECL_INCLUDED +' ********************* + + +'---------------------------------------------------------------------------- +' TESTDlgs.DLL: +' Type, Const, and Function declarations for use with TESTDlgs +'---------------------------------------------------------------------------- +Const cchCLASSMAC = 32 +Const cchTEXTMAC = 256 +Const wVEREB = 1 + +Type DCR + xLeft As Integer + yMin As Integer + xRight As Integer + yLast As Integer +End Type + +Type CtlDef + rgText As String * cchTEXTMAC + rgClass As String * cchCLASSMAC + nState As Integer + fFlags As String * 1 + dcrect As DCR +End Type + +Declare Function AwaitSaveCompletion Lib "TESTDlgs.DLL" () As Integer +Declare Function ComparisonResults Lib "TESTDlgs.DLL" () As Integer +Declare Function CmpWindow Lib "TESTDlgs.DLL" (hWnd%, nDialog%, fIncludeParent%) As Integer +Declare Function CmpWindowActivate Lib "TESTDlgs.DLL" (lpszOpenKeys$, lpszCloseKey$, nDialog%, fIncludeParent%) As Integer +Declare Function CmpWindowCaption Lib "TESTDlgs.DLL" (lpszCap$, nDialog%, fIncludeParent%) As Integer +Declare Function CmpWindowDelayed Lib "TESTDlgs.DLL" (nDelay%, nDialog%, fIncludeParent%, lpszCloseKeys$) As Integer +Declare Function DynAdd Lib "TESTDlgs.DLL" (lpCtl As CtlDef) As Integer +Declare Function DynCreate Lib "TESTDlgs.DLL" () As Integer +Declare Function DynDelete Lib "TESTDlgs.DLL" (nCtlNum%) As Integer +Declare Sub DynDestroy Lib "TESTDlgs.DLL" () +Declare Function DynFullDialog Lib "TESTDlgs.DLL" (fFull%) As Integer +Declare Function DynReplace Lib "TESTDlgs.DLL" (lpCtl As CtlDef, nCtlNum%) As Integer +Declare Function FindWindowCaption Lib "TESTDlgs.DLL" (lpszCap$, hWndStart%) As Integer +Declare Function MaxDialogs Lib "TESTDlgs.DLL" () As Integer +Declare Function SaveMenu Lib "TESTDlgs.DLL" (hWnd%, nDialog%, lpszDesc$, fReplace%) As Integer +Declare Function SaveMenuActivate Lib "TESTDlgs.DLL" (lpszOpenKeys$, lpszCloseKeys$, nDialog%, lpszDesc$, fReplace%) As Integer +Declare Function SaveMenuCaption Lib "TESTDlgs.DLL" (lpszCap$, nDialog%, lpszDesc$, fReplace%) As Integer +Declare Function SaveMenuDelayed Lib "TESTDlgs.DLL" (nDelay%, nDialog%, lpszDesc$, fReplace%, CloseKeys$) As Integer +Declare Function SaveWindow Lib "TESTDlgs.DLL" (hWnd%, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer +Declare Function SaveWindowActivate Lib "TESTDlgs.DLL" (lpszOpenKeys$, lpszCloseKeys$, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer +Declare Function SaveWindowCaption Lib "TESTDlgs.DLL" (lpszCap%, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer +Declare Function SaveWindowDelayed Lib "TESTDlgs.DLL" (nDelay%, nDialog%, lpszDesc$, fReplace%, fIncludeParent%, lpszCloseKeys$) As Integer +Declare Function SetDialogFile Lib "TESTDlgs.DLL" (lpszDialogName$) As Integer +Declare Function SetLogFile Lib "TESTDlgs.DLL" (lpszLogName$) As Integer +Declare Function TESTDlgsInit Lib "TESTDlgs.DLL" () As Integer + + +' ********************* +'$DEFINE TESTDLGS_DECL_INCLUDED +'$ENDIF +'$IFDEF TESTDLGS_ERRS AND NOT TESTDLGS_ERRS_INCLUDED +' ********************* + + +'*** Function return codes +' +Const ERR_DLGS_NOERR = 0 +Const ERR_DLGS_FUZZY = -1 +Const ERR_DLGS_EXCESS = -2 +Const ERR_DLGS_CTLNOTFOUND = -3 +Const ERR_DLGS_NODLGFILE = -10 +Const ERR_DLGS_FILENOTFOUND = -11 +Const ERR_DLGS_BADWDLFILE = -12 +Const ERR_DLGS_LIBLOADERR = -13 +Const ERR_DLGS_SAVEERR = -14 +Const ERR_DLGS_DLGFILEERR = -15 +Const ERR_DLGS_TMPFILEERR = -16 +Const ERR_DLGS_VERSIONERR = -17 +Const ERR_DLGS_DLGFILEFULL = -18 +Const ERR_DLGS_OUTOFMEMORY = -20 +Const ERR_DLGS_BUFFERERR = -21 +Const ERR_DLGS_NOTIMER = -22 +Const ERR_DLGS_NODYNDIALOG = -30 +Const ERR_DLGS_INVALIDHWND = -31 +Const ERR_DLGS_BADCAPTION = -32 +Const ERR_DLGS_BADDLGNUM = -33 +Const ERR_DLGS_BADCTLINDEX = -34 +Const ERR_DLGS_BADCTLTYPE = -35 +Const ERR_DLGS_BADSAVEACTION = -36 +Const ERR_DLGS_APPSPECIFIC = -37 + + +' ********************* +'$DEFINE TESTDLGS_ERRS_INCLUDED +'$ENDIF +'$IFDEF W_WINDOW AND NOT W_WINDOW_INCLUDED +' ********************* + +'---------------------------------------------------------------------------- +' TESTCtrl.dll routines, types, & constants +'---------------------------------------------------------------------------- + +'*** Window size and position types +' +Type WNDPOS + left As Integer + top As Integer +End Type + +Type WNDSIZ + width As Integer + height As Integer +End Type + +Type WNDPOSSIZ + left As Integer + top As Integer + width As Integer + height As Integer +End Type + +'*** Window Positioning and Sizing routines & contants +' +Declare Sub WMinWnd Lib "TESTCtrl.dll" (hWnd%) +Declare Sub WMaxWnd Lib "TESTCtrl.dll" (hWnd%) +Declare Sub WResWnd Lib "TESTCtrl.dll" (hWnd%) +Declare Sub WSetWndPos Lib "TESTCtrl.dll" (hWnd%, left%, top%) +Declare Sub WSetWndSiz Lib "TESTCtrl.dll" (hWnd%, width%, height%) +Declare Sub WSetWndPosSiz Lib "TESTCtrl.dll" (hWnd%, left%, top%, width%, height%) +Declare Sub WAdjWndPos Lib "TESTCtrl.dll" (hWnd%, deltaLeft%, deltaTop%) +Declare Sub WAdjWndSiz Lib "TESTCtrl.dll" (hWnd%, deltaWidth%, deltaHeight%) +Declare Sub WAdjWndPosSiz Lib "TESTCtrl.dll" (hWnd%, deltaLeft%, deltaTop%, deltaWidth%, deltaHeight%) +Declare Sub WGetWndPos Lib "TESTCtrl.dll" (hWnd%, lpWndPos As WNDPOS, fRelative%) +Declare Sub WGetWndSiz Lib "TESTCtrl.dll" (hWnd%, lpWndSiz As WNDSIZ) +Declare Sub WGetWndPosSiz Lib "TESTCtrl.dll" (hWnd%, lpWndPosSiz As WNDPOSSIZ, fRelative%) + +Const RELATIVE = TRUE +Const ABSOLUTE = FALSE + + +' ********************* +'$DEFINE W_WINDOW_INCLUDED +'$ENDIF +'$IFDEF W_MENU AND NOT W_MENU_INCLUDED +' ********************* + + +'*** Menu routines & constants +' +Declare Sub WMenu Lib "TESTCtrl.dll" (lpszName$) +Declare Function WMenuExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WMenuGrayed Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WMenuChecked Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WMenuEnabled Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WMenuCount Lib "TESTCtrl.dll" () As Integer +Declare Sub WMenuText Lib "TESTCtrl.dll" (sIndex%, lpszBuffer$) +Declare Function MenuText (sIndex%) As String +Declare Function WMenuLen Lib "TESTCtrl.dll" (sIndex%) As Integer +Declare Sub WMenuFullText Lib "TESTCtrl.dll" (sIndex%, lpszBuffer$) +Declare Function MenuFullText (sIndex%) As String +Declare Function WMenuFullLen Lib "TESTCtrl.dll" (sIndex%) As Integer + +'---------------------------------------------------------------------------- +' MenuText: Layered routine for WMenuText() +'---------------------------------------------------------------------------- +Function MenuText(sIndex%) As String +Dim lpszBuffer As String + menuLength = WMenuLen(sIndex) + If menuLength >= 0 Then + lpszBuffer = String$(menuLength+1, " ") + WMenuText sIndex, lpszBuffer + MenuText = lpszBuffer + lpszBuffer = "" + End if +End Function + +'---------------------------------------------------------------------------- +' MenuFullText: Layered routine for WMenuFullText() +'---------------------------------------------------------------------------- +Function MenuFullText(sIndex%) As String +Dim lpszBuffer As String + menuLength = WMenuFullLen(sIndex) + If menuLength >= 0 Then + lpszBuffer = String$(menuLength+1, " ") + WMenuFullText sIndex, lpszBuffer + MenuFullText = lpszBuffer + lpszBuffer = "" + End If +End Function + + +' ********************* +'$DEFINE W_MENU_INCLUDED +'$ENDIF +'$IFDEF W_A_CONTROL AND NOT W_A_CONTROL_INCLUDED +' ********************* + + +'*** Global routine & constants used by all controls +' +Declare Sub WStaticSetClass Lib "TESTCtrl.dll" (lpszClassName$) +Declare Sub WResetClasses Lib "TESTCtrl.dll" () + + +' ********************* +'$DEFINE W_A_CONTROL_INCLUDED +'$ENDIF +'$IFDEF W_BUTTON AND NOT W_BUTTON_INCLUDED +' ********************* + + +'*** Button routines +' +Declare Sub WButtonSetClass Lib "TESTCtrl.dll" (lpszClassName$) +Declare Function WButtonExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WButtonEnabled Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WButtonFocus Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WButtonClick Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WButtonHide Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WButtonShow Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WButtonEnable Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WButtonDisable Lib "TESTCtrl.dll" (lpszName$) + + +' ********************* +'$DEFINE W_BUTTON_INCLUDED +'$ENDIF +'$IFDEF W_CHECK AND NOT W_CHECK_INCLUDED +' ********************* + + +' CheckBox routines +' +Declare Sub WCheckSetClass Lib "TESTCtrl.dll" (lpszClassName$) +Declare Function WCheckExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WCheckEnabled Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WCheckFocus Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WCheckState Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WCheckClick Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckHide Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckShow Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckEnable Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckDisable Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckCheck Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WCheckUnCheck Lib "TESTCtrl.dll" (lpszName$) + +Const UNCHECKED = 0 +Const CHECKED = 1 +Const GRAYED = 2 + + +' ********************* +'$DEFINE W_CHECK_INCLUDED +'$ENDIF +'$IFDEF W_OPTION AND NOT W_OPTION_INCLUDED +' ********************* + + +'*** Option Button routines +' +Declare Sub WOptionSetClass Lib "TESTCtrl.dll" (lpszClassName$) +Declare Function WOptionExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WOptionEnabled Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WOptionFocus Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WOptionState Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WOptionClick Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WOptionHide Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WOptionShow Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WOptionEnable Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WOptionDisable Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WOptionSelect Lib "TESTCtrl.dll" (lpszName$) + + +' ********************* +'$DEFINE W_OPTION_INCLUDED +'$ENDIF +'$IFDEF W_LIST AND NOT W_LIST_INCLUDED +' ********************* + + +'*** Listbox routines +' +Declare Sub WListSetClass Lib "TESTCtrl.dll" (lpszClass$) +Declare Function WListExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WListCount Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WListText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Function ListText (lpszName$) As String +Declare Function WListLen Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WListIndex Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WListTopIndex Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WListItemText Lib "TESTCtrl.dll" (lpszName$, sItem%, lpszBuffer$) +Declare Function ListItemText (lpszName$, sItem%) As String +Declare Function WListItemLen Lib "TESTCtrl.dll" (lpszName$, sItem%) As Integer +Declare Function WListItemExists Lib "TESTCtrl.dll" (lpszName$, lpszItem$) As Integer +Declare Sub WListItemClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemCtrlClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemShftClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemDblClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemClkT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Sub WListItemCtrlClkT Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemShftClkT Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListItemDblClkT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Function WListSelCount Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WListSelItems Lib "TESTCtrl.dll" (lpszName$, lpIntArray As Pointer To Integer) +Declare Sub WListClear Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WListAddItem Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Sub WListDelItem Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WListDelItemT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) + +'---------------------------------------------------------------------------- +' ListText: Layered routine for WListText() +'---------------------------------------------------------------------------- +Function ListText(lpszName$) As String +Dim lpszBuffer As String + itemLength = WListLen(lpszName) + If itemLength >= 0 Then + lpszBuffer = String$(itemLength+1, " ") + WListText lpszName, lpszBuffer + ListText = lpszBuffer + lpszBuffer = "" + End If +End Function + +'---------------------------------------------------------------------------- +' ListItemText: Layered routine for WListItemText() +'---------------------------------------------------------------------------- +Function ListItemText(lpszName$, sItem%) As String +Dim lpszBuffer As String + itemLength = WListItemLen(lpszName, sItem) + If itemLength >= 0 Then + lpszBuffer = String$(itemLength+1, " ") + WListItemText lpszName, sItem, lpszBuffer + ListItemText = lpszBuffer + lpszBuffer = "" + End If +End Function + + +' ********************* +'$DEFINE W_LIST_INCLUDED +'$ENDIF +'$IFDEF W_COMBO AND NOT W_COMBO_INCLUDED +' ********************* + + +'*** Combobox routines +' +Declare Sub WComboSetClass Lib "TESTCtrl.dll" (lpszClass$) +Declare Sub WComboSetLBClass Lib "TESTCtrl.dll" (lpszClass$) +Declare Function WComboExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WComboCount Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WComboSetText Lib "TESTCtrl.dll" (lpszName$, lpszText$) +Declare Sub WComboText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Function ComboText (lpszName$) As String +Declare Function WComboLen Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WComboSelText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Function ComboSelText (lpszName$) As String +Declare Function WComboSelLen Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WComboIndex Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WComboItemText Lib "TESTCtrl.dll" (lpszName$, sItem%, lpszBuffer$) +Declare Function ComboItemText (lpszName$, sItem%) As String +Declare Function WComboItemLen Lib "TESTCtrl.dll" (lpszName$, sItem%) As Integer +Declare Function WComboItemExists Lib "TESTCtrl.dll" (lpszName$, lpszItem$) As Integer +Declare Sub WComboItemClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WComboItemDblClk Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WComboItemClkT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Sub WComboItemDblClkT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Sub WComboClear Lib "TESTCtrl.dll" (lpszName$) +Declare Sub WComboAddItem Lib "TESTCtrl.dll" (lpszName$, lpszItem$) +Declare Sub WComboDelItem Lib "TESTCtrl.dll" (lpszName$, sItem%) +Declare Sub WComboDelItemT Lib "TESTCtrl.dll" (lpszName$, lpszItem$) + +'---------------------------------------------------------------------------- +' ComboText: Layered routine for WComboText() +'---------------------------------------------------------------------------- +Function ComboText(lpszName$) As String +Dim lpszBuffer As String + itemLength = WComboLen(lpszName$) + If itemLength >= 0 Then + lpszBuffer = String$(itemLength+1, " ") + WComboText lpszName, lpszBuffer + ComboText = lpszBuffer + lpszBuffer = "" + End If +End Function + +'---------------------------------------------------------------------------- +' ComboSelText: Layered routine for WComboSelText() +'---------------------------------------------------------------------------- +Function ComboSelText(lpszName$) As String +Dim lpszBuffer As String + itemLength = WComboSelLen(lpszName$) + If itemLength >= 0 Then + lpszBuffer = String$(itemLength+1, " ") + WComboSelText lpszName, lpszBuffer + ComboSelText = lpszBuffer + lpszBuffer = "" + End If +End Function + +'---------------------------------------------------------------------------- +' ComboItemText: Layered routine for WComboItemText() +'---------------------------------------------------------------------------- +Function ComboItemText(lpszName$, sItem%) As String +Dim lpszBuffer As String + itemLength = WComboItemLen(lpszName, sItem) + If itemLength >= 0 Then + lpszBuffer = String$(itemLength+1, " ") + WComboItemText lpszName, sItem, lpszBuffer + ComboItemText = lpszBuffer + lpszBuffer = "" + End If +End Function + + +' ********************* +'$DEFINE W_COMBO_INCLUDED +'$ENDIF +'$IFDEF W_EDIT AND NOT W_EDIT_INCLUDED +' ********************* + + +'*** Edit box routines +' +Declare Sub WEditSetClass Lib "TESTCtrl.dll" (lpszClass$) +Declare Function WEditExists Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WEditLen Lib "TESTCtrl.dll" (lpszName$) As Long +Declare Sub WEditText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Function EditText (lpszName$) As String +Declare Sub WEditSetText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Sub WEditSelText Lib "TESTCtrl.dll" (lpszName$, lpszBuffer$) +Declare Function EditSelText (lpszName$) As String +Declare Function WEditSelLen Lib "TESTCtrl.dll" (lpszName$) As Long +Declare Sub WEditLineText Lib "TESTCtrl.dll" (lpszName$, Index%, lpszBuffer$) +Declare Function EditLineText (lpszName$, Index%) As String +Declare Function WEditLineLen Lib "TESTCtrl.dll" (lpszName$, Index%) As Long +Declare Function WEditPos Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WEditLine Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WEditChar Lib "TESTCtrl.dll" (lpszName$) As Long +Declare Function WEditFirst Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Function WEditLines Lib "TESTCtrl.dll" (lpszName$) As Integer +Declare Sub WEditClick Lib "TESTCtrl.dll" (lpszName$) + +'---------------------------------------------------------------------------- +' EditText: Layered routine for WEditText() +'---------------------------------------------------------------------------- +Function EditText(lpszName$) As String +Dim lpszBuffer As String + textLength = WEditLen(lpszName) + If textLength >=0 Then + lpszBuffer = String$(textLength+1, " ") + WEditText lpszName, lpszBuffer + EditText = lpszBuffer + lpszBuffer = "" + End If +End Function + +'---------------------------------------------------------------------------- +' EditSelText: Layered routine for WEditSelText() +'---------------------------------------------------------------------------- +Function EditSelText(lpszName$) As String +Dim lpszBuffer As String + selLength = WEditSelLen(lpszName) + If selLength >= 0 Then + lpszBuffer = String$(selLength+1, " ") + WEditSelText lpszName, lpszBuffer + EditSelText = lpszBuffer + lpszBuffer = "" + End If +End Function + +'---------------------------------------------------------------------------- +' EditLineText: Layered routine for WEditLineText() +'---------------------------------------------------------------------------- +Function EditLineText(lpszName$, sIndex%) As String +Dim lpszBuffer As String + lineLength = WEditLineLen(lpszName, sIndex) + If lineLength >= 0 Then + lpszBuffer = String$(lineLength+1, " ") + WEditLineText lpszName, sIndex, lpszBuffer + EditLineText = lpszBuffer + lpszBuffer = "" + End if +End Function + + +' ********************* +'$DEFINE W_EDIT_INCLUDED +'$ENDIF +'$IFDEF W_ERROR AND NOT W_ERROR_INCLUDED +' ********************* + + +Declare Function WError Lib "TESTCtrl.dll" () As Integer +Declare Sub WErrorSet Lib "TESTCtrl.dll" (sErrorNum%) +Declare Sub WErrorText Lib "TESTCtrl.dll" (lpszBuffer$) +Declare Function ErrorText () As String +Declare Function WErrorLen Lib "TESTCtrl.dll" () As Integer + +Const NO_ERROR = 0 +Const ERR_MENU_NOT_FOUND = 1 +Const ERR_MENU_ITEM_NOT_FOUND = 2 +Const ERR_NOT_A_LISTBOX = 3 +Const ERR_LISTBOX_NOT_FOUND = 4 +Const ERR_ITEM_NOT_IN_LISTBOX = 5 +Const ERR_INVALID_LISTBOX_INDEX = 6 +Const ERR_LISTBOX_HAS_NO_STRINGS = 7 +Const ERR_NOT_A_COMBOBOX = 8 +Const ERR_COMBOBOX_NOT_FOUND = 9 +Const ERR_ITEM_NOT_IN_COMBOBOX = 10 +Const ERR_INVALID_COMBOBOX_INDEX = 11 +Const ERR_COMBOBOX_HAS_NO_EDITBOX = 12 +Const ERR_COMBOBOX_HAS_NO_STRINGS = 13 +Const ERR_NOT_AN_EDITBOX = 14 +Const ERR_EDITBOX_NOT_FOUND = 15 +Const ERR_BUTTON_NOT_FOUND = 16 +Const ERR_OPTION_BUTTON_NOT_FOUND = 17 +Const ERR_CHECKBOX_NOT_FOUND = 18 +Const ERR_INVALID_WINDOW_HANDLE = 19 +Const MAX_ERROR = 20 + +'---------------------------------------------------------------------------- +' ErrorText: Layered routine for WErrorText() of TESTCtrl.DLL. +' Simulates a DLL String Function. +'---------------------------------------------------------------------------- +Function ErrorText() As String +Dim lpszBuffer As String + errorLength= WErrorLen + lpszBuffer = String$(errorLength+1, " ") + WErrorText lpszBuffer + ErrorText = lpszBuffer + lpszBuffer = "" +End Function + + +' ********************* +'$DEFINE W_ERROR_INCLUDED +'$ENDIF +' ********************* + + diff --git a/private/oleauto/tools/win16/os2/inc/new.h b/private/oleauto/tools/win16/os2/inc/new.h new file mode 100644 index 000000000..3fd2a911f --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/new.h @@ -0,0 +1,40 @@ +/*** +*new.h - declarations and definitions for C++ memory allocation functions +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for C++ memory allocation functions. +* [System V] +* +****/ + +#ifndef __INC_NEW +#define __INC_NEW + + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +typedef int (__cdecl * _PNH)( size_t ); +typedef int (__cdecl * _PNHH)( unsigned long, size_t ); +typedef int (__cdecl * _PNHB)( __segment, size_t ); + +/* function prototypes */ + +_PNH _set_new_handler( _PNH ); +_PNH _set_nnew_handler( _PNH ); +_PNH _set_fnew_handler( _PNH ); +_PNHH _set_hnew_handler( _PNHH ); +_PNHB _set_bnew_handler( _PNHB ); + +#endif diff --git a/private/oleauto/tools/win16/os2/inc/new.hxx b/private/oleauto/tools/win16/os2/inc/new.hxx new file mode 100644 index 000000000..a703e14dc --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/new.hxx @@ -0,0 +1,51 @@ +/*** +*new.hxx - declarations and definitions for C++ memory allocation functions +* +* Copyright (c) 1990-1991, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for C++ memory allocation functions. +* [System V] +* +****/ + +#ifndef __INC_NEW +#define __INC_NEW + +#if defined(_DLL) && !defined(_MT) +#error Cannot define _DLL without _MT +#endif + +#ifdef _MT +#define _FAR_ __far +#else +#define _FAR_ +#endif + + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +typedef int (__cdecl * PNH)( size_t ); +typedef int (__cdecl * PNHH)( unsigned long, size_t ); +typedef int (__cdecl * PNHB)( __segment, size_t ); + +/* function prototypes */ + +PNH _set_new_handler( PNH ); +PNH setNewHandler( PNH ); +PNH setNearNewHandler( PNH ); +PNH setFarNewHandler( PNH ); +PNHH setHugeNewHandler( PNHH ); +PNHB setBasedNewHandler( PNHB ); + +#endif diff --git a/private/oleauto/tools/win16/os2/inc/nlsapi.h b/private/oleauto/tools/win16/os2/inc/nlsapi.h new file mode 100644 index 000000000..f34b12b3b --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/nlsapi.h @@ -0,0 +1,428 @@ +/*** +*nlsapi.h - National language support functions. +* +* Copyright (C) 1992, Microsoft Corporation. All Rights Reserved. +* Information Contained Herein Is Proprietary and Confidential. +* +*Purpose: +* This describes the NLSAPI functions for Win16. This is a subset +* of Win32 NLSAPI, and is a non-Unicode version. +* +*Implementation Notes: +* This files is largely ported from the Win32 header winnls.h. +* +*****************************************************************************/ + +#ifndef _NLSAPI_ +#define _NLSAPI_ + +#ifndef NONLS + +#ifdef __cplusplus +extern "C" { +#endif // __cpluscplus + +/***************************************************************************\ +* Constants +* +* Define all constants for the NLS component here. +\***************************************************************************/ + +/* + * Character Type Flags. + */ +#define CT_CTYPE1 0x00000001 /* ctype 1 information */ +#define CT_CTYPE2 0x00000002 /* ctype 2 information */ +#define CT_CTYPE3 0x00000004 /* ctype 3 information */ + +/* + * CType 1 Flag Bits. + */ +#define C1_UPPER 0x0001 /* upper case */ +#define C1_LOWER 0x0002 /* lower case */ +#define C1_DIGIT 0x0004 /* decimal digits */ +#define C1_SPACE 0x0008 /* spacing characters */ +#define C1_PUNCT 0x0010 /* punctuation characters */ +#define C1_CNTRL 0x0020 /* control characters */ +#define C1_BLANK 0x0040 /* blank characters */ +#define C1_XDIGIT 0x0080 /* other digits */ +#define C1_ALPHA 0x0100 /* any letter */ + +/* + * CType 2 Flag Bits. + */ +#define C2_LEFTTORIGHT 0x1 /* left to right */ +#define C2_RIGHTTOLEFT 0x2 /* right to left */ + +#define C2_EUROPENUMBER 0x3 /* European number, digit */ +#define C2_EUROPESEPARATOR 0x4 /* European numeric separator */ +#define C2_EUROPETERMINATOR 0x5 /* European numeric terminator */ +#define C2_ARABICNUMBER 0x6 /* Arabic number */ +#define C2_COMMONSEPARATOR 0x7 /* common numeric separator */ + +#define C2_BLOCKSEPARATOR 0x8 /* block separator */ +#define C2_SEGMENTSEPARATOR 0x9 /* segment separator */ +#define C2_WHITESPACE 0xA /* white space */ +#define C2_OTHERNEUTRAL 0xB /* other neutrals */ + +#define C2_NOTAPPLICABLE 0x0 /* no implicit directionality */ + +/* + * CType 3 Flag Bits. + */ +#define C3_NONSPACING 0x0001 /* nonspacing character */ +#define C3_DIACRITIC 0x0002 /* diacritic mark */ +#define C3_VOWELMARK 0x0004 /* vowel mark */ +#define C3_SYMBOL 0x0008 /* symbols */ + +#define C3_NOTAPPLICABLE 0x0 /* ctype 3 is not applicable */ + + +/* + * String Flags. + */ +#define NORM_IGNORECASE 0x00000001 /* ignore case */ +#define NORM_IGNORENONSPACE 0x00000002 /* ignore nonspacing chars */ +#define NORM_IGNORESYMBOLS 0x00000004 /* ignore symbols */ + + +/* + * Locale Dependent Mapping Flags. + */ +#define LCMAP_LOWERCASE 0x00000100 /* lower case letters */ +#define LCMAP_UPPERCASE 0x00000200 /* upper case letters */ +#define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */ + + + +/* + * Language IDs. + * + * The following two combinations of primary language ID and + * sublanguage ID have special semantics: + * + * Primary Language ID Sublanguage ID Result + * ------------------- --------------- ------------------------ + * LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral + * LANG_NEUTRAL SUBLANG_DEFAULT Process default language + */ + +/* + * Primary language IDs. + */ +#define LANG_NEUTRAL 0x00 + +#define LANG_ALBANIAN 0x1c +#define LANG_ARABIC 0x01 +#define LANG_BAHASA 0x21 +#define LANG_BULGARIAN 0x02 +#define LANG_CATALAN 0x03 +#define LANG_CHINESE 0x04 +#define LANG_CZECH 0x05 +#define LANG_DANISH 0x06 +#define LANG_DUTCH 0x13 +#define LANG_ENGLISH 0x09 +#define LANG_FINNISH 0x0b +#define LANG_FRENCH 0x0c +#define LANG_GERMAN 0x07 +#define LANG_GREEK 0x08 +#define LANG_HEBREW 0x0d +#define LANG_HUNGARIAN 0x0e +#define LANG_ICELANDIC 0x0f +#define LANG_ITALIAN 0x10 +#define LANG_JAPANESE 0x11 +#define LANG_KOREAN 0x12 +#define LANG_NORWEGIAN 0x14 +#define LANG_POLISH 0x15 +#define LANG_PORTUGUESE 0x16 +#define LANG_RHAETO_ROMAN 0x17 +#define LANG_ROMANIAN 0x18 +#define LANG_RUSSIAN 0x19 +#define LANG_SERBO_CROATIAN 0x1a +#define LANG_SLOVAK 0x1b +#define LANG_SPANISH 0x0a +#define LANG_SWEDISH 0x1d +#define LANG_THAI 0x1e +#define LANG_TURKISH 0x1f +#define LANG_URDU 0x20 + +/* + * Sublanguage IDs. + * + * The name immediately following SUBLANG_ dictates which primary + * language ID that sublanguage ID can be combined with to form a + * valid language ID. + */ +#define SUBLANG_NEUTRAL 0x00 /* language neutral */ +#define SUBLANG_DEFAULT 0x01 /* user default */ +#define SUBLANG_SYS_DEFAULT 0x02 /* system default */ + +#define SUBLANG_CHINESE_SIMPLIFIED 0x02 /* Chinese (Simplified) */ +#define SUBLANG_CHINESE_TRADITIONAL 0x01 /* Chinese (Traditional) */ +#define SUBLANG_DUTCH 0x01 /* Dutch */ +#define SUBLANG_DUTCH_BELGIAN 0x02 /* Dutch (Belgian) */ +#define SUBLANG_ENGLISH_US 0x01 /* English (USA) */ +#define SUBLANG_ENGLISH_UK 0x02 /* English (UK) */ +#define SUBLANG_ENGLISH_AUS 0x03 /* English (Australian) */ +#define SUBLANG_ENGLISH_CAN 0x04 /* English (Canadian) */ +#define SUBLANG_ENGLISH_NZ 0x05 /* English (New Zealand) */ +#define SUBLANG_FRENCH 0x01 /* French */ +#define SUBLANG_FRENCH_BELGIAN 0x02 /* French (Belgian) */ +#define SUBLANG_FRENCH_CANADIAN 0x03 /* French (Canadian) */ +#define SUBLANG_FRENCH_SWISS 0x04 /* French (Swiss) */ +#define SUBLANG_GERMAN 0x01 /* German */ +#define SUBLANG_GERMAN_SWISS 0x02 /* German (Swiss) */ +#define SUBLANG_GERMAN_AUSTRIAN 0x03 /* German (Austrian) */ +#define SUBLANG_ITALIAN 0x01 /* Italian */ +#define SUBLANG_ITALIAN_SWISS 0x02 /* Italian (Swiss) */ +#define SUBLANG_NORWEGIAN_BOKMAL 0x01 /* Norwegian (Bokmal) */ +#define SUBLANG_NORWEGIAN_NYNORSK 0x02 /* Norwegian (Nynorsk) */ +#define SUBLANG_PORTUGUESE 0x02 /* Portuguese */ +#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 /* Portuguese (Brazilian) */ +#define SUBLANG_SERBO_CROATIAN_CYRILLIC 0x02 /* Serbo-Croatian (Cyrillic) */ +#define SUBLANG_SERBO_CROATIAN_LATIN 0x01 /* Croato-Serbian (Latin) */ +#define SUBLANG_SPANISH 0x01 /* Spanish */ +#define SUBLANG_SPANISH_MEXICAN 0x02 /* Spanish (Mexican) */ +#define SUBLANG_SPANISH_MODERN 0x03 /* Spanish (Modern) */ + + +/* + * Country Codes. + */ +#define CTRY_DEFAULT 0 + +#define CTRY_AUSTRALIA 61 /* Australia */ +#define CTRY_AUSTRIA 43 /* Austria */ +#define CTRY_BELGIUM 32 /* Belgium */ +#define CTRY_BRAZIL 55 /* Brazil */ +#define CTRY_CANADA 2 /* Canada */ +#define CTRY_DENMARK 45 /* Denmark */ +#define CTRY_FINLAND 358 /* Finland */ +#define CTRY_FRANCE 33 /* France */ +#define CTRY_GERMANY 49 /* Germany */ +#define CTRY_ICELAND 354 /* Iceland */ +#define CTRY_IRELAND 353 /* Ireland */ +#define CTRY_ITALY 39 /* Italy */ +#define CTRY_JAPAN 81 /* Japan */ +#define CTRY_MEXICO 52 /* Mexico */ +#define CTRY_NETHERLANDS 31 /* Netherlands */ +#define CTRY_NEW_ZEALAND 64 /* New Zealand */ +#define CTRY_NORWAY 47 /* Norway */ +#define CTRY_PORTUGAL 351 /* Portugal */ +#define CTRY_PRCHINA 86 /* PR China */ +#define CTRY_SOUTH_KOREA 82 /* South Korea */ +#define CTRY_SPAIN 34 /* Spain */ +#define CTRY_SWEDEN 46 /* Sweden */ +#define CTRY_SWITZERLAND 41 /* Switzerland */ +#define CTRY_TAIWAN 886 /* Taiwan */ +#define CTRY_UNITED_KINGDOM 44 /* United Kingdom */ +#define CTRY_UNITED_STATES 1 /* United States */ + + +/* + * Locale Types. + * + * These types are used for the GetLocaleInfoA NLS API routine. + */ +#define LOCALE_ILANGUAGE 0x0001 /* language id */ +#define LOCALE_SLANGUAGE 0x0002 /* localized name of language */ +#define LOCALE_SENGLANGUAGE 0x1001 /* English name of language */ +#define LOCALE_SABBREVLANGNAME 0x0003 /* abbreviated language name */ +#define LOCALE_SNATIVELANGNAME 0x0004 /* native name of language */ +#define LOCALE_ICOUNTRY 0x0005 /* country code */ +#define LOCALE_SCOUNTRY 0x0006 /* localized name of country */ +#define LOCALE_SENGCOUNTRY 0x1002 /* English name of country */ +#define LOCALE_SABBREVCTRYNAME 0x0007 /* abbreviated country name */ +#define LOCALE_SNATIVECTRYNAME 0x0008 /* native name of country */ +#define LOCALE_IDEFAULTLANGUAGE 0x0009 /* default language id */ +#define LOCALE_IDEFAULTCOUNTRY 0x000A /* default country code */ +#define LOCALE_IDEFAULTCODEPAGE 0x000B /* default code page */ + +#define LOCALE_SLIST 0x000C /* list item separator */ +#define LOCALE_IMEASURE 0x000D /* 0 = metric, 1 = US */ + +#define LOCALE_SDECIMAL 0x000E /* decimal separator */ +#define LOCALE_STHOUSAND 0x000F /* thousand separator */ +#define LOCALE_SGROUPING 0x0010 /* digit grouping */ +#define LOCALE_IDIGITS 0x0011 /* number of fractional digits */ +#define LOCALE_ILZERO 0x0012 /* leading zeros for decimal */ +#define LOCALE_SNATIVEDIGITS 0x0013 /* native ascii 0-9 */ + +#define LOCALE_SCURRENCY 0x0014 /* local monetary symbol */ +#define LOCALE_SINTLSYMBOL 0x0015 /* intl monetary symbol */ +#define LOCALE_SMONDECIMALSEP 0x0016 /* monetary decimal separator */ +#define LOCALE_SMONTHOUSANDSEP 0x0017 /* monetary thousand separator */ +#define LOCALE_SMONGROUPING 0x0018 /* monetary grouping */ +#define LOCALE_ICURRDIGITS 0x0019 /* # local monetary digits */ +#define LOCALE_IINTLCURRDIGITS 0x001A /* # intl monetary digits */ +#define LOCALE_ICURRENCY 0x001B /* positive currency mode */ +#define LOCALE_INEGCURR 0x001C /* negative currency mode */ + +#define LOCALE_SDATE 0x001D /* date separator */ +#define LOCALE_STIME 0x001E /* time separator */ +#define LOCALE_SSHORTDATE 0x001F /* short date-time separator */ +#define LOCALE_SLONGDATE 0x0020 /* long date-time separator */ +#define LOCALE_IDATE 0x0021 /* short date format ordering */ +#define LOCALE_ILDATE 0x0022 /* long date format ordering */ +#define LOCALE_ITIME 0x0023 /* time format specifier */ +#define LOCALE_ICENTURY 0x0024 /* century format specifier */ +#define LOCALE_ITLZERO 0x0025 /* leading zeros in time field */ +#define LOCALE_IDAYLZERO 0x0026 /* leading zeros in day field */ +#define LOCALE_IMONLZERO 0x0027 /* leading zeros in month field */ +#define LOCALE_S1159 0x0028 /* AM designator */ +#define LOCALE_S2359 0x0029 /* PM designator */ + +#define LOCALE_SDAYNAME1 0x002A /* long name for Monday */ +#define LOCALE_SDAYNAME2 0x002B /* long name for Tuesday */ +#define LOCALE_SDAYNAME3 0x002C /* long name for Wednesday */ +#define LOCALE_SDAYNAME4 0x002D /* long name for Thursday */ +#define LOCALE_SDAYNAME5 0x002E /* long name for Friday */ +#define LOCALE_SDAYNAME6 0x002F /* long name for Saturday */ +#define LOCALE_SDAYNAME7 0x0030 /* long name for Sunday */ +#define LOCALE_SABBREVDAYNAME1 0x0031 /* abbreviated name for Monday */ +#define LOCALE_SABBREVDAYNAME2 0x0032 /* abbreviated name for Tuesday */ +#define LOCALE_SABBREVDAYNAME3 0x0033 /* abbreviated name for Wednesday */ +#define LOCALE_SABBREVDAYNAME4 0x0034 /* abbreviated name for Thursday */ +#define LOCALE_SABBREVDAYNAME5 0x0035 /* abbreviated name for Friday */ +#define LOCALE_SABBREVDAYNAME6 0x0036 /* abbreviated name for Saturday */ +#define LOCALE_SABBREVDAYNAME7 0x0037 /* abbreviated name for Sunday */ +#define LOCALE_SMONTHNAME1 0x0038 /* long name for January */ +#define LOCALE_SMONTHNAME2 0x0039 /* long name for February */ +#define LOCALE_SMONTHNAME3 0x003A /* long name for March */ +#define LOCALE_SMONTHNAME4 0x003B /* long name for April */ +#define LOCALE_SMONTHNAME5 0x003C /* long name for May */ +#define LOCALE_SMONTHNAME6 0x003D /* long name for June */ +#define LOCALE_SMONTHNAME7 0x003E /* long name for July */ +#define LOCALE_SMONTHNAME8 0x003F /* long name for August */ +#define LOCALE_SMONTHNAME9 0x0040 /* long name for September */ +#define LOCALE_SMONTHNAME10 0x0041 /* long name for October */ +#define LOCALE_SMONTHNAME11 0x0042 /* long name for November */ +#define LOCALE_SMONTHNAME12 0x0043 /* long name for December */ +#define LOCALE_SABBREVMONTHNAME1 0x0044 /* abbreviated name for January */ +#define LOCALE_SABBREVMONTHNAME2 0x0045 /* abbreviated name for February */ +#define LOCALE_SABBREVMONTHNAME3 0x0046 /* abbreviated name for March */ +#define LOCALE_SABBREVMONTHNAME4 0x0047 /* abbreviated name for April */ +#define LOCALE_SABBREVMONTHNAME5 0x0048 /* abbreviated name for May */ +#define LOCALE_SABBREVMONTHNAME6 0x0049 /* abbreviated name for June */ +#define LOCALE_SABBREVMONTHNAME7 0x004A /* abbreviated name for July */ +#define LOCALE_SABBREVMONTHNAME8 0x004B /* abbreviated name for August */ +#define LOCALE_SABBREVMONTHNAME9 0x004C /* abbreviated name for September */ +#define LOCALE_SABBREVMONTHNAME10 0x004D /* abbreviated name for October */ +#define LOCALE_SABBREVMONTHNAME11 0x004E /* abbreviated name for November */ +#define LOCALE_SABBREVMONTHNAME12 0x004F /* abbreviated name for December */ + +#define LOCALE_SPOSITIVESIGN 0x0050 /* positive sign */ +#define LOCALE_SNEGATIVESIGN 0x0051 /* negative sign */ +#define LOCALE_IPOSSIGNPOSN 0x0052 /* positive sign position */ +#define LOCALE_INEGSIGNPOSN 0x0053 /* negative sign position */ +#define LOCALE_IPOSSYMPRECEDES 0x0054 /* mon sym precedes pos amt */ +#define LOCALE_IPOSSEPBYSPACE 0x0055 /* mon sym sep by space from pos */ +#define LOCALE_INEGSYMPRECEDES 0x0056 /* mon sym precedes neg amt */ +#define LOCALE_INEGSEPBYSPACE 0x0057 /* mon sym sep by space from neg */ + +#define LOCALE_NOUSEROVERRIDE 0x80000000 /* OR in to avoid user override */ + +/***************************************************************************\ +* Typedefs +* +* Define all types for the NLS component here. +\***************************************************************************/ + +/* + * IDs. + */ +typedef DWORD LCID; /* locale ID */ +typedef WORD LANGID; /* language ID */ +typedef DWORD LCTYPE; /* locale type constant */ + + + + +/***************************************************************************\ +* Macros +* +* Define all macros for the NLS component here. +\***************************************************************************/ + +/* + * A language ID is a 16 bit value which is the combination of a + * primary language ID and a secondary language ID. The bits are + * allocated as follows: + * + * +-----------------------+-------------------------+ + * | Sublanguage ID | Primary Language ID | + * +-----------------------+-------------------------+ + * 15 10 9 0 bit + * + * + * Language ID creation/extraction macros: + * + * MAKELANGID - construct language id from primary language id and + * sublanguage id. + * PRIMARYLANGID - extract primary language id from a language id. + * SUBLANGID - extract sublanguage id from a language id. + */ +#define MAKELANGID(p, s) ((((WORD)(s)) << 10) | (WORD)(p)) +#define PRIMARYLANGID(lgid) ((WORD)(lgid) & 0x3ff) +#define SUBLANGID(lgid) ((WORD)(lgid) >> 10) + + +/* + * A locale ID is a 32 bit value which is the combination of a + * language ID and a reserved area. The bits are allocated as follows: + * + * +-----------------------+-------------------------+ + * | Reserved | Language ID | + * +-----------------------+-------------------------+ + * 31 16 15 0 bit + * + * + * Locale ID creation macro: + * + * MAKELCID - construct locale id from a language id. + */ +#define MAKELCID(lgid) ((DWORD)(((WORD)(lgid)) | (((DWORD)((WORD)(0))) << 16))) + + +/* + * Get the language id from a locale id. + */ +#define LANGIDFROMLCID(lcid) ((WORD)(lcid)) + + +/* + * Default System and User IDs for language and locale. + */ +#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT)) +#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)) + +#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT)) +#define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT)) + + + +/***************************************************************************\ +* Function Prototypes +* +* Only prototypes for the NLS APIs should go here. +\***************************************************************************/ + + +int WINAPI CompareStringA(LCID, DWORD, LPCSTR, int, LPCSTR, int); +int WINAPI LCMapStringA(LCID, DWORD, LPCSTR, int, LPSTR, int); +int WINAPI GetLocaleInfoA(LCID, LCTYPE, LPSTR, int); +BOOL WINAPI GetStringTypeA(LCID, DWORD, LPCSTR, int, LPWORD); + +LANGID WINAPI GetSystemDefaultLangID(void); +LANGID WINAPI GetUserDefaultLangID(void); +LCID WINAPI GetSystemDefaultLCID(void); +LCID WINAPI GetUserDefaultLCID(void); + +#ifdef __cplusplus +} +#endif // __cpluscplus + + +#endif // NONLS + +#endif // _NLSAPI_ diff --git a/private/oleauto/tools/win16/os2/inc/ole.h b/private/oleauto/tools/win16/os2/inc/ole.h new file mode 100644 index 000000000..6b64c8bfb --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ole.h @@ -0,0 +1,464 @@ + + +/****************************************************************/ +/* */ +/* OLE header */ +/* (c) Copyright Microsoft Corp. 1990 - All Rights Reserved */ +/* */ +/****************************************************************/ + +// Object types + +#define OT_LINK 1L +#define OT_EMBEDDED 2L +#define OT_STATIC 3L + + +// activate verbs + +#define OLEVERB_PRIMARY 0 + + +// flags used in some methods + +#define OF_SET 0x0001 +#define OF_GET 0x0002 +#define OF_HANDLER 0x0004 + + + +// return codes for OLE functions +typedef enum { + OLE_OK, // 0 Function operated correctly + + OLE_WAIT_FOR_RELEASE, // 1 Command has been initiated, client + // must wait for release. keep dispatching + // messages till OLE_RELESE in callback + + OLE_BUSY, // 2 Tried to execute a method while another + // method is in progress. + + OLE_ERROR_PROTECT_ONLY, // 3 Ole APIs are called in real mode + OLE_ERROR_MEMORY, // 4 Could not alloc or lock memory + OLE_ERROR_STREAM, // 5 (OLESTREAM) stream error + OLE_ERROR_STATIC, // 6 Non static object expected + OLE_ERROR_BLANK, // 7 Critical data missing + OLE_ERROR_DRAW, // 8 Error while drawing + OLE_ERROR_METAFILE, // 9 Invalid metafile + OLE_ERROR_ABORT, // 10 Client chose to abort metafile drawing + OLE_ERROR_CLIPBOARD, // 11 Failed to get/set clipboard data + OLE_ERROR_FORMAT, // 12 Requested format is not available + OLE_ERROR_OBJECT, // 13 Not a valid object + OLE_ERROR_OPTION, // 14 Invalid option (link update / render) + OLE_ERROR_PROTOCOL, // 15 Invalid protocol + OLE_ERROR_ADDRESS, // 16 One of the pointers is invalid + OLE_ERROR_NOT_EQUAL, // 17 Objects are not equal + OLE_ERROR_HANDLE, // 18 Invalid handle encountered + OLE_ERROR_GENERIC, // 19 Some general error + OLE_ERROR_CLASS, // 20 Invalid class + OLE_ERROR_SYNTAX, // 21 Command syntax is invalid + OLE_ERROR_DATATYPE, // 22 Data format is not supported + OLE_ERROR_PALETTE, // 23 Invalid color palette + OLE_ERROR_NOT_LINK, // 24 Not a linked object + OLE_ERROR_NOT_EMPTY, // 25 Client doc contains objects. + OLE_ERROR_SIZE, // 26 Incorrect buffer size passed to the api + // that places some string in caller's + // buffer + + OLE_ERROR_DRIVE, // 27 Drive letter in doc name is invalid + OLE_ERROR_NETWORK, // 28 Failed to establish connection to a + // network share on which the document + // is located + + OLE_ERROR_NAME, // 29 Invalid name (doc name, object name), + // etc.. passed to the APIs + + OLE_ERROR_TEMPLATE, // 30 Server failed to load template + OLE_ERROR_NEW, // 31 Server failed to create new doc + OLE_ERROR_EDIT, // 32 Server failed to create embedded + // instance + OLE_ERROR_OPEN, // 33 Server failed to open document, + // possible invalid link + + OLE_ERROR_NOT_OPEN, // 34 Object is not open for editing + OLE_ERROR_LAUNCH, // 35 Failed to launch server + OLE_ERROR_COMM, // 36 Failed to communicate with server + OLE_ERROR_TERMINATE, // 37 Error in termination + OLE_ERROR_COMMAND, // 38 Error in execute + OLE_ERROR_SHOW, // 39 Error in show + OLE_ERROR_DOVERB, // 40 Error in sending do verb, or invalid + // verb + OLE_ERROR_ADVISE_NATIVE, // 41 Item could be missing + OLE_ERROR_ADVISE_PICT, // 42 Item could be missing or server doesn't + // this format. + + OLE_ERROR_ADVISE_RENAME, // 43 Server doesn't support rename + OLE_ERROR_POKE_NATIVE, // 44 Failure of poking native data to server + OLE_ERROR_REQUEST_NATIVE, // 45 Server failed to render native data + OLE_ERROR_REQUEST_PICT, // 46 Server failed to render presentation + // data + OLE_ERROR_SERVER_BLOCKED, // 47 Trying to block a blocked server or + // trying to revoke a blocked server + // or document + + OLE_ERROR_REGISTRATION, // 48 Server is not registered in regestation + // data base + OLE_ERROR_ALREADY_REGISTERED,//49 Trying to register same doc multiple + // times + OLE_ERROR_TASK, // 50 Server or client task is invalid + OLE_ERROR_OUTOFDATE, // 51 Object is out of date + OLE_ERROR_CANT_UPDATE_CLIENT,// 52 embed doc's client doesn't accept + // updates + OLE_ERROR_UPDATE, // 53 erorr while trying to update + + // Following are warnings + OLE_WARN_DELETE_DATA = 1000 // Caller must delete the data when he is + // done with it. +} OLESTATUS; + + + +// Codes for CallBack events +typedef enum { + OLE_CHANGED, // 0 + OLE_SAVED, // 1 + OLE_CLOSED, // 2 + OLE_RENAMED, // 3 + OLE_QUERY_PAINT, // 4 Interruptible paint support + OLE_RELEASE, // 5 Object is released (asynchronous operation + // is completed) + OLE_QUERY_RETRY, // 6 Query for retry when server sends busy ACK +} OLE_NOTIFICATION; + + +typedef enum { + OLE_NONE, // 0 no method active + OLE_DELETE, // 1 object delete + OLE_LNKPASTE, // 2 PasteLink (auto reconnect) + OLE_EMBPASTE, // 3 paste (and update) + OLE_SHOW, // 4 Show + OLE_RUN, // 5 Run + OLE_ACTIVATE, // 6 Activate + OLE_UPDATE, // 7 Update + OLE_CLOSE, // 8 Close + OLE_RECONNECT, // 9 Reconnect + OLE_SETUPDATEOPTIONS, // 10 setting update options + OLE_SERVERUNLAUNCH, // 11 server is being unlaunched + OLE_LOADFROMSTREAM, // 12 LoadFromStream (auto reconnect) + OLE_SETDATA, // 13 OleSetData + OLE_REQUESTDATA, // 14 OleRequestData + OLE_OTHER, // 15 other misc async operations + OLE_CREATE, // 16 create + OLE_CREATEFROMTEMPLATE, // 17 CreatefromTemplate + OLE_CREATELINKFROMFILE, // 18 CreateLinkFromFile + OLE_COPYFROMLNK, // 19 CopyFromLink (auto reconnect) + OLE_CREATEFROMFILE, // 20 CreateFromFile +} OLE_RELEASE_METHOD; + +// rendering options +typedef enum { olerender_none, olerender_draw, olerender_format } OLEOPT_RENDER; + +typedef UINT OLECLIPFORMAT; // standard clipboard format type + + +// Link update options +typedef enum { oleupdate_always, + oleupdate_onsave, + oleupdate_oncall, +#ifdef OLE_INTERNAL + oleupdate_onclose +#endif +} OLEOPT_UPDATE; + +typedef HANDLE HOBJECT; +typedef LONG LHSERVER; +typedef LONG LHCLIENTDOC; +typedef LONG LHSERVERDOC; + +typedef struct _OLEOBJECT FAR * LPOLEOBJECT; +typedef struct _OLESTREAM FAR * LPOLESTREAM; +typedef struct _OLECLIENT FAR * LPOLECLIENT; + +#ifndef OLE_INTERNAL +// object method table definitions. +typedef struct _OLEOBJECTVTBL{ + LPVOID (FAR PASCAL *QueryProtocol) (LPOLEOBJECT, LPSTR); + OLESTATUS (FAR PASCAL *Release) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *Show) (LPOLEOBJECT, BOOL); + OLESTATUS (FAR PASCAL *DoVerb) (LPOLEOBJECT, UINT, BOOL, BOOL); + OLESTATUS (FAR PASCAL *GetData) (LPOLEOBJECT, OLECLIPFORMAT, LPHANDLE); + OLESTATUS (FAR PASCAL *SetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE); + OLESTATUS (FAR PASCAL *SetTargetDevice) (LPOLEOBJECT, HANDLE); + OLESTATUS (FAR PASCAL *SetBounds) (LPOLEOBJECT, LPRECT); + OLECLIPFORMAT (FAR PASCAL *EnumFormats) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (FAR PASCAL *SetColorScheme) (LPOLEOBJECT, LPLOGPALETTE); + + // Server has to implement only the above methods. + +#ifndef SERVERONLY + // Extra methods required for client. + OLESTATUS (FAR PASCAL *Delete) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *SetHostNames) (LPOLEOBJECT, LPSTR, LPSTR); + OLESTATUS (FAR PASCAL *SaveToStream) (LPOLEOBJECT, LPOLESTREAM); + OLESTATUS (FAR PASCAL *Clone) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + OLESTATUS (FAR PASCAL *CopyFromLink) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + OLESTATUS (FAR PASCAL *Equal) (LPOLEOBJECT, LPOLEOBJECT); + OLESTATUS (FAR PASCAL *CopyToClipboard) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *Draw) (LPOLEOBJECT, HDC, LPRECT, LPRECT, HDC); + OLESTATUS (FAR PASCAL *Activate) (LPOLEOBJECT, UINT, BOOL, BOOL, HWND, LPRECT); + OLESTATUS (FAR PASCAL *Execute) (LPOLEOBJECT, HANDLE, UINT); + OLESTATUS (FAR PASCAL *Close) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *Update) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *Reconnect) (LPOLEOBJECT); + + OLESTATUS (FAR PASCAL *ObjectConvert) (LPOLEOBJECT, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + OLESTATUS (FAR PASCAL *GetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE FAR *); + OLESTATUS (FAR PASCAL *SetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE); + + OLESTATUS (FAR PASCAL *Rename) (LPOLEOBJECT, LPSTR); + OLESTATUS (FAR PASCAL *QueryName) (LPOLEOBJECT, LPSTR, UINT FAR *); + + OLESTATUS (FAR PASCAL *QueryType) (LPOLEOBJECT, LPLONG); + OLESTATUS (FAR PASCAL *QueryBounds) (LPOLEOBJECT, LPRECT); + OLESTATUS (FAR PASCAL *QuerySize) (LPOLEOBJECT, DWORD FAR *); + OLESTATUS (FAR PASCAL *QueryOpen) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *QueryOutOfDate) (LPOLEOBJECT); + + OLESTATUS (FAR PASCAL *QueryReleaseStatus) (LPOLEOBJECT); + OLESTATUS (FAR PASCAL *QueryReleaseError) (LPOLEOBJECT); + OLE_RELEASE_METHOD (FAR PASCAL *QueryReleaseMethod)(LPOLEOBJECT); + + OLESTATUS (FAR PASCAL *RequestData) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (FAR PASCAL *ObjectLong) (LPOLEOBJECT, UINT, LPLONG); + +// This method is internal only + OLESTATUS (FAR PASCAL *ChangeData) (LPOLEOBJECT, HANDLE, LPOLECLIENT, BOOL); +#endif +} OLEOBJECTVTBL; +typedef OLEOBJECTVTBL FAR *LPOLEOBJECTVTBL; + +typedef struct _OLEOBJECT { + LPOLEOBJECTVTBL lpvtbl; +} OLEOBJECT; +#endif + + +// ole client definitions + +typedef struct _OLECLIENTVTBL{ + int (pascal far *CallBack) (LPOLECLIENT, OLE_NOTIFICATION, LPOLEOBJECT); +} OLECLIENTVTBL; +typedef OLECLIENTVTBL FAR *LPOLECLIENTVTBL; + + +typedef struct _OLECLIENT { + LPOLECLIENTVTBL lpvtbl; +} OLECLIENT; + + + +// Stream definitions +typedef struct _OLESTREAMVTBL{ + DWORD (pascal far *Get) (LPOLESTREAM, LPSTR, DWORD); + DWORD (pascal far *Put) (LPOLESTREAM, LPSTR, DWORD); +} OLESTREAMVTBL; + +typedef OLESTREAMVTBL FAR *LPOLESTREAMVTBL; + +typedef struct _OLESTREAM { + LPOLESTREAMVTBL lpstbl; +} OLESTREAM; + + +// Public Function Prototypes +OLESTATUS FAR PASCAL OleDelete (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleRelease (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleSaveToStream (LPOLEOBJECT, LPOLESTREAM); +OLESTATUS FAR PASCAL OleEqual (LPOLEOBJECT, LPOLEOBJECT ); +OLESTATUS FAR PASCAL OleCopyToClipboard (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleSetHostNames (LPOLEOBJECT, LPSTR, LPSTR); +OLESTATUS FAR PASCAL OleSetTargetDevice (LPOLEOBJECT, HANDLE); +OLESTATUS FAR PASCAL OleSetBounds (LPOLEOBJECT, LPRECT); +OLESTATUS FAR PASCAL OleSetColorScheme (LPOLEOBJECT, LPLOGPALETTE); +OLESTATUS FAR PASCAL OleQueryBounds (LPOLEOBJECT, LPRECT); +OLESTATUS FAR PASCAL OleQuerySize (LPOLEOBJECT, DWORD FAR *); +OLESTATUS FAR PASCAL OleDraw (LPOLEOBJECT, HDC, LPRECT, LPRECT, HDC); +OLESTATUS FAR PASCAL OleQueryOpen (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleActivate (LPOLEOBJECT, UINT, BOOL, BOOL, HWND, LPRECT); +OLESTATUS FAR PASCAL OleExecute (LPOLEOBJECT, HANDLE, UINT); +OLESTATUS FAR PASCAL OleClose (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleUpdate (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleReconnect (LPOLEOBJECT); + +OLESTATUS FAR PASCAL OleGetLinkUpdateOptions (LPOLEOBJECT, OLEOPT_UPDATE FAR *); +OLESTATUS FAR PASCAL OleSetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE); + + +LPVOID FAR PASCAL OleQueryProtocol (LPOLEOBJECT, LPSTR); + + +// Routines related to asynchronous operations. +OLESTATUS FAR PASCAL OleQueryReleaseStatus (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleQueryReleaseError (LPOLEOBJECT); +OLE_RELEASE_METHOD FAR PASCAL OleQueryReleaseMethod (LPOLEOBJECT); + +OLESTATUS FAR PASCAL OleQueryType (LPOLEOBJECT, LPLONG); + +// LOW WORD is major version, HIWORD is minor version +DWORD FAR PASCAL OleQueryClientVersion (void); +DWORD FAR PASCAL OleQueryServerVersion (void); + +// Converting to format (as in clipboard): +OLECLIPFORMAT FAR PASCAL OleEnumFormats (LPOLEOBJECT, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleGetData (LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR *); +OLESTATUS FAR PASCAL OleSetData (LPOLEOBJECT, OLECLIPFORMAT, HANDLE ); +OLESTATUS FAR PASCAL OleQueryOutOfDate (LPOLEOBJECT); +OLESTATUS FAR PASCAL OleRequestData (LPOLEOBJECT, OLECLIPFORMAT); + + +// Query apis for creation from clipboard +OLESTATUS FAR PASCAL OleQueryLinkFromClip (LPSTR, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS FAR PASCAL OleQueryCreateFromClip (LPSTR, OLEOPT_RENDER, OLECLIPFORMAT); + +// Object creation functions + +OLESTATUS FAR PASCAL OleCreateFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleCreateLinkFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleCreateFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleCreateLinkFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleLoadFromStream (LPOLESTREAM, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + +OLESTATUS FAR PASCAL OleCreate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleCreateFromTemplate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT); + +OLESTATUS FAR PASCAL OleClone (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); +OLESTATUS FAR PASCAL OleCopyFromLink (LPOLEOBJECT, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + +OLESTATUS FAR PASCAL OleObjectConvert (LPOLEOBJECT, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *); + +OLESTATUS FAR PASCAL OleRename (LPOLEOBJECT, LPSTR); +OLESTATUS FAR PASCAL OleQueryName (LPOLEOBJECT, LPSTR, UINT FAR *); + + +OLESTATUS FAR PASCAL OleRevokeObject (LPOLECLIENT); +BOOL FAR PASCAL OleIsDcMeta (HDC); + +// client document API + +OLESTATUS FAR PASCAL OleRegisterClientDoc (LPSTR, LPSTR, LONG, LHCLIENTDOC FAR *); +OLESTATUS FAR PASCAL OleRevokeClientDoc (LHCLIENTDOC); +OLESTATUS FAR PASCAL OleRenameClientDoc (LHCLIENTDOC, LPSTR); +OLESTATUS FAR PASCAL OleRevertClientDoc (LHCLIENTDOC); +OLESTATUS FAR PASCAL OleSavedClientDoc (LHCLIENTDOC); +OLESTATUS FAR PASCAL OleEnumObjects (LHCLIENTDOC, LPOLEOBJECT FAR *); + +// server usage definitions + +typedef enum { + OLE_SERVER_MULTI, // multiple instances + OLE_SERVER_SINGLE // single instance (multiple document) +} OLE_SERVER_USE; + + +// Server API + +typedef struct _OLESERVER FAR * LPOLESERVER; + +OLESTATUS FAR PASCAL OleRegisterServer (LPSTR, LPOLESERVER, LHSERVER FAR *, HANDLE, OLE_SERVER_USE); +OLESTATUS FAR PASCAL OleRevokeServer (LHSERVER); +OLESTATUS FAR PASCAL OleBlockServer (LHSERVER); +OLESTATUS FAR PASCAL OleUnblockServer (LHSERVER, BOOL FAR *); + + +// APIs to keep server open +OLESTATUS FAR PASCAL OleLockServer (LPOLEOBJECT, LHSERVER FAR *); +OLESTATUS FAR PASCAL OleUnlockServer (LHSERVER); + + +// Server document API + +typedef struct _OLESERVERDOC FAR * LPOLESERVERDOC; + +OLESTATUS FAR PASCAL OleRegisterServerDoc (LHSERVER, LPSTR, LPOLESERVERDOC, LHSERVERDOC FAR *); +OLESTATUS FAR PASCAL OleRevokeServerDoc (LHSERVERDOC); +OLESTATUS FAR PASCAL OleRenameServerDoc (LHSERVERDOC, LPSTR); +OLESTATUS FAR PASCAL OleRevertServerDoc (LHSERVERDOC); +OLESTATUS FAR PASCAL OleSavedServerDoc (LHSERVERDOC); + + +typedef struct _OLESERVERVTBL{ + OLESTATUS (FAR PASCAL *Open) (LPOLESERVER, LHSERVERDOC, LPSTR, LPOLESERVERDOC FAR *); + // long handle to doc (privtate to DLL) + // lp to OLESERVER + // document name + // place holder for returning oledoc. + + + OLESTATUS (FAR PASCAL *Create) (LPOLESERVER, LHSERVERDOC, LPSTR, LPSTR, LPOLESERVERDOC FAR *); + // long handle to doc (privtate to DLL) + // lp to OLESERVER + // lp class name + // lp doc name + // place holder for returning oledoc. + + + OLESTATUS (FAR PASCAL *CreateFromTemplate) (LPOLESERVER, LHSERVERDOC, LPSTR, LPSTR, LPSTR, LPOLESERVERDOC FAR *); + + // long handle to doc (privtate to DLL) + // lp to OLESERVER + // lp class name + // lp doc name + // lp template name + // place holder for returning oledoc. + + + OLESTATUS (FAR PASCAL *Edit) (LPOLESERVER, LHSERVERDOC, LPSTR, LPSTR, LPOLESERVERDOC FAR *); + + // long handle to doc (privtate to DLL) + // lp to OLESERVER + // lp class name + // lp doc name + // place holder for returning oledoc. + + OLESTATUS (FAR PASCAL *Exit) (LPOLESERVER); + + // lp OLESERVER + + + OLESTATUS (FAR PASCAL *Release) (LPOLESERVER); + // lp OLESERVER + + OLESTATUS (FAR PASCAL *Execute) (LPOLESERVER, HANDLE); + // lp OLESERVER + // handle to command strings + +} OLESERVERVTBL; + +typedef OLESERVERVTBL FAR *LPOLESERVERVTBL; +typedef struct _OLESERVER { + LPOLESERVERVTBL lpvtbl; +} OLESERVER; + + +typedef struct _OLEDOCMENTVTBL{ + OLESTATUS (FAR PASCAL *Save) (LPOLESERVERDOC); + OLESTATUS (FAR PASCAL *Close) (LPOLESERVERDOC); + OLESTATUS (FAR PASCAL *SetHostNames) (LPOLESERVERDOC, LPSTR, LPSTR); + OLESTATUS (FAR PASCAL *SetDocDimensions) (LPOLESERVERDOC, LPRECT); + OLESTATUS (FAR PASCAL *GetObject) (LPOLESERVERDOC, LPSTR, LPOLEOBJECT FAR *, LPOLECLIENT); + OLESTATUS (FAR PASCAL *Release) (LPOLESERVERDOC); + OLESTATUS (FAR PASCAL *SetColorScheme) (LPOLESERVERDOC, LPLOGPALETTE); + OLESTATUS (FAR PASCAL *Execute) (LPOLESERVERDOC, HANDLE); +} OLESERVERDOCVTBL; + + +typedef OLESERVERDOCVTBL FAR *LPOLESERVERDOCVTBL; +typedef struct _OLESERVERDOC { + LPOLESERVERDOCVTBL lpvtbl; +} OLESERVERDOC; diff --git a/private/oleauto/tools/win16/os2/inc/os2.h b/private/oleauto/tools/win16/os2/inc/os2.h new file mode 100644 index 000000000..b17b4d3fe --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/os2.h @@ -0,0 +1,28 @@ +/****************************** Module Header ******************************\ +* +* Module Name: OS2.H +* +* This is the top level include file that includes all the files necessary +* for writing an OS/2 application. +* +* Copyright (c) 1987-1991, Microsoft Corporation. All rights reserved. +* +\***************************************************************************/ + +#define OS2_INCLUDED + +/* Common definitions */ + +#ifndef OS2DEF_INCLUDED /* Only include it once */ +#include <os2def.h> +#endif + +/* OS/2 Base Include File */ + +#include <bse.h> + +/* OS/2 Presentation Manager Include File */ + +#ifndef INCL_NOPM +#include <pm.h> +#endif /* !INCL_NOPM */ diff --git a/private/oleauto/tools/win16/os2/inc/os2def.h b/private/oleauto/tools/win16/os2/inc/os2def.h new file mode 100644 index 000000000..01ea3b391 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/os2def.h @@ -0,0 +1,405 @@ +/***************************************************************************\ +* +* Module Name: OS2DEF.H +* +* OS/2 Common Definitions file +* +* Copyright (c) 1987-1991, Microsoft Corporation. All rights reserved. +* +\***************************************************************************/ + +/* XLATOFF */ +#define PASCAL pascal +#define FAR far +#define NEAR near +#define VOID void +/* XLATON */ + +typedef unsigned short SHANDLE; +typedef void far *LHANDLE; + +/* XLATOFF */ +#define EXPENTRY pascal far _loadds +#define APIENTRY pascal far + +/* Backwards compatability with 1.1 */ +#define CALLBACK pascal far _loadds + +#define CHAR char /* ch */ +#define SHORT short /* s */ +#define LONG long /* l */ +#ifndef INCL_SAADEFS +#define INT int /* i */ +#endif /* !INCL_SAADEFS */ +/* XLATON */ + +typedef unsigned char UCHAR; /* uch */ +typedef unsigned short USHORT; /* us */ +typedef unsigned long ULONG; /* ul */ +#ifndef INCL_SAADEFS +typedef unsigned int UINT; /* ui */ +#endif /* !INCL_SAADEFS */ + +typedef unsigned char BYTE; /* b */ + +/* define NULL pointer value (must match stdlib.h definition) */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +typedef unsigned char far *PSZ; +typedef unsigned char near *NPSZ; + +typedef unsigned char far *PCH; +typedef unsigned char near *NPCH; + +typedef int (pascal far *PFN)(); +typedef int (pascal near *NPFN)(); +typedef PFN far *PPFN; + +typedef BYTE FAR *PBYTE; +typedef BYTE near *NPBYTE; + +typedef CHAR FAR *PCHAR; +typedef SHORT FAR *PSHORT; +typedef LONG FAR *PLONG; +#ifndef INCL_SAADEFS +typedef INT FAR *PINT; +#endif /* !INCL_SAADEFS */ + +typedef UCHAR FAR *PUCHAR; +typedef USHORT FAR *PUSHORT; +typedef ULONG FAR *PULONG; +#ifndef INCL_SAADEFS +typedef UINT FAR *PUINT; +#endif /* !INCL_SAADEFS */ + +typedef VOID FAR *PVOID; + +typedef unsigned short BOOL; /* f */ +typedef BOOL FAR *PBOOL; + +#define FALSE 0 +#define TRUE 1 + +#ifndef INCL_SAADEFS +typedef unsigned short SEL; /* sel */ +typedef SEL FAR *PSEL; + +/*** Useful Helper Macros */ + +/* Create untyped far pointer from selector and offset */ +#define MAKEP(sel, off) ((PVOID)MAKEULONG(off, sel)) + +/* Extract selector or offset from far pointer */ +#define SELECTOROF(p) (((PUSHORT)&(p))[1]) +#define OFFSETOF(p) (((PUSHORT)&(p))[0]) +#endif /* !INCL_SAADEFS */ + +/* Cast any variable to an instance of the specified type. */ +#define MAKETYPE(v, type) (*((type far *)&v)) + +/* Calculate the byte offset of a field in a structure of type type. */ +#define FIELDOFFSET(type, field) ((SHORT)&(((type *)0)->field)) + +/* Combine l & h to form a 32 bit quantity. */ +#define MAKEULONG(l, h) ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h))) << 16)) +#define MAKELONG(l, h) ((LONG)MAKEULONG(l, h)) + +/* Combine l & h to form a 16 bit quantity. */ +#define MAKEUSHORT(l, h) (((USHORT)(l)) | ((USHORT)(h)) << 8) +#define MAKESHORT(l, h) ((SHORT)MAKEUSHORT(l, h)) + +/* Extract high and low order parts of 16 and 32 bit quantity */ +#define LOBYTE(w) LOUCHAR(w) +#define HIBYTE(w) HIUCHAR(w) +#define LOUCHAR(w) ((UCHAR)(w)) +#define HIUCHAR(w) ((UCHAR)(((USHORT)(w) >> 8) & 0xff)) +#define LOUSHORT(l) ((USHORT)(l)) +#define HIUSHORT(l) ((USHORT)(((ULONG)(l) >> 16) & 0xffff)) + +/*** Common Error definitions ****/ + +typedef ULONG ERRORID; /* errid */ +typedef ERRORID FAR *PERRORID; + +/* Combine severity and error code to produce ERRORID */ +#define MAKEERRORID(sev, error) (ERRORID)(MAKEULONG((error), (sev))) +/* Extract error number from an errorid */ +#define ERRORIDERROR(errid) (LOUSHORT(errid)) +/* Extract severity from an errorid */ +#define ERRORIDSEV(errid) (HIUSHORT(errid)) + +/* Severity codes */ +#define SEVERITY_NOERROR 0x0000 +#define SEVERITY_WARNING 0x0004 +#define SEVERITY_ERROR 0x0008 +#define SEVERITY_SEVERE 0x000C +#define SEVERITY_UNRECOVERABLE 0x0010 + +/* Base component error values */ + +#define WINERR_BASE 0x1000 /* Window Manager */ +#define GPIERR_BASE 0x2000 /* Graphics Presentation Interface */ +#define DEVERR_BASE 0x3000 /* Device Manager */ +#define SPLERR_BASE 0x4000 /* Spooler */ + +/*** Common types used across components */ + +/*** Common DOS types */ + +typedef USHORT HMODULE; /* hmod */ +typedef HMODULE FAR *PHMODULE; + +#ifndef INCL_SAADEFS +typedef USHORT PID; /* pid */ +typedef PID FAR *PPID; + +typedef USHORT TID; /* tid */ +typedef TID FAR *PTID; + +typedef VOID FAR *HSEM; /* hsem */ +typedef HSEM FAR *PHSEM; +#endif /* !INCL_SAADEFS */ + +/*** Common SUP types */ + +typedef LHANDLE HAB; /* hab */ +typedef HAB FAR *PHAB; + +/*** Common GPI/DEV types */ + +typedef LHANDLE HPS; /* hps */ +typedef HPS FAR *PHPS; + +typedef LHANDLE HDC; /* hdc */ +typedef HDC FAR *PHDC; + +typedef LHANDLE HRGN; /* hrgn */ +typedef HRGN FAR *PHRGN; + +typedef LHANDLE HBITMAP; /* hbm */ +typedef HBITMAP FAR *PHBITMAP; + +typedef LHANDLE HMF; /* hmf */ +typedef HMF FAR *PHMF; + +typedef LONG COLOR; /* clr */ +typedef COLOR FAR *PCOLOR; + +typedef struct _POINTL { /* ptl */ + LONG x; + LONG y; +} POINTL; +typedef POINTL FAR *PPOINTL; +typedef POINTL near *NPPOINTL; + +typedef struct _POINTS { /* pts */ + SHORT x; + SHORT y; +} POINTS; +typedef POINTS FAR *PPOINTS; + +typedef struct _RECTL { /* rcl */ + LONG xLeft; + LONG yBottom; + LONG xRight; + LONG yTop; +} RECTL; +typedef RECTL FAR *PRECTL; +typedef RECTL near *NPRECTL; + +typedef CHAR STR8[8]; /* str8 */ +typedef STR8 FAR *PSTR8; + +/*** common DEV/SPL types */ + +/* structure for Device Driver data */ + +typedef struct _DRIVDATA { /* driv */ + LONG cb; + LONG lVersion; + CHAR szDeviceName[32]; + CHAR abGeneralData[1]; +} DRIVDATA; +typedef DRIVDATA far *PDRIVDATA; + +/* array indices for array parameter for DevOpenDC, SplQmOpen or SplQpOpen */ + +#define ADDRESS 0 +#ifndef INCL_SAADEFS +#define DRIVER_NAME 1 +#define DRIVER_DATA 2 +#define DATA_TYPE 3 +#define COMMENT 4 +#define PROC_NAME 5 +#define PROC_PARAMS 6 +#define SPL_PARAMS 7 +#define NETWORK_PARAMS 8 +#endif /* !INCL_SAADEFS */ + +/* structure definition as an alternative of the array parameter */ + +typedef struct _DEVOPENSTRUC { /* dop */ + PSZ pszLogAddress; + PSZ pszDriverName; + PDRIVDATA pdriv; + PSZ pszDataType; + PSZ pszComment; + PSZ pszQueueProcName; + PSZ pszQueueProcParams; + PSZ pszSpoolerParams; + PSZ pszNetworkParams; +} DEVOPENSTRUC; +typedef DEVOPENSTRUC FAR *PDEVOPENSTRUC; + +/*** common AVIO/GPI types */ + +/* values of fsSelection field of FATTRS structure */ +#define FATTR_SEL_ITALIC 0x0001 +#define FATTR_SEL_UNDERSCORE 0x0002 +#define FATTR_SEL_OUTLINE 0x0008 /* Hollow Outline Font */ +#define FATTR_SEL_STRIKEOUT 0x0010 +#define FATTR_SEL_BOLD 0x0020 + +/* values of fsType field of FATTRS structure */ +#define FATTR_TYPE_KERNING 0x0004 +#define FATTR_TYPE_MBCS 0x0008 +#define FATTR_TYPE_DBCS 0x0010 +#define FATTR_TYPE_ANTIALIASED 0x0020 + +/* values of fsFontUse field of FATTRS structure */ +#define FATTR_FONTUSE_NOMIX 0x0002 +#define FATTR_FONTUSE_OUTLINE 0x0004 +#define FATTR_FONTUSE_TRANSFORMABLE 0x0008 + + +/* size for fields in the font structures */ + +#define FACESIZE 32 + +/* font struct for Vio/GpiCreateLogFont */ + +typedef struct _FATTRS { /* fat */ + USHORT usRecordLength; + USHORT fsSelection; + LONG lMatch; + CHAR szFacename[FACESIZE]; + USHORT idRegistry; + USHORT usCodePage; + LONG lMaxBaselineExt; + LONG lAveCharWidth; + USHORT fsType; + USHORT fsFontUse; +} FATTRS; +typedef FATTRS far *PFATTRS; + +/* values of fsType field of FONTMETRICS structure */ +#define FM_TYPE_FIXED 0x0001 +#define FM_TYPE_LICENSED 0x0002 +#define FM_TYPE_KERNING 0x0004 +#define FM_TYPE_DBCS 0x0010 +#define FM_TYPE_MBCS 0x0018 +#define FM_TYPE_64K 0x8000 + +/* values of fsDefn field of FONTMETRICS structure */ +#define FM_DEFN_OUTLINE 0x0001 +#define FM_DEFN_GENERIC 0x8000 + +/* values of fsSelection field of FONTMETRICS structure */ +#define FM_SEL_ITALIC 0x0001 +#define FM_SEL_UNDERSCORE 0x0002 +#define FM_SEL_NEGATIVE 0x0004 +#define FM_SEL_OUTLINE 0x0008 /* Hollow Outline Font */ +#define FM_SEL_STRIKEOUT 0x0010 +#define FM_SEL_BOLD 0x0020 + +/* values of fsCapabilities field of FONTMETRICS structure */ +#define FM_CAP_NOMIX 0x0001 + +/* font metrics returned by GpiQueryFonts and others */ + +typedef struct _FONTMETRICS { /* fm */ + CHAR szFamilyname[FACESIZE]; + CHAR szFacename[FACESIZE]; + USHORT idRegistry; + USHORT usCodePage; + LONG lEmHeight; + LONG lXHeight; + LONG lMaxAscender; + LONG lMaxDescender; + LONG lLowerCaseAscent; + LONG lLowerCaseDescent; + LONG lInternalLeading; + LONG lExternalLeading; + LONG lAveCharWidth; + LONG lMaxCharInc; + LONG lEmInc; + LONG lMaxBaselineExt; + SHORT sCharSlope; + SHORT sInlineDir; + SHORT sCharRot; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT sXDeviceRes; + SHORT sYDeviceRes; + SHORT sFirstChar; + SHORT sLastChar; + SHORT sDefaultChar; + SHORT sBreakChar; + SHORT sNominalPointSize; + SHORT sMinimumPointSize; + SHORT sMaximumPointSize; + USHORT fsType; + USHORT fsDefn; + USHORT fsSelection; + USHORT fsCapabilities; + LONG lSubscriptXSize; + LONG lSubscriptYSize; + LONG lSubscriptXOffset; + LONG lSubscriptYOffset; + LONG lSuperscriptXSize; + LONG lSuperscriptYSize; + LONG lSuperscriptXOffset; + LONG lSuperscriptYOffset; + LONG lUnderscoreSize; + LONG lUnderscorePosition; + LONG lStrikeoutSize; + LONG lStrikeoutPosition; + SHORT sKerningPairs; + SHORT sFamilyClass; + LONG lMatch; +} FONTMETRICS; +typedef FONTMETRICS far *PFONTMETRICS; + +/*** Common WIN types */ + +typedef LHANDLE HWND; /* hwnd */ +typedef HWND FAR *PHWND; + +typedef struct _WRECT { /* wrc */ + SHORT xLeft; + SHORT dummy1; + SHORT yBottom; + SHORT dummy2; + SHORT xRight; + SHORT dummy3; + SHORT yTop; + SHORT dummy4; +} WRECT; +typedef WRECT FAR *PWRECT; +typedef WRECT near *NPWRECT; + +typedef struct _WPOINT { /* wpt */ + SHORT x; + SHORT dummy1; + SHORT y; + SHORT dummy2; +} WPOINT; +typedef WPOINT FAR *PWPOINT; +typedef WPOINT near *NPWPOINT; diff --git a/private/oleauto/tools/win16/os2/inc/ostream.h b/private/oleauto/tools/win16/os2/inc/ostream.h new file mode 100644 index 000000000..cc431f06f --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ostream.h @@ -0,0 +1,119 @@ +/*** +*ostream.h - definitions/declarations for the ostream class +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ostream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_OSTREAM +#define _INC_OSTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +typedef long streamoff, streampos; + +class ostream: /* virtual */ public ios { + +public: + ostream(streambuf*); + virtual ~ostream(); + + ostream& flush(); + int opfx(); + void osfx(); + +inline ostream& operator<<(ostream& (*f)(ostream&)); +inline ostream& operator<<(ios& (*f)(ios&)); + ostream& operator<<(const char*); +inline ostream& operator<<(const unsigned char*); +inline ostream& operator<<(const signed char*); +inline ostream& operator<<(char); + ostream& operator<<(unsigned char); +inline ostream& operator<<(signed char); + ostream& operator<<(short); + ostream& operator<<(unsigned short); + ostream& operator<<(int); + ostream& operator<<(unsigned int); + ostream& operator<<(long); + ostream& operator<<(unsigned long); +inline ostream& operator<<(float); + ostream& operator<<(double); + ostream& operator<<(long double); + ostream& operator<<(void*); + ostream& operator<<(streambuf*); +inline ostream& put(char); + ostream& put(unsigned char); +inline ostream& put(signed char); + ostream& write(const char *,int); +inline ostream& write(const unsigned char *,int); +inline ostream& write(const signed char *,int); + ostream& seekp(streampos); + ostream& seekp(streamoff,ios::seek_dir); + streampos tellp(); + +protected: + ostream(); + int do_opfx(int); // not used + void do_osfx(); // not used + +private: + ostream(ostream&); + ostream(ios&); + void operator=(ostream&); + ostream& writepad(const char *, const char *); + int x_floatused; +}; + +inline ostream& ostream::operator<<(ostream& (*f)(ostream&)) { (*f)(*this); return *this; } +inline ostream& ostream::operator<<(ios& (*f)(ios& )) { (*f)(*this); return *this; } + +inline ostream& ostream::operator<<(char c) { return operator<<((unsigned char) c); } +inline ostream& ostream::operator<<(signed char c) { return operator<<((unsigned char) c); } + +inline ostream& ostream::operator<<(const unsigned char* s) { return operator<<((const char*) s); } +inline ostream& ostream::operator<<(const signed char* s) { return operator<<((const char*) s); } + +inline ostream& ostream::operator<<(float f) { x_floatused = 1; return operator<<((double) f); } + +inline ostream& ostream::put(char c) { return put((unsigned char) c); } +inline ostream& ostream::put(signed char c) { return put((unsigned char) c); } + +inline ostream& ostream::write(const unsigned char * s, int n) { return write((char*) s, n); } +inline ostream& ostream::write(const signed char * s, int n) { return write((char*) s, n); } + + +class ostream_withassign : public ostream { + public: // not in spec. + ostream_withassign(); + ostream_withassign(streambuf* _is); + ~ostream_withassign(); // not in spec. + ostream& operator=(const ostream&); + ostream& operator=(streambuf*); +}; + +#if ((!defined(_WINDOWS)) || defined(_QWIN)) +extern ostream_withassign cout; +extern ostream_withassign cerr; +extern ostream_withassign clog; +#endif + +inline ostream& flush(ostream& _outs) { return _outs.flush(); } +inline ostream& endl(ostream& _outs) { return _outs << '\n' << flush; } +inline ostream& ends(ostream& _outs) { return _outs << char('\0'); } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif // !_INC_OSTREAM diff --git a/private/oleauto/tools/win16/os2/inc/pgchart.h b/private/oleauto/tools/win16/os2/inc/pgchart.h new file mode 100644 index 000000000..5be26e358 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pgchart.h @@ -0,0 +1,256 @@ +/*** +*pgchart.h - Declare constants, functions and macros for charting library. +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the presentation graphics library functions and +* the structures and manifest constants that are used with them. +* +***************************************************************************/ + + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* Force word alignment to avoid possible -Zp override */ +#pragma pack(2) + + +/* Required for the missing value definition */ +#ifndef FLT_MAX +#define FLT_MAX 3.402823466e+38F /* max value */ +#endif + +#define _PG_PALETTELEN 16 /* Number of entries in internal palette */ +#define _PG_MAXCHARTTYPE 5 /* Maximum available chart type */ +#define _PG_MAXCHARTSTYLE 2 /* Maximum chart style */ +#define _PG_TITLELEN 70 /* Maximum title text length */ + +#define _PG_LEFT 1 /* Positions used for titles and legends */ +#define _PG_CENTER 2 +#define _PG_RIGHT 3 +#define _PG_BOTTOM 4 +#define _PG_OVERLAY 5 + +#define _PG_LINEARAXIS 1 /* Used to specify axis types */ +#define _PG_LOGAXIS 2 + +#define _PG_DECFORMAT 1 /* Used to specify tic mark label format */ +#define _PG_EXPFORMAT 2 + +#define _PG_BARCHART 1 /* Charttype for a bar chart */ +#define _PG_COLUMNCHART 2 /* Charttype for a column chart */ +#define _PG_PLAINBARS 1 /* Styles for bar and column charts */ +#define _PG_STACKEDBARS 2 + +#define _PG_LINECHART 3 /* Charttype for a line chart */ +#define _PG_SCATTERCHART 4 /* Charttype for a scatter chart */ +#define _PG_POINTANDLINE 1 /* Styles for line and scatter charts */ +#define _PG_POINTONLY 2 + +#define _PG_PIECHART 5 /* Charttype for pie chart */ +#define _PG_PERCENT 1 /* Styles for pie charts */ +#define _PG_NOPERCENT 2 + +#define _PG_MISSINGVALUE (-FLT_MAX) /* Indicates missing data values */ + + +/* Error codes */ + +/* Numbers greater than 100 will terminate chart routine, others will cause + * default values to be used + */ +#define _PG_NOTINITIALIZED 102 /* If library not initialized */ +#define _PG_BADSCREENMODE 103 /* Graphics mode not set before charting */ +#define _PG_BADCHARTSTYLE 04 /* Chart style invalid */ +#define _PG_BADCHARTTYPE 104 /* Chart type invalid */ +#define _PG_BADLEGENDWINDOW 105 /* Invalid legend window specified */ +#define _PG_BADCHARTWINDOW 07 /* x1=x2 or y1=y2 in chart window spec. */ +#define _PG_BADDATAWINDOW 107 /* If chart window is too small */ +#define _PG_NOMEMORY 108 /* Not enough memory for data arrays */ +#define _PG_BADLOGBASE 05 /* Log base <= 0 */ +#define _PG_BADSCALEFACTOR 06 /* Scale factor = 0 */ +#define _PG_TOOSMALLN 109 /* Number of data points <= 0 */ +#define _PG_TOOFEWSERIES 110 /* Number of series <= 0 */ + + +/* Typedefs */ + +/* Typedef for chart title */ +#ifndef _TITLETYPE_DEFINED +typedef struct { + char title[_PG_TITLELEN]; /* Title text */ + short titlecolor; /* Internal palette color for title text */ + short justify; /* _PG_LEFT, _PG_CENTER, _PG_RIGHT */ +} _titletype; +#define _TITLETYPE_DEFINED +#endif + +/* Typedef for chart axes */ +#ifndef _AXISTYPE_DEFINED +typedef struct { + short grid; /* TRUE=grid lines drawn; FALSE no lines */ + short gridstyle; /* Style number from style pool for grid lines */ + _titletype axistitle; /* Title definition for axis */ + short axiscolor; /* Color for axis */ + short labeled; /* TRUE=tic marks and titles drawn */ + short rangetype; /* _PG_LINEARAXIS, _PG_LOGAXIS */ + float logbase; /* Base used if log axis */ + short autoscale; /* TRUE=next 7 values calculated by system */ + float scalemin; /* Minimum value of scale */ + float scalemax; /* Maximum value of scale */ + float scalefactor; /* Scale factor for data on this axis */ + _titletype scaletitle; /* Title definition for scaling factor */ + float ticinterval; /* Distance between tic marks (world coord.) */ + short ticformat; /* _PG_EXPFORMAT or _PG_DECFORMAT for tic labels */ + short ticdecimals; /* Number of decimals for tic labels (max=9)*/ +} _axistype; +#define _AXISTYPE_DEFINED +#endif + +/* Typedef used for defining chart and data windows */ +#ifndef _WINDOWTYPE_DEFINED +typedef struct { + short x1; /* Left edge of window in pixels */ + short y1; /* Top edge of window in pixels */ + short x2; /* Right edge of window in pixels */ + short y2; /* Bottom edge of window in pixels */ + short border; /* TRUE for border, FALSE otherwise */ + short background; /* Internal palette color for window bgnd */ + short borderstyle; /* Style bytes for window border */ + short bordercolor; /* Internal palette color for window border */ +} _windowtype; +#define _WINDOWTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _LEGENDTYPE_DEFINED +typedef struct { + short legend; /* TRUE=draw legend; FALSE=no legend */ + short place; /* _PG_RIGHT, _PG_BOTTOM, _PG_OVERLAY */ + short textcolor; /* Internal palette color for text */ + short autosize; /* TRUE=system calculates size */ + _windowtype legendwindow; /* Window definition for legend */ +} _legendtype; +#define _LEGENDTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _CHARTENV_DEFINED +typedef struct { + short charttype; /* _PG_BARCHART, _PG_COLUMNCHART, + _PG_LINECHART, _PG_SCATTERCHART, + _PG_PIECHART */ + short chartstyle; /* Style for selected chart type */ + _windowtype chartwindow; /* Window definition for overall chart */ + _windowtype datawindow; /* Window definition for data part of chart */ + _titletype maintitle; /* Main chart title */ + _titletype subtitle; /* Chart sub-title */ + _axistype xaxis; /* Definition for X-axis */ + _axistype yaxis; /* Definition for Y-axis */ + _legendtype legend; /* Definition for legend */ +} _chartenv; +#define _CHARTENV_DEFINED +#endif + +/* Typedef for character bitmap */ +#ifndef _CHARMAP_DEFINED +typedef unsigned char _charmap[8]; +#define _CHARMAP_DEFINED +#endif + +/* Typedef for pattern bitmap */ +#ifndef _FILLMAP_DEFINED +typedef unsigned char _fillmap[8]; +#define _FILLMAP_DEFINED +#endif + +/* Typedef for palette entry definition */ +#ifndef _PALETTEENTRY_DEFINED +typedef struct { + unsigned short color; + unsigned short style; + _fillmap fill; + char plotchar; +} _paletteentry; +#define _PALETTEENTRY_DEFINED +#endif + +/* Typedef for palette definition */ +#ifndef _PALETTETYPE_DEFINED +typedef _paletteentry _palettetype[_PG_PALETTELEN]; +#define _PALETTETYPE_DEFINED +#endif + +/* Typedef for style sets */ +#ifndef _STYLESET_DEFINED +typedef unsigned short _styleset[_PG_PALETTELEN]; +#define _STYLESET_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define titletype _titletype +#define axistype _axistype +#define windowtype _windowtype +#define legendtype _legendtype +#define chartenv _chartenv +#define charmap _charmap +#define fillmap _fillmap +#define paletteentry _paletteentry +#define palettetype _palettetype +#define styleset _styleset +#endif + + +/* Function prototypes for charting routines */ + +short __far __cdecl _pg_initchart(void); +short __far __cdecl _pg_defaultchart(_chartenv __far *, short, short); + +short __far __cdecl _pg_chart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_chartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartscatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_chartscatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartpie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +/* Function prototypes for support routines */ + +short __far __cdecl _pg_hlabelchart(_chartenv __far *, short, short, short, const char __far *); +short __far __cdecl _pg_vlabelchart(_chartenv __far *, short, short, short, const char __far *); + +short __far __cdecl _pg_analyzechart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_analyzechartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzescatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_analyzescatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzepie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +short __far __cdecl _pg_getpalette(_paletteentry __far *); +short __far __cdecl _pg_setpalette(const _paletteentry __far *); +short __far __cdecl _pg_resetpalette(void); + +void __far __cdecl _pg_getstyleset(unsigned short __far *); +void __far __cdecl _pg_setstyleset(const unsigned short __far *); +void __far __cdecl _pg_resetstyleset(void); + +short __far __cdecl _pg_getchardef(short, unsigned char __far *); +short __far __cdecl _pg_setchardef(short, const unsigned char __far *); + + +/* Restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/pm.h b/private/oleauto/tools/win16/os2/inc/pm.h new file mode 100644 index 000000000..236ac482b --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pm.h @@ -0,0 +1,82 @@ +/****************************** Module Header ******************************\ +* +* Module Name: PM.H +* +* This is the top level include file for Presentation Manager +* +* Copyright (c) 1989-1991, Microsoft Corporation. All rights reserved. +* +* ======================================================================= +* The following symbols are used in this file for conditional sections. +* +* INCL_PM - ALL of OS/2 Presentation Manager +* INCL_WIN - OS/2 Window Manager +* INCL_GPI - OS/2 GPI +* INCL_DEV - OS/2 Device Support +* INCL_AVIO - OS/2 Advanced VIO +* INCL_SPL - OS/2 Spooler +* INCL_PIC - OS/2 Picture utilities +* INCL_ORDERS - OS/2 Graphical Order Formats +* INCL_BITMAPFILEFORMAT - OS/2 Bitmap File Format +* INCL_FONTFILEFORMAT - OS/2 Font File Format +* INCL_ERRORS - OS/2 Errors +* +\***************************************************************************/ + +/* if INCL_PM defined then define all the symbols */ +#ifdef INCL_PM + #define INCL_WIN + #define INCL_GPI + #define INCL_DEV + #define INCL_AVIO + #define INCL_SPL + #define INCL_PIC + #define INCL_ORDERS + #define INCL_BITMAPFILEFORMAT + #define INCL_FONTFILEFORMAT + #define INCL_WINSTDSPIN + #define INCL_WINSTDDRAG + #define INCL_ERRORS +#endif /* INCL_PM */ + +#include <pmwin.h> /* OS/2 Window Manager definitions */ +#include <pmgpi.h> /* OS/2 GPI definitions */ +#include <pmdev.h> /* OS/2 Device Context definitions */ + +#ifdef INCL_AVIO +#ifndef PMAVIO_INCLUDED /* Only include it once */ +#include <pmavio.h> /* OS/2 AVIO definitions */ +#endif +#endif + +#ifdef INCL_SPL +#include <pmspl.h> /* OS/2 Spooler definitions */ +#endif + +#ifdef INCL_PIC +#ifndef PMPIC_INCLUDED /* Only include it once */ +#include <pmpic.h> /* OS/2 Picture Utilities definitions */ +#endif +#endif + +#ifdef INCL_ORDERS +#ifndef PMORD_INCLUDED /* Only include it once */ +#include <pmord.h> /* OS/2 Graphical Order Formats */ +#endif +#endif + +#ifdef INCL_BITMAPFILEFORMAT +#ifndef PMBITMAP_INCLUDED /* Only include it once */ +#include <pmbitmap.h> /* OS/2 Bitmap File Format definition */ +#endif +#endif + +#ifdef INCL_FONTFILEFORMAT +#ifndef PMFONT_INCLUDED /* Only include it once */ +#include <pmfont.h> /* OS/2 Font File Format definition */ +#endif +#endif + +#if (defined(INCL_WINSTDSPIN)||defined(INCL_WINSTDDRAG)) +#include <pmstddlg.h> /* OS/2 Standard Dialog definitions */ +#endif diff --git a/private/oleauto/tools/win16/os2/inc/pmavio.h b/private/oleauto/tools/win16/os2/inc/pmavio.h new file mode 100644 index 000000000..e7fd146ee --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmavio.h @@ -0,0 +1,39 @@ +/***************************************************************************\ +* +* Module Name: PMAVIO.H +* +* OS/2 Presentation Manager AVIO constants, types and function declarations +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +\***************************************************************************/ + +/* common types, constants and function declarations */ + +typedef USHORT HVPS; /* hpvs */ +typedef HVPS far *PHVPS; /* phpvs */ + + +USHORT APIENTRY VioAssociate(HDC hdc, HVPS hvps); +USHORT APIENTRY VioCreateLogFont(PFATTRS pfatattrs, LONG llcid, PSTR8 pName, HVPS hvps); +USHORT APIENTRY VioCreatePS(PHVPS phvps, SHORT sdepth, SHORT swidth + , SHORT sFormat, SHORT sAttrs, HVPS hvpsReserved); +USHORT APIENTRY VioDeleteSetId(LONG llcid, HVPS hvps); +USHORT APIENTRY VioDestroyPS(HVPS hvps); +USHORT APIENTRY VioGetDeviceCellSize(PSHORT psHeight, PSHORT psWidth, HVPS hvps); +USHORT APIENTRY VioGetOrg(PSHORT psRow, PSHORT psColumn, HVPS hvps); +USHORT APIENTRY VioQueryFonts(PLONG plRemfonts, PFONTMETRICS afmMetrics + , LONG lMetricsLength, PLONG plFonts + , PSZ pszFacename, ULONG flOptions, HVPS hvps); +USHORT APIENTRY VioQuerySetIds(PLONG allcids, PSTR8 pNames + , PLONG alTypes, LONG lcount, HVPS hvps); +USHORT APIENTRY VioSetDeviceCellSize(SHORT sHeight, SHORT sWidth, HVPS hvps); +USHORT APIENTRY VioSetOrg(SHORT sRow, SHORT sColumn, HVPS hvps); +USHORT APIENTRY VioShowPS(SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps); + +/************************ Public Function ******************************\ + * WinDefAVioWindowProc -- Default message processing for AVio PS's +\***********************************************************************/ + +MRESULT EXPENTRY WinDefAVioWindowProc(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2); diff --git a/private/oleauto/tools/win16/os2/inc/pmbitmap.h b/private/oleauto/tools/win16/os2/inc/pmbitmap.h new file mode 100644 index 000000000..aeabf0520 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmbitmap.h @@ -0,0 +1,55 @@ +/***************************************************************************\ +* +* Module Name: PMBITMAP.H +* +* OS/2 Presentation Manager Bit Map, Icon and Pointer type declarations. +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +\***************************************************************************/ + +/* + * This is the file format structure for Bit Maps, Pointers and Icons + * as stored in the resource file of a PM application. + * + * Notes on file format: + * Each BITMAPFILEHEADER entry is immediately followed by the color table + * for the bit map bits it references. + * Icons and Pointers contain two BITMAPFILEHEADERs for each ARRAYHEADER + * item. The first one is for the ANDXOR mask, the second is for the + * COLOR mask. All offsets are absolute based on the start of the FILE. + */ +typedef struct _BITMAPFILEHEADER { /* bfh */ + USHORT usType; + ULONG cbSize; + SHORT xHotspot; + SHORT yHotspot; + ULONG offBits; + BITMAPINFOHEADER bmp; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER FAR *PBITMAPFILEHEADER; + +/* + * This is the 1.2 device independent format header + */ +typedef struct _BITMAPARRAYFILEHEADER { /* bafh */ + USHORT usType; + ULONG cbSize; + ULONG offNext; + USHORT cxDisplay; + USHORT cyDisplay; + BITMAPFILEHEADER bfh; +} BITMAPARRAYFILEHEADER; +typedef BITMAPARRAYFILEHEADER FAR *PBITMAPARRAYFILEHEADER; + +/* + * These are the identifying values that go in the usType field of the + * BITMAPFILEHEADER and BITMAPARRAYFILEHEADER. (BFT_ => Bit map File Type) + */ +#define BFT_ICON 0x4349 /* 'IC' */ +#define BFT_BMAP 0x4d42 /* 'BM' */ +#define BFT_POINTER 0x5450 /* 'PT' */ +#define BFT_COLORICON 0x4943 /* 'CI' */ +#define BFT_COLORPOINTER 0x5043 /* 'CP' */ +#define BFT_BITMAPARRAY 0x4142 /* 'BA' */ diff --git a/private/oleauto/tools/win16/os2/inc/pmdev.h b/private/oleauto/tools/win16/os2/inc/pmdev.h new file mode 100644 index 000000000..bf96439e4 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmdev.h @@ -0,0 +1,293 @@ +/***************************************************************************\ +* +* Module Name: PMDEV.H +* +* OS/2 Presentation Manager Device Context constants, types and +* function declarations +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ======================================================================= +* +* The folowing symbols are used in this file for conditional sections. +* +* INCL_DEVERRORS - defined if INCL_ERRORS defined +* +* There is a symbol used in this file called INCL_DDIDEFS. This is used to +* include only the definitions for the DDI. The programmer using the GPI +* can ignore this symbol +* +* There is a symbol used in this file called INCL_SAADEFS. This is used to +* include only the definitions for the SAA. The programmer using the GPI +* can ignore this symbol +* +\***************************************************************************/ + +#ifdef INCL_ERRORS /* if errors are required then allow DEV errors */ + #define INCL_DEVERRORS +#endif /* INCL_ERRORS */ + +#ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */ + #define INCL_DEV +#endif /* INCL_DDIDEFS */ + +#ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */ + #define INCL_DEV +#endif /* INCL_SAADEFS */ + +#if (defined(INCL_DEV) || !defined(INCL_NOCOMMON)) + +/* General DEV return values */ +#define DEV_ERROR 0L +#define DEV_OK 1L + +/* pointer data for DevOpenDC */ +typedef PSZ FAR *PDEVOPENDATA; + +/* DC type for DevOpenDC */ +#define OD_QUEUED 2L +#define OD_DIRECT 5L +#define OD_INFO 6L +#define OD_METAFILE 7L +#define OD_MEMORY 8L +#define OD_METAFILE_NOQUERY 9L + +/* codes for DevQueryCaps */ +#define CAPS_FAMILY 0L +#define CAPS_IO_CAPS 1L +#define CAPS_TECHNOLOGY 2L +#define CAPS_DRIVER_VERSION 3L +#define CAPS_WIDTH 4L /* pels */ +#define CAPS_HEIGHT 5L /* pels */ +#define CAPS_WIDTH_IN_CHARS 6L +#define CAPS_HEIGHT_IN_CHARS 7L +#define CAPS_HORIZONTAL_RESOLUTION 8L /* pels per meter */ +#define CAPS_VERTICAL_RESOLUTION 9L /* pels per meter */ +#define CAPS_CHAR_WIDTH 10L /* pels */ +#define CAPS_CHAR_HEIGHT 11L /* pels */ +#define CAPS_SMALL_CHAR_WIDTH 12L /* pels */ +#define CAPS_SMALL_CHAR_HEIGHT 13L /* pels */ +#define CAPS_COLORS 14L +#define CAPS_COLOR_PLANES 15L +#define CAPS_COLOR_BITCOUNT 16L +#define CAPS_COLOR_TABLE_SUPPORT 17L +#define CAPS_MOUSE_BUTTONS 18L +#define CAPS_FOREGROUND_MIX_SUPPORT 19L +#define CAPS_BACKGROUND_MIX_SUPPORT 20L +#define CAPS_DEVICE_WINDOWING 31L +#define CAPS_ADDITIONAL_GRAPHICS 32L +#define CAPS_VIO_LOADABLE_FONTS 21L +#define CAPS_WINDOW_BYTE_ALIGNMENT 22L +#define CAPS_BITMAP_FORMATS 23L +#define CAPS_RASTER_CAPS 24L +#define CAPS_MARKER_HEIGHT 25L /* pels */ +#define CAPS_MARKER_WIDTH 26L /* pels */ +#define CAPS_DEVICE_FONTS 27L +#define CAPS_GRAPHICS_SUBSET 28L +#define CAPS_GRAPHICS_VERSION 29L +#define CAPS_GRAPHICS_VECTOR_SUBSET 30L +#define CAPS_PHYS_COLORS 33L +#define CAPS_COLOR_INDEX 34L +#define CAPS_GRAPHICS_CHAR_WIDTH 35L +#define CAPS_GRAPHICS_CHAR_HEIGHT 36L +#define CAPS_HORIZONTAL_FONT_RES 37L +#define CAPS_VERTICAL_FONT_RES 38L +#define CAPS_DEVICE_FONT_SIM 39L + +/* Constants for CAPS_IO_CAPS */ +#define CAPS_IO_DUMMY 1L +#define CAPS_IO_SUPPORTS_OP 2L +#define CAPS_IO_SUPPORTS_IP 3L +#define CAPS_IO_SUPPORTS_IO 4L + +/* Constants for CAPS_TECHNOLOGY */ +#define CAPS_TECH_UNKNOWN 0L +#define CAPS_TECH_VECTOR_PLOTTER 1L +#define CAPS_TECH_RASTER_DISPLAY 2L +#define CAPS_TECH_RASTER_PRINTER 3L +#define CAPS_TECH_RASTER_CAMERA 4L +#define CAPS_TECH_POSTSCRIPT 5L + +/* Constants for CAPS_COLOR_TABLE_SUPPORT */ +#define CAPS_COLTABL_RGB_8 1L +#define CAPS_COLTABL_RGB_8_PLUS 2L +#define CAPS_COLTABL_TRUE_MIX 4L +#define CAPS_COLTABL_REALIZE 8L + +/* Constants for CAPS_FOREGROUND_MIX_SUPPORT */ +#define CAPS_FM_OR 1L +#define CAPS_FM_OVERPAINT 2L +#define CAPS_FM_XOR 8L +#define CAPS_FM_LEAVEALONE 16L +#define CAPS_FM_AND 32L +#define CAPS_FM_GENERAL_BOOLEAN 64L + +/* Constants for CAPS_BACKGROUND_MIX_SUPPORT */ +#define CAPS_BM_OR 1L +#define CAPS_BM_OVERPAINT 2L +#define CAPS_BM_XOR 8L +#define CAPS_BM_LEAVEALONE 16L + +/* Constants for CAPS_DEVICE_WINDOWING */ +#define CAPS_DEV_WINDOWING_SUPPORT 1L + +/* Constants for CAPS_ADDITIONAL_GRAPHICS */ +#define CAPS_GRAPHICS_KERNING_SUPPORT 2L +#define CAPS_FONT_OUTLINE_DEFAULT 4L +#define CAPS_FONT_IMAGE_DEFAULT 8L +/* bits represented by values 16L and 32L are reserved */ +#define CAPS_SCALED_DEFAULT_MARKERS 64L +#ifndef INCL_SAADEFS + +/* Constants for CAPS_WINDOW_BYTE_ALIGNMENT */ +#define CAPS_BYTE_ALIGN_REQUIRED 0L +#define CAPS_BYTE_ALIGN_RECOMMENDED 1L +#define CAPS_BYTE_ALIGN_NOT_REQUIRED 2L +#endif /* no INCL_SAADEFS */ + +/* Constants for CAPS_RASTER_CAPS */ +#define CAPS_RASTER_BITBLT 1L +#define CAPS_RASTER_BANDING 2L +#define CAPS_RASTER_BITBLT_SCALING 4L +#define CAPS_RASTER_SET_PEL 16L +#define CAPS_RASTER_FONTS 32L + +#ifndef INCL_DDIDEFS +HDC APIENTRY DevOpenDC( HAB hab, LONG lType, PSZ pszToken + , LONG lCount, PDEVOPENDATA pdopData, HDC hdcComp ); +HMF APIENTRY DevCloseDC( HDC hdc ); +BOOL APIENTRY DevQueryCaps( HDC hdc, LONG lStart, LONG lCount, PLONG alArray ); +#endif /* no INCL_DDIDEFS */ + +#endif /* common DEV */ +#ifdef INCL_DEV + +#ifndef INCL_SAADEFS +/* structures for DEVESC_QUERYVIOCELLSIZES */ +typedef struct _VIOSIZECOUNT { /* vios */ + LONG maxcount; + LONG count; + } VIOSIZECOUNT; +typedef VIOSIZECOUNT FAR * PVIOSIZECOUNT; + +typedef struct _VIOFONTCELLSIZE { /* viof */ + LONG cx; + LONG cy; + } VIOFONTCELLSIZE; +typedef VIOFONTCELLSIZE FAR * PVIOFONTCELLSIZE; + +/* structure for DEVESC_GETSCALINGFACTOR */ +typedef struct _SFACTORS { /* sfactors */ + LONG x; + LONG y; +} SFACTORS; +typedef SFACTORS FAR * PSFACTORS; + +/* structure for DEVESC_NEXTBAND */ +typedef struct _BANDRECT { /* bandrect */ + LONG xleft; + LONG ybottom; + LONG xright; + LONG ytop; +} BANDRECT; +typedef BANDRECT FAR * PBANDRECT; + +/* return codes for DevEscape */ +#define DEVESC_ERROR (-1L) +#define DEVESC_NOTIMPLEMENTED 0L + +/* codes for DevEscape */ +#define DEVESC_QUERYESCSUPPORT 0L +#define DEVESC_GETSCALINGFACTOR 1L +#define DEVESC_QUERYVIOCELLSIZES 2L + +#define DEVESC_STARTDOC 8150L +#define DEVESC_ENDDOC 8151L +#define DEVESC_NEXTBAND 8152L +#define DEVESC_ABORTDOC 8153L + +#define DEVESC_NEWFRAME 16300L +#define DEVESC_DRAFTMODE 16301L +#define DEVESC_FLUSHOUTPUT 16302L +#define DEVESC_RAWDATA 16303L +#define DEVESC_SETMODE 16304L +#define DEVESC_DBE_FIRST 24450L +#define DEVESC_DBE_LAST 24455L + +/* DevEscape codes for adding extra space to character strings */ +#define DEVESC_CHAR_EXTRA 16998L +#define DEVESC_BREAK_EXTRA 16999L + +/* codes for DevEscape PM_Q_ESC spool files */ +#define DEVESC_STD_JOURNAL 32600L + +/* return codes for DevPostDeviceModes */ +#define DPDM_ERROR (-1L) +#define DPDM_NONE 0L + +/* codes for DevPostDeviceModes */ +#define DPDM_POSTJOBPROP 0L +#define DPDM_CHANGEPROP 1L +#define DPDM_QUERYJOBPROP 2L + +/* string types for DevQueryDeviceNames */ +typedef CHAR STR16[16]; /* str16 */ +typedef STR16 FAR *PSTR16; +typedef CHAR STR32[32]; /* str32 */ +typedef STR32 FAR *PSTR32; +typedef CHAR STR64[64]; /* str64 */ +typedef STR64 FAR *PSTR64; + +/* return code for DevQueryHardcopyCaps */ +#define DQHC_ERROR (-1L) +/* codes for DevQueryHardcopyCaps */ +#define HCAPS_CURRENT 1L +#define HCAPS_SELECTABLE 2L + +/* structure for DevQueryHardcopyCaps */ +typedef struct _HCINFO { /* hci */ + CHAR szFormname[32]; + LONG cx; + LONG cy; + LONG xLeftClip; + LONG yBottomClip; + LONG xRightClip; + LONG yTopClip; + LONG xPels; + LONG yPels; + LONG flAttributes; +} HCINFO; +typedef HCINFO FAR *PHCINFO; + +/* structure for DEVESC_SETMODE */ +typedef struct _ESCSETMODE { /* escsm */ + ULONG mode; + USHORT codepage; +} ESCSETMODE; +typedef ESCSETMODE FAR * PESCSETMODE; + +/* Device Context Functions */ +#ifndef INCL_DDIDEFS + +LONG APIENTRY DevEscape( HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData + , PLONG plOutCount, PBYTE pbOutData ); +BOOL APIENTRY DevQueryDeviceNames( HAB hab, PSZ pszDriverName, PLONG pldn + , PSTR32 aDeviceName, PSTR64 aDeviceDesc + , PLONG pldt, PSTR16 aDataType ); +LONG APIENTRY DevQueryHardcopyCaps( HDC hdc, LONG lStartForm + , LONG lForms, PHCINFO phciHcInfo ); +LONG APIENTRY DevPostDeviceModes( HAB hab, PDRIVDATA pdrivDriverData + , PSZ pszDriverName, PSZ pszDeviceName + , PSZ pszName, ULONG flOptions ); + +#endif /* no INCL_DDIDEFS */ +#endif /* no INCL_SAADEFS */ + +#endif /* non-common DEV */ + +#ifdef INCL_DEVERRORS + +/* AAB error codes for the DEV - same as GPI errors at present */ + +#endif /* INCL_DEVERRORS */ diff --git a/private/oleauto/tools/win16/os2/inc/pmerr.h b/private/oleauto/tools/win16/os2/inc/pmerr.h new file mode 100644 index 000000000..bf2d465fa --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmerr.h @@ -0,0 +1,799 @@ +/******************************************************************************\ +* +* Module Name: PMERR.H +* +* OS/2 Presentation Manager public error codes. +* +* They all have a definition commencing PMERR_ +* +* This file has been constructed to bring together all the error codes +* into one place. It has been made up of error codes formerly held in +* PMGPI.H, PMWIN.H, PMSPL.H AND PMSHL.H. +* +* Also, some error codes that were put into a private spooler header +* file have been made public here. +* +* Where the error codes in each public file were defined they have +* been replaced with a "#include <pmerr.h>" to pick up the error codes. +* +* Note ! It could have been possible for an application to use the +* following sort of header :- +* #define INCL_ERROR +* #include <os2.h> - pick up GPI, WIN and SHL errors +* #include <pmspl.h> - pick up spooler errors +* +* With this new file, error codes from PMWIN, for example, would be +* doubly defined. Hence each error code section is protected by a +* conditional include to prevent this. +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +\******************************************************************************/ + +/**********************************************************************\ +* +* Window Manager error codes +* +* 1.) PMWIN error codes +* +\**********************************************************************/ + +#ifdef INCL_WINERRORS + +#ifndef INCL_WINERRORS_INCL +/* XLATOFF */ +#define INCL_WINERRORS_INCL +/* XLATON */ + +#define PMERR_INVALID_HWND 0x1001 +#define PMERR_INVALID_HMQ 0x1002 +#define PMERR_PARAMETER_OUT_OF_RANGE 0x1003 +#define PMERR_WINDOW_LOCK_UNDERFLOW 0x1004 +#define PMERR_WINDOW_LOCK_OVERFLOW 0x1005 +#define PMERR_BAD_WINDOW_LOCK_COUNT 0x1006 +#define PMERR_WINDOW_NOT_LOCKED 0x1007 +#define PMERR_INVALID_SELECTOR 0x1008 +#define PMERR_CALL_FROM_WRONG_THREAD 0x1009 +#define PMERR_RESOURCE_NOT_FOUND 0x100A +#define PMERR_INVALID_STRING_PARM 0x100B +#define PMERR_INVALID_HHEAP 0x100C +#define PMERR_INVALID_HEAP_POINTER 0x100D +#define PMERR_INVALID_HEAP_SIZE_PARM 0x100E +#define PMERR_INVALID_HEAP_SIZE 0x100F +#define PMERR_INVALID_HEAP_SIZE_WORD 0x1010 +#define PMERR_HEAP_OUT_OF_MEMORY 0x1011 +#define PMERR_HEAP_MAX_SIZE_REACHED 0x1012 +#define PMERR_INVALID_HATOMTBL 0x1013 +#define PMERR_INVALID_ATOM 0x1014 +#define PMERR_INVALID_ATOM_NAME 0x1015 +#define PMERR_INVALID_INTEGER_ATOM 0x1016 +#define PMERR_ATOM_NAME_NOT_FOUND 0x1017 +#define PMERR_QUEUE_TOO_LARGE 0x1018 +#define PMERR_INVALID_FLAG 0x1019 +#define PMERR_INVALID_HACCEL 0x101A +#define PMERR_INVALID_HPTR 0x101B +#define PMERR_INVALID_HENUM 0x101C +#define PMERR_INVALID_SRC_CODEPAGE 0x101D +#define PMERR_INVALID_DST_CODEPAGE 0x101E + +/* These are not real error codes, but just used to access special */ +/* error message strings used by WinGetErrorInfo to format an error */ +/* message. */ + +#define PMERR_UNKNOWN_COMPONENT_ID 0x101f +#define PMERR_UNKNOWN_ERROR_CODE 0x1020 +#define PMERR_SEVERITY_LEVELS 0x1021 + +/* 0x1022 - 0x1033, 0x1035, 0x104B - 0x104C used elsewhere */ +#define PMERR_INVALID_RESOURCE_FORMAT 0x1034 +#define PMERR_NO_MSG_QUEUE 0x1036 +#define PMERR_WIN_DEBUGMSG 0x1037 +#define PMERR_QUEUE_FULL 0x1038 + +#define PMERR_LIBRARY_LOAD_FAILED 0x1039 +#define PMERR_PROCEDURE_LOAD_FAILED 0x103A +#define PMERR_LIBRARY_DELETE_FAILED 0x103B +#define PMERR_PROCEDURE_DELETE_FAILED 0x103C + +#define PMERR_ARRAY_TOO_LARGE 0x103D +#define PMERR_ARRAY_TOO_SMALL 0x103E +#define PMERR_DATATYPE_ENTRY_BAD_INDEX 0x103F +#define PMERR_DATATYPE_ENTRY_CTL_BAD 0x1040 +#define PMERR_DATATYPE_ENTRY_CTL_MISS 0x1041 +#define PMERR_DATATYPE_ENTRY_INVALID 0x1042 +#define PMERR_DATATYPE_ENTRY_NOT_NUM 0x1043 +#define PMERR_DATATYPE_ENTRY_NOT_OFF 0x1044 +#define PMERR_DATATYPE_INVALID 0x1045 +#define PMERR_DATATYPE_NOT_UNIQUE 0x1046 +#define PMERR_DATATYPE_TOO_LONG 0x1047 +#define PMERR_DATATYPE_TOO_SMALL 0x1048 +#define PMERR_DIRECTION_INVALID 0x1049 +#define PMERR_INVALID_HAB 0x104A +#define PMERR_INVALID_HSTRUCT 0x104D +#define PMERR_LENGTH_TOO_SMALL 0x104E +#define PMERR_MSGID_TOO_SMALL 0x104F +#define PMERR_NO_HANDLE_ALLOC 0x1050 +#define PMERR_NOT_IN_A_PM_SESSION 0x1051 +#define PMERR_MSG_QUEUE_ALREADY_EXISTS 0x1052 + +#endif /* error codes already included */ +#endif /* include error codes */ + +/**********************************************************************\ +* +* Window Manager error codes +* +* 2.) PMSHL error codes +* +\**********************************************************************/ + +#ifdef INCL_SHLERRORS + +#ifndef INCL_SHLERRORS_INCL +/* XLATOFF */ +#define INCL_SHLERRORS_INCL +/* XLATON */ + +#define PMERR_INVALID_PIB 0x1101 +#define PMERR_INSUFF_SPACE_TO_ADD 0x1102 +#define PMERR_INVALID_GROUP_HANDLE 0x1103 +#define PMERR_DUPLICATE_TITLE 0x1104 +#define PMERR_INVALID_TITLE 0x1105 +#define PMERR_HANDLE_NOT_IN_GROUP 0x1107 +#define PMERR_INVALID_TARGET_HANDLE 0x1106 +#define PMERR_INVALID_PATH_STATEMENT 0x1108 +#define PMERR_NO_PROGRAM_FOUND 0x1109 +#define PMERR_INVALID_BUFFER_SIZE 0x110A +#define PMERR_BUFFER_TOO_SMALL 0x110B +#define PMERR_PL_INITIALISATION_FAIL 0x110C +#define PMERR_CANT_DESTROY_SYS_GROUP 0x110D +#define PMERR_INVALID_TYPE_CHANGE 0x110E +#define PMERR_INVALID_PROGRAM_HANDLE 0x110F + +#define PMERR_NOT_CURRENT_PL_VERSION 0x1110 +#define PMERR_INVALID_CIRCULAR_REF 0x1111 +#define PMERR_MEMORY_ALLOCATION_ERR 0x1112 +#define PMERR_MEMORY_DEALLOCATION_ERR 0x1113 +#define PMERR_TASK_HEADER_TOO_BIG 0x1114 + +#define PMERR_INVALID_INI_FILE_HANDLE 0x1115 +#define PMERR_MEMORY_SHARE 0x1116 +#define PMERR_OPEN_QUEUE 0x1117 +#define PMERR_CREATE_QUEUE 0x1118 +#define PMERR_WRITE_QUEUE 0x1119 +#define PMERR_READ_QUEUE 0x111A +#define PMERR_CALL_NOT_EXECUTED 0x111B +#define PMERR_UNKNOWN_APIPKT 0x111C +#define PMERR_INITHREAD_EXISTS 0x111D +#define PMERR_CREATE_THREAD 0x111E +#define PMERR_NO_HK_PROFILE_INSTALLED 0x111F +#define PMERR_INVALID_DIRECTORY 0x1120 +#define PMERR_WILDCARD_IN_FILENAME 0x1121 +#define PMERR_FILENAME_BUFFER_FULL 0x1122 +#define PMERR_FILENAME_TOO_LONG 0x1123 +#define PMERR_INI_FILE_IS_SYS_OR_USER 0x1124 +#define PMERR_BROADCAST_PLMSG 0x1125 +#define PMERR_190_INIT_DONE 0x1126 +#define PMERR_HMOD_FOR_PMSHAPI 0x1127 +#define PMERR_SET_HK_PROFILE 0x1128 +#define PMERR_API_NOT_ALLOWED 0x1129 +#define PMERR_INI_STILL_OPEN 0x112A + +#define PMERR_PROGDETAILS_NOT_IN_INI 0x112B +#define PMERR_PIBSTRUCT_NOT_IN_INI 0x112C +#define PMERR_INVALID_DISKPROGDETAILS 0x112D +#define PMERR_PROGDETAILS_READ_FAILURE 0x112E +#define PMERR_PROGDETAILS_WRITE_FAILURE 0x112F +#define PMERR_PROGDETAILS_QSIZE_FAILURE 0x1130 +#define PMERR_INVALID_PROGDETAILS 0x1131 +#define PMERR_SHEPROFILEHOOK_NOT_FOUND 0x1132 +#define PMERR_190PLCONVERTED 0x1133 +#define PMERR_FAILED_TO_CONVERT_INI_PL 0x1134 +#define PMERR_PMSHAPI_NOT_INITIALISED 0x1135 +#define PMERR_INVALID_SHELL_API_HOOK_ID 0x1136 + +#define PMERR_DOS_ERROR 0x1200 + +#define PMERR_NO_SPACE 0x1201 +#define PMERR_INVALID_SWITCH_HANDLE 0x1202 +#define PMERR_NO_HANDLE 0x1203 +#define PMERR_INVALID_PROCESS_ID 0x1204 +#define PMERR_NOT_SHELL 0x1205 +#define PMERR_INVALID_WINDOW 0x1206 +#define PMERR_INVALID_POST_MSG 0x1207 +#define PMERR_INVALID_PARAMETERS 0x1208 +#define PMERR_INVALID_PROGRAM_TYPE 0x1209 +#define PMERR_NOT_EXTENDED_FOCUS 0x120A +#define PMERR_INVALID_SESSION_ID 0x120B +#define PMERR_SMG_INVALID_ICON_FILE 0x120C +#define PMERR_SMG_ICON_NOT_CREATED 0x120D +#define PMERR_SHL_DEBUG 0x120E + +#define PMERR_OPENING_INI_FILE 0x1301 +#define PMERR_INI_FILE_CORRUPT 0x1302 +#define PMERR_INVALID_PARM 0x1303 +#define PMERR_NOT_IN_IDX 0x1304 +#define PMERR_NO_ENTRIES_IN_GROUP 0x1305 + +#define PMERR_INI_WRITE_FAIL 0x1306 +#define PMERR_IDX_FULL 0x1307 +#define PMERR_INI_PROTECTED 0x1308 +#define PMERR_MEMORY_ALLOC 0x1309 +#define PMERR_INI_INIT_ALREADY_DONE 0x130A +#define PMERR_INVALID_INTEGER 0x130B +#define PMERR_INVALID_ASCIIZ 0x130C +#define PMERR_CAN_NOT_CALL_SPOOLER 0x130D +#define PMERR_VALIDATION_REJECTED PMERR_CAN_NOT_CALL_SPOOLER + +#define PMERR_WARNING_WINDOW_NOT_KILLED 0x1401 +#define PMERR_ERROR_INVALID_WINDOW 0x1402 +#define PMERR_ALREADY_INITIALIZED 0x1403 +#define PMERR_MSG_PROG_NO_MOU 0x1405 +#define PMERR_MSG_PROG_NON_RECOV 0x1406 +#define PMERR_WINCONV_INVALID_PATH 0x1407 +#define PMERR_PI_NOT_INITIALISED 0x1408 +#define PMERR_PL_NOT_INITIALISED 0x1409 +#define PMERR_NO_TASK_MANAGER 0x140A +#define PMERR_SAVE_NOT_IN_PROGRESS 0x140B +#define PMERR_NO_STACK_SPACE 0x140C +#define PMERR_INVALID_COLR_FIELD 0x140d +#define PMERR_INVALID_COLR_VALUE 0x140e +#define PMERR_COLR_WRITE 0x140f + +#define PMERR_TARGET_FILE_EXISTS 0x1501 +#define PMERR_SOURCE_SAME_AS_TARGET 0x1502 +#define PMERR_SOURCE_FILE_NOT_FOUND 0x1503 +#define PMERR_INVALID_NEW_PATH 0x1504 +#define PMERR_TARGET_FILE_NOT_FOUND 0x1505 +#define PMERR_INVALID_DRIVE_NUMBER 0x1506 +#define PMERR_NAME_TOO_LONG 0x1507 +#define PMERR_NOT_ENOUGH_ROOM_ON_DISK 0x1508 +#define PMERR_NOT_ENOUGH_MEM 0x1509 + +#define PMERR_LOG_DRV_DOES_NOT_EXIST 0x150B +#define PMERR_INVALID_DRIVE 0x150C +#define PMERR_ACCESS_DENIED 0x150D +#define PMERR_NO_FIRST_SLASH 0x150E +#define PMERR_READ_ONLY_FILE 0x150F +#define PMERR_GROUP_PROTECTED 0x151F +#define PMERR_INVALID_PROGRAM_CATEGORY 0x152F +#define PMERR_INVALID_APPL 0x1530 +#define PMERR_CANNOT_START 0x1531 +#define PMERR_STARTED_IN_BACKGROUND 0x1532 +#define PMERR_INVALID_HAPP 0x1533 +#define PMERR_CANNOT_STOP 0x1534 + +/* */ +/* Errors generated by Language Bindings layer. */ +/* */ +/* (Range 0x1600 - 0x16FF reserved for Bindings) */ +/* */ + +/* SEVERITY_UNRECOVERABLE: */ + +#define PMERR_INTERNAL_ERROR_1 0x1601 +#define PMERR_INTERNAL_ERROR_2 0x1602 +#define PMERR_INTERNAL_ERROR_3 0x1603 +#define PMERR_INTERNAL_ERROR_4 0x1604 +#define PMERR_INTERNAL_ERROR_5 0x1605 +#define PMERR_INTERNAL_ERROR_6 0x1606 +#define PMERR_INTERNAL_ERROR_7 0x1607 +#define PMERR_INTERNAL_ERROR_8 0x1608 +#define PMERR_INTERNAL_ERROR_9 0x1609 +#define PMERR_INTERNAL_ERROR_10 0x160A +#define PMERR_INTERNAL_ERROR_11 0x160B +#define PMERR_INTERNAL_ERROR_12 0x160C +#define PMERR_INTERNAL_ERROR_13 0x160D +#define PMERR_INTERNAL_ERROR_14 0x160E +#define PMERR_INTERNAL_ERROR_15 0x160F +#define PMERR_INTERNAL_ERROR_16 0x1610 +#define PMERR_INTERNAL_ERROR_17 0x1611 +#define PMERR_INTERNAL_ERROR_18 0x1612 +#define PMERR_INTERNAL_ERROR_19 0x1613 +#define PMERR_INTERNAL_ERROR_20 0x1614 +#define PMERR_INTERNAL_ERROR_21 0x1615 +#define PMERR_INTERNAL_ERROR_22 0x1616 +#define PMERR_INTERNAL_ERROR_23 0x1617 +#define PMERR_INTERNAL_ERROR_24 0x1618 +#define PMERR_INTERNAL_ERROR_25 0x1619 +#define PMERR_INTERNAL_ERROR_26 0x161A +#define PMERR_INTERNAL_ERROR_27 0x161B +#define PMERR_INTERNAL_ERROR_28 0x161C +#define PMERR_INTERNAL_ERROR_29 0x161D + +/* SEVERITY_WARNING: */ + +#define PMERR_INVALID_FREE_MESSAGE_ID 0x1630 + +/* SEVERITY_ERROR: */ + +#define PMERR_FUNCTION_NOT_SUPPORTED 0x1641 +#define PMERR_INVALID_ARRAY_COUNT 0x1642 +#define PMERR_INVALID_LENGTH 0x1643 +#define PMERR_INVALID_BUNDLE_TYPE 0x1644 +#define PMERR_INVALID_PARAMETER 0x1645 +#define PMERR_INVALID_NUMBER_OF_PARMS 0x1646 +#define PMERR_GREATER_THAN_64K 0x1647 +#define PMERR_INVALID_PARAMETER_TYPE 0x1648 +#define PMERR_NEGATIVE_STRCOND_DIM 0x1649 +#define PMERR_INVALID_NUMBER_OF_TYPES 0x164A +#define PMERR_INCORRECT_HSTRUCT 0x164B +#define PMERR_INVALID_ARRAY_SIZE 0x164C +#define PMERR_INVALID_CONTROL_DATATYPE 0x164D +#define PMERR_INCOMPLETE_CONTROL_SEQU 0x164E +#define PMERR_INVALID_DATATYPE 0x164F +#define PMERR_INCORRECT_DATATYPE 0x1650 +#define PMERR_NOT_SELF_DESCRIBING_DTYP 0x1651 +#define PMERR_INVALID_CTRL_SEQ_INDEX 0x1652 +#define PMERR_INVALID_TYPE_FOR_LENGTH 0x1653 +#define PMERR_INVALID_TYPE_FOR_OFFSET 0x1654 +#define PMERR_INVALID_TYPE_FOR_MPARAM 0x1655 +#define PMERR_INVALID_MESSAGE_ID 0x1656 +#define PMERR_C_LENGTH_TOO_SMALL 0x1657 +#define PMERR_APPL_STRUCTURE_TOO_SMALL 0x1658 +#define PMERR_INVALID_ERRORINFO_HANDLE 0x1659 +#define PMERR_INVALID_CHARACTER_INDEX 0x165A + +/* */ +/* End of Errors generated by Language Bindings layer. */ +/* */ +/* (Range 0x1600 - 0x16FF reserved for Bindings) */ +/* */ + +#endif /* error codes already included */ +#endif /* include error codes */ + +/*******************************************************************\ +* +* GPI error codes +* +\*******************************************************************/ + +#ifdef INCL_GPIERRORS + +#ifndef INCL_GPIERRORS_INCL +/* XLATOFF */ +#define INCL_GPIERRORS_INCL +/* XLATON */ + +/* AAB error codes for the GPI */ +#define PMERR_OK 0x0000 +#define PMERR_ALREADY_IN_AREA 0x2001 +#define PMERR_ALREADY_IN_ELEMENT 0x2002 +#define PMERR_ALREADY_IN_PATH 0x2003 +#define PMERR_ALREADY_IN_SEG 0x2004 +#define PMERR_AREA_INCOMPLETE 0x2005 +#define PMERR_BASE_ERROR 0x2006 +#define PMERR_BITBLT_LENGTH_EXCEEDED 0x2007 +#define PMERR_BITMAP_IN_USE 0x2008 +#define PMERR_BITMAP_IS_SELECTED 0x2009 +#define PMERR_BITMAP_NOT_FOUND 0x200A +#define PMERR_BITMAP_NOT_SELECTED 0x200B +#define PMERR_BOUNDS_OVERFLOW 0x200C +#define PMERR_CALLED_SEG_IS_CHAINED 0x200D +#define PMERR_CALLED_SEG_IS_CURRENT 0x200E +#define PMERR_CALLED_SEG_NOT_FOUND 0x200F +#define PMERR_CANNOT_DELETE_ALL_DATA 0x2010 +#define PMERR_CANNOT_REPLACE_ELEMENT_0 0x2011 +#define PMERR_COL_TABLE_NOT_REALIZABLE 0x2012 +#define PMERR_COL_TABLE_NOT_REALIZED 0x2013 +#define PMERR_COORDINATE_OVERFLOW 0x2014 +#define PMERR_CORR_FORMAT_MISMATCH 0x2015 +#define PMERR_DATA_TOO_LONG 0x2016 +#define PMERR_DC_IS_ASSOCIATED 0x2017 +#define PMERR_DESC_STRING_TRUNCATED 0x2018 +#define PMERR_DEVICE_DRIVER_ERROR_1 0x2019 +#define PMERR_DEVICE_DRIVER_ERROR_2 0x201A +#define PMERR_DEVICE_DRIVER_ERROR_3 0x201B +#define PMERR_DEVICE_DRIVER_ERROR_4 0x201C +#define PMERR_DEVICE_DRIVER_ERROR_5 0x201D +#define PMERR_DEVICE_DRIVER_ERROR_6 0x201E +#define PMERR_DEVICE_DRIVER_ERROR_7 0x201F +#define PMERR_DEVICE_DRIVER_ERROR_8 0x2020 +#define PMERR_DEVICE_DRIVER_ERROR_9 0x2021 +#define PMERR_DEVICE_DRIVER_ERROR_10 0x2022 +#define PMERR_DEV_FUNC_NOT_INSTALLED 0x2023 +#define PMERR_DOSOPEN_FAILURE 0x2024 +#define PMERR_DOSREAD_FAILURE 0x2025 +#define PMERR_DRIVER_NOT_FOUND 0x2026 +#define PMERR_DUP_SEG 0x2027 +#define PMERR_DYNAMIC_SEG_SEQ_ERROR 0x2028 +#define PMERR_DYNAMIC_SEG_ZERO_INV 0x2029 +#define PMERR_ELEMENT_INCOMPLETE 0x202A +#define PMERR_ESC_CODE_NOT_SUPPORTED 0x202B +#define PMERR_EXCEEDS_MAX_SEG_LENGTH 0x202C +#define PMERR_FONT_AND_MODE_MISMATCH 0x202D +#define PMERR_FONT_FILE_NOT_LOADED 0x202E +#define PMERR_FONT_NOT_LOADED 0x202F +#define PMERR_FONT_TOO_BIG 0x2030 +#define PMERR_HARDWARE_INIT_FAILURE 0x2031 +#define PMERR_HBITMAP_BUSY 0x2032 +#define PMERR_HDC_BUSY 0x2033 +#define PMERR_HRGN_BUSY 0x2034 +#define PMERR_HUGE_FONTS_NOT_SUPPORTED 0x2035 +#define PMERR_ID_HAS_NO_BITMAP 0x2036 +#define PMERR_IMAGE_INCOMPLETE 0x2037 +#define PMERR_INCOMPAT_COLOR_FORMAT 0x2038 +#define PMERR_INCOMPAT_COLOR_OPTIONS 0x2039 +#define PMERR_INCOMPATIBLE_BITMAP 0x203A +#define PMERR_INCOMPATIBLE_METAFILE 0x203B +#define PMERR_INCORRECT_DC_TYPE 0x203C +#define PMERR_INSUFFICIENT_DISK_SPACE 0x203D +#define PMERR_INSUFFICIENT_MEMORY 0x203E +#define PMERR_INV_ANGLE_PARM 0x203F +#define PMERR_INV_ARC_CONTROL 0x2040 +#define PMERR_INV_AREA_CONTROL 0x2041 +#define PMERR_INV_ARC_POINTS 0x2042 +#define PMERR_INV_ATTR_MODE 0x2043 +#define PMERR_INV_BACKGROUND_COL_ATTR 0x2044 +#define PMERR_INV_BACKGROUND_MIX_ATTR 0x2045 +#define PMERR_INV_BITBLT_MIX 0x2046 +#define PMERR_INV_BITBLT_STYLE 0x2047 +#define PMERR_INV_BITMAP_DIMENSION 0x2048 +#define PMERR_INV_BOX_CONTROL 0x2049 +#define PMERR_INV_BOX_ROUNDING_PARM 0x204A +#define PMERR_INV_CHAR_ANGLE_ATTR 0x204B +#define PMERR_INV_CHAR_DIRECTION_ATTR 0x204C +#define PMERR_INV_CHAR_MODE_ATTR 0x204D +#define PMERR_INV_CHAR_POS_OPTIONS 0x204E +#define PMERR_INV_CHAR_SET_ATTR 0x204F +#define PMERR_INV_CHAR_SHEAR_ATTR 0x2050 +#define PMERR_INV_CLIP_PATH_OPTIONS 0x2051 +#define PMERR_INV_CODEPAGE 0x2052 +#define PMERR_INV_COLOR_ATTR 0x2053 +#define PMERR_INV_COLOR_DATA 0x2054 +#define PMERR_INV_COLOR_FORMAT 0x2055 +#define PMERR_INV_COLOR_INDEX 0x2056 +#define PMERR_INV_COLOR_OPTIONS 0x2057 +#define PMERR_INV_COLOR_START_INDEX 0x2058 +#define PMERR_INV_COORD_OFFSET 0x2059 +#define PMERR_INV_COORD_SPACE 0x205A +#define PMERR_INV_COORDINATE 0x205B +#define PMERR_INV_CORRELATE_DEPTH 0x205C +#define PMERR_INV_CORRELATE_TYPE 0x205D +#define PMERR_INV_CURSOR_BITMAP 0x205E +#define PMERR_INV_DC_DATA 0x205F +#define PMERR_INV_DC_TYPE 0x2060 +#define PMERR_INV_DEVICE_NAME 0x2061 +#define PMERR_INV_DEV_MODES_OPTIONS 0x2062 +#define PMERR_INV_DRAW_CONTROL 0x2063 +#define PMERR_INV_DRAW_VALUE 0x2064 +#define PMERR_INV_DRAWING_MODE 0x2065 +#define PMERR_INV_DRIVER_DATA 0x2066 +#define PMERR_INV_DRIVER_NAME 0x2067 +#define PMERR_INV_DRAW_BORDER_OPTION 0x2068 +#define PMERR_INV_EDIT_MODE 0x2069 +#define PMERR_INV_ELEMENT_OFFSET 0x206A +#define PMERR_INV_ELEMENT_POINTER 0x206B +#define PMERR_INV_END_PATH_OPTIONS 0x206C +#define PMERR_INV_ESC_CODE 0x206D +#define PMERR_INV_ESCAPE_DATA 0x206E +#define PMERR_INV_EXTENDED_LCID 0x206F +#define PMERR_INV_FILL_PATH_OPTIONS 0x2070 +#define PMERR_INV_FIRST_CHAR 0x2071 +#define PMERR_INV_FONT_ATTRS 0x2072 +#define PMERR_INV_FONT_FILE_DATA 0x2073 +#define PMERR_INV_FOR_THIS_DC_TYPE 0x2074 +#define PMERR_INV_FORMAT_CONTROL 0x2075 +#define PMERR_INV_FORMS_CODE 0x2076 +#define PMERR_INV_FONTDEF 0x2077 +#define PMERR_INV_GEOM_LINE_WIDTH_ATTR 0x2078 +#define PMERR_INV_GETDATA_CONTROL 0x2079 +#define PMERR_INV_GRAPHICS_FIELD 0x207A +#define PMERR_INV_HBITMAP 0x207B +#define PMERR_INV_HDC 0x207C +#define PMERR_INV_HJOURNAL 0x207D +#define PMERR_INV_HMF 0x207E +#define PMERR_INV_HPS 0x207F +#define PMERR_INV_HRGN 0x2080 +#define PMERR_INV_ID 0x2081 +#define PMERR_INV_IMAGE_DATA_LENGTH 0x2082 +#define PMERR_INV_IMAGE_DIMENSION 0x2083 +#define PMERR_INV_IMAGE_FORMAT 0x2084 +#define PMERR_INV_IN_AREA 0x2085 +#define PMERR_INV_IN_CALLED_SEG 0x2086 +#define PMERR_INV_IN_CURRENT_EDIT_MODE 0x2087 +#define PMERR_INV_IN_DRAW_MODE 0x2088 +#define PMERR_INV_IN_ELEMENT 0x2089 +#define PMERR_INV_IN_IMAGE 0x208A +#define PMERR_INV_IN_PATH 0x208B +#define PMERR_INV_IN_RETAIN_MODE 0x208C +#define PMERR_INV_IN_SEG 0x208D +#define PMERR_INV_IN_VECTOR_SYMBOL 0x208E +#define PMERR_INV_INFO_TABLE 0x208F +#define PMERR_INV_JOURNAL_OPTION 0x2090 +#define PMERR_INV_KERNING_FLAGS 0x2091 +#define PMERR_INV_LENGTH_OR_COUNT 0x2092 +#define PMERR_INV_LINE_END_ATTR 0x2093 +#define PMERR_INV_LINE_JOIN_ATTR 0x2094 +#define PMERR_INV_LINE_TYPE_ATTR 0x2095 +#define PMERR_INV_LINE_WIDTH_ATTR 0x2096 +#define PMERR_INV_LOGICAL_ADDRESS 0x2097 +#define PMERR_INV_MARKER_BOX_ATTR 0x2098 +#define PMERR_INV_MARKER_SET_ATTR 0x2099 +#define PMERR_INV_MARKER_SYMBOL_ATTR 0x209A +#define PMERR_INV_MATRIX_ELEMENT 0x209B +#define PMERR_INV_MAX_HITS 0x209C +#define PMERR_INV_METAFILE 0x209D +#define PMERR_INV_METAFILE_LENGTH 0x209E +#define PMERR_INV_METAFILE_OFFSET 0x209F +#define PMERR_INV_MICROPS_DRAW_CONTROL 0x20A0 +#define PMERR_INV_MICROPS_FUNCTION 0x20A1 +#define PMERR_INV_MICROPS_ORDER 0x20A2 +#define PMERR_INV_MIX_ATTR 0x20A3 +#define PMERR_INV_MODE_FOR_OPEN_DYN 0x20A4 +#define PMERR_INV_MODE_FOR_REOPEN_SEG 0x20A5 +#define PMERR_INV_MODIFY_PATH_MODE 0x20A6 +#define PMERR_INV_MULTIPLIER 0x20A7 +#define PMERR_INV_NESTED_FIGURES 0x20A8 +#define PMERR_INV_OR_INCOMPAT_OPTIONS 0x20A9 +#define PMERR_INV_ORDER_LENGTH 0x20AA +#define PMERR_INV_ORDERING_PARM 0x20AB +#define PMERR_INV_OUTSIDE_DRAW_MODE 0x20AC +#define PMERR_INV_PAGE_VIEWPORT 0x20AD +#define PMERR_INV_PATH_ID 0x20AE +#define PMERR_INV_PATH_MODE 0x20AF +#define PMERR_INV_PATTERN_ATTR 0x20B0 +#define PMERR_INV_PATTERN_REF_PT_ATTR 0x20B1 +#define PMERR_INV_PATTERN_SET_ATTR 0x20B2 +#define PMERR_INV_PATTERN_SET_FONT 0x20B3 +#define PMERR_INV_PICK_APERTURE_OPTION 0x20B4 +#define PMERR_INV_PICK_APERTURE_POSN 0x20B5 +#define PMERR_INV_PICK_APERTURE_SIZE 0x20B6 +#define PMERR_INV_PICK_NUMBER 0x20B7 +#define PMERR_INV_PLAY_METAFILE_OPTION 0x20B8 +#define PMERR_INV_PRIMITIVE_TYPE 0x20B9 +#define PMERR_INV_PS_SIZE 0x20BA +#define PMERR_INV_PUTDATA_FORMAT 0x20BB +#define PMERR_INV_QUERY_ELEMENT_NO 0x20BC +#define PMERR_INV_RECT 0x20BD +#define PMERR_INV_REGION_CONTROL 0x20BE +#define PMERR_INV_REGION_MIX_MODE 0x20BF +#define PMERR_INV_REPLACE_MODE_FUNC 0x20C0 +#define PMERR_INV_RESERVED_FIELD 0x20C1 +#define PMERR_INV_RESET_OPTIONS 0x20C2 +#define PMERR_INV_RGBCOLOR 0x20C3 +#define PMERR_INV_SCAN_START 0x20C4 +#define PMERR_INV_SEG_ATTR 0x20C5 +#define PMERR_INV_SEG_ATTR_VALUE 0x20C6 +#define PMERR_INV_SEG_CH_LENGTH 0x20C7 +#define PMERR_INV_SEG_NAME 0x20C8 +#define PMERR_INV_SEG_OFFSET 0x20C9 +#define PMERR_INV_SETID 0x20CA +#define PMERR_INV_SETID_TYPE 0x20CB +#define PMERR_INV_SET_VIEWPORT_OPTION 0x20CC +#define PMERR_INV_SHARPNESS_PARM 0x20CD +#define PMERR_INV_SOURCE_OFFSET 0x20CE +#define PMERR_INV_STOP_DRAW_VALUE 0x20CF +#define PMERR_INV_TRANSFORM_TYPE 0x20D0 +#define PMERR_INV_USAGE_PARM 0x20D1 +#define PMERR_INV_VIEWING_LIMITS 0x20D2 +#define PMERR_JFILE_BUSY 0x20D3 +#define PMERR_JNL_FUNC_DATA_TOO_LONG 0x20D4 +#define PMERR_KERNING_NOT_SUPPORTED 0x20D5 +#define PMERR_LABEL_NOT_FOUND 0x20D6 +#define PMERR_MATRIX_OVERFLOW 0x20D7 +#define PMERR_METAFILE_INTERNAL_ERROR 0x20D8 +#define PMERR_METAFILE_IN_USE 0x20D9 +#define PMERR_METAFILE_LIMIT_EXCEEDED 0x20DA +#define PMERR_NAME_STACK_FULL 0x20DB +#define PMERR_NOT_CREATED_BY_DEVOPENDC 0x20DC +#define PMERR_NOT_IN_AREA 0x20DD +#define PMERR_NOT_IN_DRAW_MODE 0x20DE +#define PMERR_NOT_IN_ELEMENT 0x20DF +#define PMERR_NOT_IN_IMAGE 0x20E0 +#define PMERR_NOT_IN_PATH 0x20E1 +#define PMERR_NOT_IN_RETAIN_MODE 0x20E2 +#define PMERR_NOT_IN_SEG 0x20E3 +#define PMERR_NO_BITMAP_SELECTED 0x20E4 +#define PMERR_NO_CURRENT_ELEMENT 0x20E5 +#define PMERR_NO_CURRENT_SEG 0x20E6 +#define PMERR_NO_METAFILE_RECORD_HANDLE 0x20E7 +#define PMERR_ORDER_TOO_BIG 0x20E8 +#define PMERR_OTHER_SET_ID_REFS 0x20E9 +#define PMERR_OVERRAN_SEG 0x20EA +#define PMERR_OWN_SET_ID_REFS 0x20EB +#define PMERR_PATH_INCOMPLETE 0x20EC +#define PMERR_PATH_LIMIT_EXCEEDED 0x20ED +#define PMERR_PATH_UNKNOWN 0x20EE +#define PMERR_PEL_IS_CLIPPED 0x20EF +#define PMERR_PEL_NOT_AVAILABLE 0x20F0 +#define PMERR_PRIMITIVE_STACK_EMPTY 0x20F1 +#define PMERR_PROLOG_ERROR 0x20F2 +#define PMERR_PROLOG_SEG_ATTR_NOT_SET 0x20F3 +#define PMERR_PS_BUSY 0x20F4 +#define PMERR_PS_IS_ASSOCIATED 0x20F5 +#define PMERR_RAM_JNL_FILE_TOO_SMALL 0x20F6 +#define PMERR_REALIZE_NOT_SUPPORTED 0x20F7 +#define PMERR_REGION_IS_CLIP_REGION 0x20F8 +#define PMERR_RESOURCE_DEPLETION 0x20F9 +#define PMERR_SEG_AND_REFSEG_ARE_SAME 0x20FA +#define PMERR_SEG_CALL_RECURSIVE 0x20FB +#define PMERR_SEG_CALL_STACK_EMPTY 0x20FC +#define PMERR_SEG_CALL_STACK_FULL 0x20FD +#define PMERR_SEG_IS_CURRENT 0x20FE +#define PMERR_SEG_NOT_CHAINED 0x20FF +#define PMERR_SEG_NOT_FOUND 0x2100 +#define PMERR_SEG_STORE_LIMIT_EXCEEDED 0x2101 +#define PMERR_SETID_IN_USE 0x2102 +#define PMERR_SETID_NOT_FOUND 0x2103 +#define PMERR_STARTDOC_NOT_ISSUED 0x2104 +#define PMERR_STOP_DRAW_OCCURRED 0x2105 +#define PMERR_TOO_MANY_METAFILES_IN_USE 0x2106 +#define PMERR_TRUNCATED_ORDER 0x2107 +#define PMERR_UNCHAINED_SEG_ZERO_INV 0x2108 +#define PMERR_UNSUPPORTED_ATTR 0x2109 +#define PMERR_UNSUPPORTED_ATTR_VALUE 0x210A +#define PMERR_ENDDOC_NOT_ISSUED 0x210B + +#endif /* error codes already included */ +#endif /* include error codes */ + +/*********************************************************\ +* +* Spooler error codes +* +\*********************************************************/ + +#ifdef INCL_SPLERRORS + +#ifndef INCL_SPLERRORS_INCL +/* XLATOFF */ +#define INCL_SPLERRORS_INCL +/* XLATON */ + +#define PMERR_SPL_DRIVER_ERROR 0x4001 +#define PMERR_SPL_DEVICE_ERROR 0x4002 +#define PMERR_SPL_DEVICE_NOT_INSTALLED 0x4003 +#define PMERR_SPL_QUEUE_ERROR 0x4004 +#define PMERR_SPL_INV_HSPL 0x4005 +#define PMERR_SPL_NO_DISK_SPACE 0x4006 +#define PMERR_SPL_NO_MEMORY 0x4007 +#define PMERR_SPL_PRINT_ABORT 0x4008 +#define PMERR_SPL_SPOOLER_NOT_INSTALLED 0x4009 +#define PMERR_SPL_INV_FORMS_CODE 0x400A +#define PMERR_SPL_INV_PRIORITY 0x400B +#define PMERR_SPL_NO_FREE_JOB_ID 0x400C +#define PMERR_SPL_NO_DATA 0x400D +#define PMERR_SPL_INV_TOKEN 0x400E +#define PMERR_SPL_INV_DATATYPE 0x400F +#define PMERR_SPL_PROCESSOR_ERROR 0x4010 +#define PMERR_SPL_INV_JOB_ID 0x4011 +#define PMERR_SPL_JOB_NOT_PRINTING 0x4012 +#define PMERR_SPL_JOB_PRINTING 0x4013 +#define PMERR_SPL_QUEUE_ALREADY_EXISTS 0x4014 +#define PMERR_SPL_INV_QUEUE_NAME 0x4015 +#define PMERR_SPL_QUEUE_NOT_EMPTY 0x4016 +#define PMERR_SPL_DEVICE_ALREADY_EXISTS 0x4017 +#define PMERR_SPL_DEVICE_LIMIT_REACHED 0x4018 +#define PMERR_SPL_STATUS_STRING_TRUNC 0x4019 +#define PMERR_SPL_INV_LENGTH_OR_COUNT 0x401A +#define PMERR_SPL_FILE_NOT_FOUND 0x401B +#define PMERR_SPL_CANNOT_OPEN_FILE 0x401C +#define PMERR_SPL_DRIVER_NOT_INSTALLED 0x401D +#define PMERR_SPL_INV_PROCESSOR_DATTYPE 0x401E +#define PMERR_SPL_INV_DRIVER_DATATYPE 0x401F +#define PMERR_SPL_PROCESSOR_NOT_INST 0x4020 +#define PMERR_SPL_NO_SUCH_LOG_ADDRESS 0x4021 +#define PMERR_SPL_PRINTER_NOT_FOUND 0x4022 +#define PMERR_SPL_DD_NOT_FOUND 0x4023 +#define PMERR_SPL_QUEUE_NOT_FOUND 0x4024 +#define PMERR_SPL_MANY_QUEUES_ASSOC 0x4025 +#define PMERR_SPL_NO_QUEUES_ASSOCIATED 0x4026 +#define PMERR_SPL_INI_FILE_ERROR 0x4027 +#define PMERR_SPL_NO_DEFAULT_QUEUE 0x4028 +#define PMERR_SPL_NO_CURRENT_FORMS_CODE 0x4029 +#define PMERR_SPL_NOT_AUTHORISED 0x402A +#define PMERR_SPL_TEMP_NETWORK_ERROR 0x402B +#define PMERR_SPL_HARD_NETWORK_ERROR 0x402C +#define PMERR_DEL_NOT_ALLOWED 0x402D +#define PMERR_CANNOT_DEL_QP_REF 0x402E +#define PMERR_CANNOT_DEL_QNAME_REF 0x402F +#define PMERR_CANNOT_DEL_PRINTER_DD_REF 0x4030 +#define PMERR_CANNOT_DEL_PRN_NAME_REF 0x4031 +#define PMERR_CANNOT_DEL_PRN_ADDR_REF 0x4032 +#define PMERR_SPOOLER_QP_NOT_DEFINED 0x4033 +#define PMERR_PRN_NAME_NOT_DEFINED 0x4034 +#define PMERR_PRN_ADDR_NOT_DEFINED 0x4035 +#define PMERR_PRINTER_DD_NOT_DEFINED 0x4036 +#define PMERR_PRINTER_QUEUE_NOT_DEFINED 0x4037 +#define PMERR_PRN_ADDR_IN_USE 0x4038 +#define PMERR_SPL_TOO_MANY_OPEN_FILES 0x4039 +#define PMERR_SPL_CP_NOT_REQD 0x403A +#define PMERR_UNABLE_TO_CLOSE_DEVICE 0x4040 + +#define PMERR_SPL_ERROR_1 ( SPLERR_BASE + 4001 ) +#define PMERR_SPL_ERROR_2 ( SPLERR_BASE + 4002 ) +#define PMERR_SPL_ERROR_3 ( SPLERR_BASE + 4003 ) +#define PMERR_SPL_ERROR_4 ( SPLERR_BASE + 4004 ) +#define PMERR_SPL_ERROR_5 ( SPLERR_BASE + 4005 ) +#define PMERR_SPL_ERROR_6 ( SPLERR_BASE + 4006 ) +#define PMERR_SPL_ERROR_7 ( SPLERR_BASE + 4007 ) +#define PMERR_SPL_ERROR_8 ( SPLERR_BASE + 4008 ) +#define PMERR_SPL_ERROR_9 ( SPLERR_BASE + 4009 ) +#define PMERR_SPL_ERROR_10 ( SPLERR_BASE + 4010 ) +#define PMERR_SPL_ERROR_11 ( SPLERR_BASE + 4011 ) +#define PMERR_SPL_ERROR_12 ( SPLERR_BASE + 4012 ) +#define PMERR_SPL_ERROR_13 ( SPLERR_BASE + 4013 ) +#define PMERR_SPL_ERROR_14 ( SPLERR_BASE + 4014 ) +#define PMERR_SPL_ERROR_15 ( SPLERR_BASE + 4015 ) +#define PMERR_SPL_ERROR_16 ( SPLERR_BASE + 4016 ) +#define PMERR_SPL_ERROR_17 ( SPLERR_BASE + 4017 ) +#define PMERR_SPL_ERROR_18 ( SPLERR_BASE + 4018 ) +#define PMERR_SPL_ERROR_19 ( SPLERR_BASE + 4019 ) +#define PMERR_SPL_ERROR_20 ( SPLERR_BASE + 4020 ) +#define PMERR_SPL_ERROR_21 ( SPLERR_BASE + 4021 ) +#define PMERR_SPL_ERROR_22 ( SPLERR_BASE + 4022 ) +#define PMERR_SPL_ERROR_23 ( SPLERR_BASE + 4023 ) +#define PMERR_SPL_ERROR_24 ( SPLERR_BASE + 4024 ) +#define PMERR_SPL_ERROR_25 ( SPLERR_BASE + 4025 ) +#define PMERR_SPL_ERROR_26 ( SPLERR_BASE + 4026 ) +/* next free spooler error is below */ +#define PMERR_SPL_ERROR_27 ( SPLERR_BASE + 4027 ) +#define PMERR_SPL_ERROR_28 ( SPLERR_BASE + 4028 ) +#define PMERR_SPL_ERROR_29 ( SPLERR_BASE + 4029 ) +#define PMERR_SPL_ERROR_30 ( SPLERR_BASE + 4030 ) +#define PMERR_SPL_ERROR_31 ( SPLERR_BASE + 4031 ) +#define PMERR_SPL_ERROR_32 ( SPLERR_BASE + 4032 ) +#define PMERR_SPL_ERROR_33 ( SPLERR_BASE + 4033 ) +#define PMERR_SPL_ERROR_34 ( SPLERR_BASE + 4034 ) +#define PMERR_SPL_ERROR_35 ( SPLERR_BASE + 4035 ) +#define PMERR_SPL_ERROR_36 ( SPLERR_BASE + 4036 ) +#define PMERR_SPL_ERROR_37 ( SPLERR_BASE + 4037 ) +#define PMERR_SPL_ERROR_38 ( SPLERR_BASE + 4038 ) +#define PMERR_SPL_ERROR_39 ( SPLERR_BASE + 4039 ) +#define PMERR_SPL_ERROR_40 ( SPLERR_BASE + 4040 ) + +#define PMERR_SPLMSGBOX_INFO_CAPTION ( SPLERR_BASE + 4041 ) +#define PMERR_SPLMSGBOX_WARNING_CAPTION ( SPLERR_BASE + 4042 ) +#define PMERR_SPLMSGBOX_ERROR_CAPTION ( SPLERR_BASE + 4043 ) +#define PMERR_SPLMSGBOX_SEVERE_CAPTION ( SPLERR_BASE + 4044 ) + +#define PMERR_SPLMSGBOX_JOB_DETAILS ( SPLERR_BASE + 4045 ) + +#define PMERR_SPLMSGBOX_ERROR_ACTION ( SPLERR_BASE + 4046 ) +#define PMERR_SPLMSGBOX_SEVERE_ACTION ( SPLERR_BASE + 4047 ) + +#define PMERR_SPLMSGBOX_BIT_0_TEXT ( SPLERR_BASE + 4048 ) +#define PMERR_SPLMSGBOX_BIT_1_TEXT ( SPLERR_BASE + 4049 ) +#define PMERR_SPLMSGBOX_BIT_2_TEXT ( SPLERR_BASE + 4050 ) +#define PMERR_SPLMSGBOX_BIT_3_TEXT ( SPLERR_BASE + 4051 ) +#define PMERR_SPLMSGBOX_BIT_4_TEXT ( SPLERR_BASE + 4052 ) +#define PMERR_SPLMSGBOX_BIT_5_TEXT ( SPLERR_BASE + 4053 ) +#define PMERR_SPLMSGBOX_BIT_15_TEXT ( SPLERR_BASE + 4054 ) +#define PMERR_SPL_NOPATHBUFFER ( SPLERR_BASE + 4055 ) + +#define PMERR_SPL_ALREADY_INITIALISED ( SPLERR_BASE + 4093 ) +#define PMERR_SPL_ERROR ( SPLERR_BASE + 4095 ) + +#endif /* error codes already included */ +#endif /* include error codes */ + +/*********************************************************\ +* +* Picture Utilities error codes +* +\*********************************************************/ + +#ifdef INCL_PICERRORS + +#ifndef INCL_PICERRORS_INCL +/* XLATOFF */ +#define INCL_PICERRORS_INCL +/* XLATON */ + +#define PMERR_INV_TYPE 0x5001 +#define PMERR_INV_CONV 0x5002 +#define PMERR_INV_SEGLEN 0x5003 +#define PMERR_DUP_SEGNAME 0x5004 +#define PMERR_INV_XFORM 0x5005 +#define PMERR_INV_VIEWLIM 0x5006 +#define PMERR_INV_3DCOORD 0x5007 +#define PMERR_SMB_OVFLOW 0x5008 +#define PMERR_SEG_OVFLOW 0x5009 +#define PMERR_PIC_DUP_FILENAME 0x5010 + + +#endif /* error codes already included */ +#endif /* include error codes */ diff --git a/private/oleauto/tools/win16/os2/inc/pmfont.h b/private/oleauto/tools/win16/os2/inc/pmfont.h new file mode 100644 index 000000000..29c9ab8df --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmfont.h @@ -0,0 +1,120 @@ +/***************************************************************************\ +* +* Module Name: PMFONT.H +* +* OS/2 Presentation Manager type declarations for Fonts. +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +\***************************************************************************/ + +typedef struct _FOCAMETRICS { /* foca */ + ULONG ulIdentity; + ULONG ulSize; + CHAR szFamilyname[32]; + CHAR szFacename[32]; + SHORT usRegistryId; + SHORT usCodePage; + SHORT yEmHeight; + SHORT yXHeight; + SHORT yMaxAscender; + SHORT yMaxDescender; + SHORT yLowerCaseAscent; + SHORT yLowerCaseDescent; + SHORT yInternalLeading; + SHORT yExternalLeading; + SHORT xAveCharWidth; + SHORT xMaxCharInc; + SHORT xEmInc; + SHORT yMaxBaselineExt; + SHORT sCharSlope; + SHORT sInlineDir; + SHORT sCharRot; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT xDeviceRes; + SHORT yDeviceRes; + SHORT usFirstChar; + SHORT usLastChar; + SHORT usDefaultChar; + SHORT usBreakChar; + SHORT usNominalPointSize; + SHORT usMinimumPointSize; + SHORT usMaximumPointSize; + SHORT fsTypeFlags; + SHORT fsDefn; + SHORT fsSelectionFlags; + SHORT fsCapabilities; + SHORT ySubscriptXSize; + SHORT ySubscriptYSize; + SHORT ySubscriptXOffset; + SHORT ySubscriptYOffset; + SHORT ySuperscriptXSize; + SHORT ySuperscriptYSize; + SHORT ySuperscriptXOffset; + SHORT ySuperscriptYOffset; + SHORT yUnderscoreSize; + SHORT yUnderscorePosition; + SHORT yStrikeoutSize; + SHORT yStrikeoutPosition; + SHORT usKerningPairs; + SHORT sFamilyClass; + PSZ pszDeviceNameOffset; +} FOCAMETRICS; +typedef FOCAMETRICS FAR *PFOCAMETRICS; + +typedef struct _FONTDEFINITIONHEADER { /* fdh */ + ULONG ulIdentity; + ULONG ulSize; + SHORT fsFontdef; + SHORT fsChardef; + SHORT usCellSize; + SHORT xCellWidth; + SHORT yCellHeight; + SHORT xCellIncrement; + SHORT xCellA; + SHORT xCellB; + SHORT xCellC; + SHORT pCellBaseOffset; +} FONTDEFINITIONHEADER; +typedef FONTDEFINITIONHEADER FAR *PFONTDEFINITIONHEADER; + +#define FONTDEFFONT1 0x0047 /* set width, height, inc. & base offset */ +#define FONTDEFFONT2 0x0042 /* set height & base offset */ +#define FONTDEFFONT3 0x0042 /* set height & base offset */ +#define FONTDEFCHAR1 0x0081 /* set char offset and width */ +#define FONTDEFCHAR2 0x0081 /* set char offset and width */ +#define FONTDEFCHAR3 0x00b8 /* set char offset, A, B, and C space */ +#define SPACE_UNDEF 0x8000 /* space undefined = take default */ + +typedef struct _FONTSIGNATURE { /* fs */ + ULONG ulIdentity; + ULONG ulSize; + CHAR achSignature[12]; +} FONTSIGNATURE; +typedef FONTSIGNATURE FAR *PFONTSIGNATURE; + +typedef struct _FOCAFONT { /* ff */ + FONTSIGNATURE fsSignature; + FOCAMETRICS fmMetrics; + FONTDEFINITIONHEADER fdDefinitions; +} FOCAFONT; +typedef FOCAFONT FAR *PFOCAFONT; + +#define FONT_SIGNATURE 0xfffffffe /* Identity header start */ +#define FONT_METRICS 0x00000001 /* Identity metrics */ +#define FONT_DEFINITION 0x00000002 /* Identity definition */ +#define FONT_ENDRECORD 0xffffffff /* Identity record end */ + +/* Options for QueryFonts */ + +#define QUERY_PUBLIC_FONTS 0x0001 +#define QUERY_PRIVATE_FONTS 0x0002 + +#define CDEF_GENERIC 0x0001 +#define CDEF_BOLD 0x0002 +#define CDEF_ITALIC 0x0004 +#define CDEF_UNDERSCORE 0x0008 +#define CDEF_STRIKEOUT 0x0010 +#define CDEF_OUTLINE 0x0020 diff --git a/private/oleauto/tools/win16/os2/inc/pmgpi.h b/private/oleauto/tools/win16/os2/inc/pmgpi.h new file mode 100644 index 000000000..4f427dc9f --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmgpi.h @@ -0,0 +1,1388 @@ +/***************************************************************************\ +* +* Module Name: PMGPI.H +* +* OS/2 Presentation Manager GPI constants, types and function declarations +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ============================================================================= +* +* The following symbols are used in this file for conditional sections. +* +* INCL_GPI Include all of the GPI +* INCL_GPICONTROL Basic PS control +* INCL_GPICORRELATION Picking, Boundary and Correlation +* INCL_GPISEGMENTS Segment Control and Drawing +* INCL_GPISEGEDITING Segment Editing via Elements +* INCL_GPITRANSFORMS Transform and Transform Conversion +* INCL_GPIPATHS Paths and Clipping with Paths +* INCL_GPILOGCOLORTABLE Logical Color Tables +* INCL_GPIPRIMITIVES Drawing Primitives and Primitive Attributes +* INCL_GPILCIDS Phyical and Logical Fonts with Lcids +* INCL_GPIBITMAPS Bitmaps and Pel Operations +* INCL_GPIREGIONS Regions and Clipping with Regions +* INCL_GPIMETAFILES Metafiles +* INCL_GPIDEFAULTS Default Primitive Attributes +* INCL_GPIERRORS defined if INCL_ERRORS defined +* +* There is a symbol used in this file called INCL_DDIDEFS. This is used to +* include only the definitions for the DDI. The programmer using the GPI +* can ignore this symbol +* +* There is a symbol used in this file called INCL_SAADEFS. This is used to +* include only the definitions for the SAA. The programmer using the GPI +* can ignore this symbol +* +\***************************************************************************/ + +#ifdef INCL_GPI /* include whole of the GPI */ + #define INCL_GPICONTROL + #define INCL_GPICORRELATION + #define INCL_GPISEGMENTS + #define INCL_GPISEGEDITING + #define INCL_GPITRANSFORMS + #define INCL_GPIPATHS + #define INCL_GPILOGCOLORTABLE + #define INCL_GPIPRIMITIVES + #define INCL_GPILCIDS + #define INCL_GPIBITMAPS + #define INCL_GPIREGIONS + #define INCL_GPIMETAFILES + #define INCL_GPIDEFAULTS +#endif /* INCL_GPI */ + +#ifdef INCL_ERRORS /* if errors are required then allow GPI errors */ + #define INCL_GPIERRORS +#endif /* INCL_ERRORS */ + +#ifdef INCL_DDIDEFS /* if only DDI required then enable DDI part of GPI */ + #define INCL_GPITRANSFORMS + #define INCL_GPIPATHS + #define INCL_GPILOGCOLORTABLE + #define INCL_GPIPRIMITIVES + #define INCL_GPILCIDS + #define INCL_GPIBITMAPS + #define INCL_GPIREGIONS + #define INCL_GPIERRORS +#endif /* INCL_DDIDEFS */ + +#ifdef INCL_SAADEFS /* if only SAA required then enable SAA part of GPI */ + #define INCL_GPICONTROL + #define INCL_GPICORRELATION + #define INCL_GPISEGMENTS + #define INCL_GPISEGEDITING + #define INCL_GPITRANSFORMS + #define INCL_GPIPATHS + #define INCL_GPILOGCOLORTABLE + #define INCL_GPIPRIMITIVES + #define INCL_GPILCIDS + #define INCL_GPIBITMAPS + #define INCL_GPIREGIONS + #define INCL_GPIMETAFILES + #define INCL_GPIERRORS +#endif /* INCL_SAADEFS */ + +/* General GPI return values */ +#define GPI_ERROR 0L +#define GPI_OK 1L +#define GPI_ALTERROR (-1L) + +/* fixed point number - implicit binary point between 2 and 3 hex digits */ +typedef LONG FIXED; /* fx */ +typedef FIXED FAR *PFIXED; + +/* fixed point number - implicit binary point between 1st and 2nd hex digits */ +typedef USHORT FIXED88; /* fx88 */ + +/* fixed point signed number - implicit binary point between bits 14 and 13. */ +/* Bit 15 is the sign bit. */ +/* Thus 1.0 is represented by 16384 (0x4000) */ +/* and -1.0 is represented by -16384 (0xc000) */ +typedef USHORT FIXED114; /* fx114 */ + +/* make FIXED number from SHORT integer part and USHORT fractional part */ +#define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart) +/* extract fractional part from a fixed quantity */ +#define FIXEDFRAC(fx) (LOUSHORT(fx)) +/* extract integer part from a fixed quantity */ +#define FIXEDINT(fx) ((SHORT)HIUSHORT(fx)) + +/* structure for size parameters e.g. for GpiCreatePS */ +typedef struct _SIZEL { /* sizl */ + LONG cx; + LONG cy; +} SIZEL; +typedef SIZEL FAR *PSIZEL; + +/* return code on GpiQueryLogColorTable,GpiQueryRealColors and GpiQueryPel */ +#define CLR_NOINDEX (-254L) + +#if (defined(INCL_GPICONTROL) || !defined(INCL_NOCOMMON)) + +/* units for GpiCreatePS and others */ +#define PU_ARBITRARY 0x0004L +#define PU_PELS 0x0008L +#define PU_LOMETRIC 0x000CL +#define PU_HIMETRIC 0x0010L +#define PU_LOENGLISH 0x0014L +#define PU_HIENGLISH 0x0018L +#define PU_TWIPS 0x001CL + +/* format for GpiCreatePS */ +#define GPIF_DEFAULT 0L +#define GPIF_SHORT 0x0100L +#define GPIF_LONG 0x0200L + + +/* PS type for GpiCreatePS */ +#define GPIT_NORMAL 0L +#define GPIT_MICRO 0x1000L + + +/* implicit associate flag for GpiCreatePS */ +#define GPIA_NOASSOC 0L +#define GPIA_ASSOC 0x4000L + +#ifndef INCL_SAADEFS +/* return error for GpiQueryDevice */ +#define HDC_ERROR ((HDC)-1L) +#endif /* no INCL_SAADEFS */ + +/* common GPICONTROL functions */ +HPS APIENTRY GpiCreatePS( HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions ); +BOOL APIENTRY GpiDestroyPS( HPS hps ); +BOOL APIENTRY GpiAssociate( HPS hps, HDC hdc ); +BOOL APIENTRY GpiRestorePS( HPS hps, LONG lPSid ); +LONG APIENTRY GpiSavePS( HPS hps ); +BOOL APIENTRY GpiErase( HPS hps ); + +#ifndef INCL_SAADEFS +HDC APIENTRY GpiQueryDevice( HPS ); +#endif /* no INCL_SAADEFS */ + +#endif /* common GPICONTROL */ +#ifdef INCL_GPICONTROL + +/* options for GpiResetPS */ +#define GRES_ATTRS 0x0001L +#define GRES_SEGMENTS 0x0002L +#define GRES_ALL 0x0004L + +/* option masks for PS options used by GpiQueryPs */ +#define PS_UNITS 0x00FCL +#define PS_FORMAT 0x0F00L +#define PS_TYPE 0x1000L +#define PS_MODE 0x2000L +#define PS_ASSOCIATE 0x4000L +#define PS_NORESET 0x8000L + + +/* error context returned by GpiErrorSegmentData */ +#define GPIE_SEGMENT 0L +#define GPIE_ELEMENT 1L +#define GPIE_DATA 2L + +#ifndef INCL_SAADEFS + +/* control parameter for GpiSetDrawControl */ +#define DCTL_ERASE 1L +#define DCTL_DISPLAY 2L +#define DCTL_BOUNDARY 3L +#define DCTL_DYNAMIC 4L +#define DCTL_CORRELATE 5L + +/* constants for GpiSet/QueryDrawControl */ +#define DCTL_ERROR -1L +#define DCTL_OFF 0L +#define DCTL_ON 1L + +/* constants for GpiSet/QueryStopDraw */ +#define SDW_ERROR -1L +#define SDW_OFF 0L +#define SDW_ON 1L + +#endif /* no INCL_SAADEFS */ + +/* drawing for GpiSet/QueryDrawingMode */ +#define DM_ERROR 0L +#define DM_DRAW 1L +#define DM_RETAIN 2L +#define DM_DRAWANDRETAIN 3L + +/*** other GPICONTROL functions */ +BOOL APIENTRY GpiResetPS( HPS hps, ULONG flOptions ); + +#ifndef INCL_SAADEFS + +BOOL APIENTRY GpiSetPS( HPS hps, PSIZEL psizlsize, ULONG flOptions ); + +#endif /* no INCL_SAADEFS */ + +ULONG APIENTRY GpiQueryPS( HPS hps, PSIZEL psizlSize ); +LONG APIENTRY GpiErrorSegmentData( HPS hps, PLONG plSegment, PLONG plContext ); + +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiQueryDrawControl( HPS hps, LONG lControl ); +BOOL APIENTRY GpiSetDrawControl( HPS hps, LONG lControl, LONG lValue ); + +#endif /* no INCL_SAADEFS */ + +LONG APIENTRY GpiQueryDrawingMode( HPS hps ); +BOOL APIENTRY GpiSetDrawingMode( HPS hps, LONG lMode ); + +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiQueryStopDraw( HPS hps ); +BOOL APIENTRY GpiSetStopDraw( HPS hps, LONG lValue ); + +#endif /* no INCL_SAADEFS */ + +#endif /* non-common GPICONTROL */ +#ifdef INCL_GPICORRELATION + +/* options for GpiSetPickApertureSize */ +#define PICKAP_DEFAULT 0L +#define PICKAP_REC 2L + +/* type of correlation for GpiCorrelateChain */ +#define PICKSEL_VISIBLE 0L +#define PICKSEL_ALL 1L + +/* return code to indicate correlate hit(s) */ +#define GPI_HITS 2L + +/*** picking, correlation and boundary functions */ +LONG APIENTRY GpiCorrelateChain( HPS hps, LONG lType, PPOINTL pptlPick + , LONG lMaxHits, LONG lMaxDepth, PLONG pl2 ); +BOOL APIENTRY GpiQueryTag( HPS hps, PLONG plTag ); +BOOL APIENTRY GpiSetTag( HPS hps, LONG lTag ); +BOOL APIENTRY GpiQueryPickApertureSize( HPS hps, PSIZEL psizlSize ); +BOOL APIENTRY GpiSetPickApertureSize( HPS hps, LONG lOptions, PSIZEL psizlSize ); + +#ifndef INCL_SAADEFS + +BOOL APIENTRY GpiQueryPickAperturePosition( HPS hps, PPOINTL pptlPoint ); +BOOL APIENTRY GpiSetPickAperturePosition( HPS hps, PPOINTL pptlPick ); +BOOL APIENTRY GpiQueryBoundaryData( HPS hps, PRECTL prclBoundary ); +BOOL APIENTRY GpiResetBoundaryData( HPS hps ); + +#endif /* no INCL_SAADEFS */ + +LONG APIENTRY GpiCorrelateFrom( HPS hps, LONG lFirstSegment, LONG lLastSegment + , LONG lType, PPOINTL pptlPick, LONG lMaxHits + , LONG lMaxDepth, PLONG plSegTag ); +LONG APIENTRY GpiCorrelateSegment( HPS hps, LONG lSegment, LONG lType + , PPOINTL pptlPick, LONG lMaxHits + , LONG lMaxDepth, PLONG alSegTag ); + +#endif /* non-common_GPICORRELATION */ +#ifdef INCL_GPISEGMENTS + +/* data formats for GpiPutData and GpiGetData */ +#define DFORM_NOCONV 0L + +#ifndef INCL_SAADEFS + +#define DFORM_S370SHORT 1L +#define DFORM_PCSHORT 2L +#define DFORM_PCLONG 4L + +#endif /* no INCL_SAADEFS */ + +/* segment attributes used by GpiSet/QuerySegmentAttrs and others */ +#define ATTR_ERROR (-1L) +#define ATTR_DETECTABLE 1L +#define ATTR_VISIBLE 2L +#define ATTR_CHAINED 6L + +#ifndef INCL_SAADEFS + +#define ATTR_DYNAMIC 8L + +#endif /* no INCL_SAADEFS */ + +#define ATTR_FASTCHAIN 9L +#define ATTR_PROP_DETECTABLE 10L +#define ATTR_PROP_VISIBLE 11L + +/* attribute on/off values */ +#define ATTR_OFF 0L +#define ATTR_ON 1L + +/* segment priority used by GpiSetSegmentPriority and others */ +#define LOWER_PRI (-1L) +#define HIGHER_PRI 1L + +/*** segment control functions */ +BOOL APIENTRY GpiOpenSegment( HPS hps, LONG lSegment ); +BOOL APIENTRY GpiCloseSegment( HPS hps ); +BOOL APIENTRY GpiDeleteSegment( HPS hps, LONG lSegid ); +LONG APIENTRY GpiQueryInitialSegmentAttrs( HPS hps, LONG lAttribute ); +BOOL APIENTRY GpiSetInitialSegmentAttrs( HPS hps, LONG lAttribute, LONG lValue ); +LONG APIENTRY GpiQuerySegmentAttrs( HPS hps, LONG lSegid, LONG lAttribute ); +BOOL APIENTRY GpiSetSegmentAttrs( HPS hps, LONG lSegid, LONG lAttribute + , LONG lValue ); +LONG APIENTRY GpiQuerySegmentPriority( HPS hps, LONG lRefSegid, LONG lOrder ); +BOOL APIENTRY GpiSetSegmentPriority( HPS hps, LONG lSegid, LONG lRefSegid + , LONG lOrder ); +BOOL APIENTRY GpiDeleteSegments( HPS hps, LONG lFirstSegment, LONG lLastSegment ); +LONG APIENTRY GpiQuerySegmentNames( HPS hps, LONG lFirstSegid, LONG lLastSegid + , LONG lMax, PLONG alSegids ); + +/*** draw functions for segments */ +LONG APIENTRY GpiGetData( HPS hps, LONG lSegid, PLONG plOffset + , LONG lFormat, LONG lLength, PBYTE pbData ); +LONG APIENTRY GpiPutData( HPS hps, LONG lFormat, PLONG plCount, PBYTE pbData ); +BOOL APIENTRY GpiDrawChain( HPS hps ); +BOOL APIENTRY GpiDrawFrom( HPS hps, LONG lFirstSegment, LONG lLastSegment ); +BOOL APIENTRY GpiDrawSegment( HPS hps, LONG lSegment ); + +#ifndef INCL_SAADEFS + +BOOL APIENTRY GpiDrawDynamics( HPS hps ); +BOOL APIENTRY GpiRemoveDynamics( HPS hps, LONG lFirstSegid, LONG lLastSegid ); + +#endif /* no INCL_SAADEFS */ + +#endif /* non-common GPISEGMENTS */ +#ifdef INCL_GPISEGEDITING + +/* edit modes used by GpiSet/QueryEditMode */ +#define SEGEM_ERROR 0L +#define SEGEM_INSERT 1L +#define SEGEM_REPLACE 2L + +/*** segment editing by element functions */ +BOOL APIENTRY GpiBeginElement( HPS hps, LONG lType, PSZ pszDesc ); +BOOL APIENTRY GpiEndElement( HPS hps ); +BOOL APIENTRY GpiLabel( HPS hps, LONG lLabel ); +LONG APIENTRY GpiElement( HPS hps, LONG lType, PSZ pszDesc + , LONG lLength, PBYTE pbData ); +LONG APIENTRY GpiQueryElement( HPS hps, LONG lOff, LONG lMaxLength + , PBYTE pbData ); +BOOL APIENTRY GpiDeleteElement( HPS hps ); +BOOL APIENTRY GpiDeleteElementRange( HPS hps, LONG lFirstElement + , LONG lLastElement ); +BOOL APIENTRY GpiDeleteElementsBetweenLabels( HPS hps, LONG lFirstLabel + , LONG lLastLabel ); +LONG APIENTRY GpiQueryEditMode( HPS hps ); +BOOL APIENTRY GpiSetEditMode( HPS hps, LONG lMode ); +LONG APIENTRY GpiQueryElementPointer( HPS hps ); +BOOL APIENTRY GpiSetElementPointer( HPS hps, LONG lElement ); +BOOL APIENTRY GpiOffsetElementPointer( HPS hps, LONG loffset ); +LONG APIENTRY GpiQueryElementType( HPS hps, PLONG plType, LONG lLength + , PSZ pszData ); +BOOL APIENTRY GpiSetElementPointerAtLabel( HPS hps, LONG lLabel ); + +#endif /* non-common GPISEGEDITING */ +#ifdef INCL_GPITRANSFORMS + +/* co-ordinates space for GpiConvert */ +#define CVTC_WORLD 1L +#define CVTC_MODEL 2L +#define CVTC_DEFAULTPAGE 3L +#define CVTC_PAGE 4L +#define CVTC_DEVICE 5L + +/* type of transformation for GpiSetSegmentTransformMatrix */ +#define TRANSFORM_REPLACE 0L +#define TRANSFORM_ADD 1L +#define TRANSFORM_PREEMPT 2L + +/* transform matrix */ +typedef struct _MATRIXLF { /* matlf */ + FIXED fxM11; + FIXED fxM12; + LONG lM13; + FIXED fxM21; + FIXED fxM22; + LONG lM23; + LONG lM31; + LONG lM32; + LONG lM33; +} MATRIXLF; +typedef MATRIXLF FAR *PMATRIXLF; + +#ifndef INCL_DDIDEFS + +/*** transform and transform conversion functions */ +BOOL APIENTRY GpiQuerySegmentTransformMatrix( HPS hps, LONG lSegid, LONG lCount + , PMATRIXLF pmatlfArray ); +BOOL APIENTRY GpiSetSegmentTransformMatrix( HPS hps, LONG lSegid, LONG lCount + , PMATRIXLF pmatlfarray + , LONG lOptions ); +BOOL APIENTRY GpiConvert( HPS hps, LONG lSrc, LONG lTarg, LONG lCount + , PPOINTL aptlPoints ); +BOOL APIENTRY GpiQueryModelTransformMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfArray ); +BOOL APIENTRY GpiSetModelTransformMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfArray, LONG lOptions ); +LONG APIENTRY GpiCallSegmentMatrix( HPS hps, LONG lSegment, LONG lCount + , PMATRIXLF pmatlfArray, LONG lOptions ); +BOOL APIENTRY GpiQueryDefaultViewMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfArray ); +BOOL APIENTRY GpiSetDefaultViewMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfarray, LONG lOptions ); +BOOL APIENTRY GpiQueryPageViewport( HPS hps, PRECTL prclViewport ); +BOOL APIENTRY GpiSetPageViewport( HPS hps, PRECTL prclViewport ); +BOOL APIENTRY GpiQueryViewingTransformMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfArray ); +BOOL APIENTRY GpiSetViewingTransformMatrix( HPS hps, LONG lCount + , PMATRIXLF pmatlfArray + , LONG lOptions ); + +/*** transform helper routines */ +BOOL APIENTRY GpiTranslate( HPS, PMATRIXLF, LONG, PPOINTL ); +BOOL APIENTRY GpiScale( HPS, PMATRIXLF, LONG, PFIXED, PPOINTL ); +BOOL APIENTRY GpiRotate( HPS, PMATRIXLF, LONG, FIXED, PPOINTL ); + +/*** general clipping functions */ +BOOL APIENTRY GpiSetGraphicsField( HPS hps, PRECTL prclField ); +BOOL APIENTRY GpiQueryGraphicsField( HPS hps, PRECTL prclField ); +BOOL APIENTRY GpiSetViewingLimits( HPS hps, PRECTL prclLimits ); +BOOL APIENTRY GpiQueryViewingLimits( HPS hps, PRECTL prclLimits ); + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPITRANSFORMS */ +#ifdef INCL_GPIPATHS + +/* modes for GpiModifyPath */ +#define MPATH_STROKE 6L + +/* modes for GpiFillPath */ +#define FPATH_ALTERNATE 0L +#define FPATH_WINDING 2L + +/* modes for GpiSetClipPath */ +#define SCP_ALTERNATE 0L +#define SCP_WINDING 2L +#define SCP_AND 4L +#define SCP_RESET 0L + +#ifndef INCL_DDIDEFS + +/*** Path and Clip Path functions */ +BOOL APIENTRY GpiBeginPath( HPS hps, LONG lPath ); +BOOL APIENTRY GpiEndPath( HPS hps ); +BOOL APIENTRY GpiCloseFigure( HPS hps ); +BOOL APIENTRY GpiModifyPath( HPS hps, LONG lPath, LONG lMode ); +LONG APIENTRY GpiFillPath( HPS hps, LONG lPath, LONG lOptions ); +BOOL APIENTRY GpiSetClipPath( HPS hps, LONG lPath, LONG lOptions ); +LONG APIENTRY GpiOutlinePath( HPS hps, LONG lPath, LONG lOptions ); + +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiStrokePath( HPS hps, LONG lPath, ULONG flOptions ); + +#endif /* no INCL_SAADEFS */ + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPIPATHS */ +#ifdef INCL_GPILOGCOLORTABLE + +/* options for GpiCreateLogColorTable and others */ +#define LCOL_RESET 0x0001L +#define LCOL_REALIZABLE 0x0002L +#define LCOL_PURECOLOR 0x0004L + +/* format of logical lColor table for GpiCreateLogColorTable and others */ +#define LCOLF_DEFAULT 0L +#define LCOLF_INDRGB 1L +#define LCOLF_CONSECRGB 2L +#define LCOLF_RGB 3L + +/* options for GpiQueryRealColors and others */ +#define LCOLOPT_REALIZED 0x0001L +#define LCOLOPT_INDEX 0x0002L + +#ifndef INCL_SAADEFS + +/* return codes from GpiQueryLogColorTable to indicate it is in RGB mode */ +#define QLCT_ERROR (-1L) +#define QLCT_RGB (-2L) + +/* GpiQueryLogColorTable index returned for colors not explicitly loaded */ +#define QLCT_NOTLOADED (-1L) + +#endif /* no INCL_SAADEFS */ + +/* return codes for GpiQueryColorData */ +#define QCD_LCT_FORMAT 0L +#define QCD_LCT_LOINDEX 1L +#define QCD_LCT_HIINDEX 2L + +#ifndef INCL_DDIDEFS + +/*** logical lColor table functions */ +BOOL APIENTRY GpiCreateLogColorTable( HPS hps, ULONG flOptions, LONG lFormat + , LONG lStart, LONG lCount, PLONG alTable ); +BOOL APIENTRY GpiRealizeColorTable( HPS hps ); +BOOL APIENTRY GpiUnrealizeColorTable( HPS hps ); +BOOL APIENTRY GpiQueryColorData( HPS hps, LONG lCount, PLONG alArray ); + +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiQueryLogColorTable( HPS hps, ULONG flOptions, LONG lStart + , LONG lCount, PLONG alArray ); + +#endif /* no INCL_SAADEFS */ + +LONG APIENTRY GpiQueryRealColors( HPS hps, ULONG flOptions, LONG lStart + , LONG lCount, PLONG alColors ); +LONG APIENTRY GpiQueryNearestColor( HPS hps, ULONG flOptions, LONG lRgbIn ); +LONG APIENTRY GpiQueryColorIndex( HPS hps, ULONG flOptions, LONG lRgbColor ); +LONG APIENTRY GpiQueryRGBColor( HPS hps, ULONG flOptions, LONG lColorIndex ); + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPILOGCOLORTABLE */ +#if (defined(INCL_GPIPRIMITIVES) || !defined(INCL_NOCOMMON)) + +/* default color table indices */ + +#define CLR_FALSE (-5L) +#define CLR_TRUE (-4L) + +#define CLR_ERROR (-255L) +#define CLR_DEFAULT (-3L) +#define CLR_WHITE (-2L) +#define CLR_BLACK (-1L) +#define CLR_BACKGROUND 0L +#define CLR_BLUE 1L +#define CLR_RED 2L +#define CLR_PINK 3L +#define CLR_GREEN 4L +#define CLR_CYAN 5L +#define CLR_YELLOW 6L +#define CLR_NEUTRAL 7L + +#define CLR_DARKGRAY 8L +#define CLR_DARKBLUE 9L +#define CLR_DARKRED 10L +#define CLR_DARKPINK 11L +#define CLR_DARKGREEN 12L +#define CLR_DARKCYAN 13L +#define CLR_BROWN 14L +#define CLR_PALEGRAY 15L + +/* rgb colors */ +#define RGB_ERROR (-255L) +#define RGB_BLACK 0x00000000L +#define RGB_BLUE 0x000000FFL +#define RGB_GREEN 0x0000FF00L +#define RGB_CYAN 0x0000FFFFL +#define RGB_RED 0x00FF0000L +#define RGB_PINK 0x00FF00FFL +#define RGB_YELLOW 0x00FFFF00L +#define RGB_WHITE 0x00FFFFFFL + +/* control flags used by GpiBeginArea */ +#define BA_NOBOUNDARY 0L +#define BA_BOUNDARY 0x0001L + + +#define BA_ALTERNATE 0L +#define BA_WINDING 0x0002L + + +/* fill options for GpiBox/GpiFullArc */ +#define DRO_FILL 1L +#define DRO_OUTLINE 2L +#define DRO_OUTLINEFILL 3L + +/* basic pattern symbols */ +#define PATSYM_ERROR (-1L) +#define PATSYM_DEFAULT 0L +#define PATSYM_DENSE1 1L +#define PATSYM_DENSE2 2L +#define PATSYM_DENSE3 3L +#define PATSYM_DENSE4 4L +#define PATSYM_DENSE5 5L +#define PATSYM_DENSE6 6L +#define PATSYM_DENSE7 7L +#define PATSYM_DENSE8 8L +#define PATSYM_VERT 9L +#define PATSYM_HORIZ 10L +#define PATSYM_DIAG1 11L +#define PATSYM_DIAG2 12L +#define PATSYM_DIAG3 13L +#define PATSYM_DIAG4 14L +#define PATSYM_NOSHADE 15L +#define PATSYM_SOLID 16L +#define PATSYM_BLANK 64L +#ifndef INCL_SAADEFS +#define PATSYM_HALFTONE 17L +#endif /* no INCL_SAADEFS */ + +/* lcid values for GpiSet/QueryPattern and others */ +#define LCID_ERROR (-1L) +#define LCID_DEFAULT 0L + +#ifndef INCL_DDIDEFS + +/*** global primitive functions */ +BOOL APIENTRY GpiSetColor( HPS hps, LONG lColor ); +LONG APIENTRY GpiQueryColor( HPS hps ); + +/*** line primitive functions */ +LONG APIENTRY GpiBox( HPS hps, LONG lControl, PPOINTL pptlPoint + , LONG lHRound, LONG lVRound ); + +BOOL APIENTRY GpiMove( HPS hps, PPOINTL pptlPoint ); +LONG APIENTRY GpiLine( HPS hps, PPOINTL pptlEndPoint ); +LONG APIENTRY GpiPolyLine( HPS hps, LONG lCount, PPOINTL aptlPoints ); + +/*** area primitive functions */ +BOOL APIENTRY GpiSetPattern( HPS hps, LONG lPatternSymbol ); +LONG APIENTRY GpiQueryPattern( HPS hps ); +BOOL APIENTRY GpiBeginArea( HPS hps, ULONG flOptions ); +LONG APIENTRY GpiEndArea( HPS hps ); + +/*** character primitive functions */ +LONG APIENTRY GpiCharString( HPS hps, LONG lCount, PCH pchString ); +LONG APIENTRY GpiCharStringAt( HPS hps, PPOINTL pptlPoint + , LONG lCount, PCH pchString ); + +#endif /* no INCL_DDIDEFS */ + +#endif /* common GPIPRIMTIVES */ +#ifdef INCL_GPIPRIMITIVES + +/* mode for GpiSetAttrMode */ +#define AM_ERROR (-1L) +#define AM_PRESERVE 0L +#define AM_NOPRESERVE 1L + +/* foreground mixes */ +#define FM_ERROR (-1L) +#define FM_DEFAULT 0L +#define FM_OR 1L +#define FM_OVERPAINT 2L +#define FM_LEAVEALONE 5L + + +#define FM_XOR 4L +#define FM_AND 6L +#define FM_SUBTRACT 7L +#define FM_MASKSRCNOT 8L +#define FM_ZERO 9L +#define FM_NOTMERGESRC 10L +#define FM_NOTXORSRC 11L +#define FM_INVERT 12L +#define FM_MERGESRCNOT 13L +#define FM_NOTCOPYSRC 14L +#define FM_MERGENOTSRC 15L +#define FM_NOTMASKSRC 16L +#define FM_ONE 17L + + +/* background mixes */ +#define BM_ERROR (-1L) +#define BM_DEFAULT 0L +#define BM_OVERPAINT 2L +#define BM_LEAVEALONE 5L + + +#define BM_OR 1L +#define BM_XOR 4L + + +/* basic line type styles */ +#define LINETYPE_ERROR (-1L) +#define LINETYPE_DEFAULT 0L +#define LINETYPE_DOT 1L +#define LINETYPE_SHORTDASH 2L +#define LINETYPE_DASHDOT 3L +#define LINETYPE_DOUBLEDOT 4L +#define LINETYPE_LONGDASH 5L +#define LINETYPE_DASHDOUBLEDOT 6L +#define LINETYPE_SOLID 7L +#define LINETYPE_INVISIBLE 8L +#ifndef INCL_SAADEFS +#define LINETYPE_ALTERNATE 9L +#endif /* no INCL_SAADEFS */ + +/* cosmetic line widths */ +#define LINEWIDTH_ERROR (-1L) +#define LINEWIDTH_DEFAULT 0L +#define LINEWIDTH_NORMAL 0x00010000L /* MAKEFIXED(1,0) */ + +/* actual line widths */ +#define LINEWIDTHGEOM_ERROR (-1L) + +/* line end styles */ +#define LINEEND_ERROR (-1L) +#define LINEEND_DEFAULT 0L +#define LINEEND_FLAT 1L +#define LINEEND_SQUARE 2L +#define LINEEND_ROUND 3L + +/* line join styles */ +#define LINEJOIN_ERROR (-1L) +#define LINEJOIN_DEFAULT 0L +#define LINEJOIN_BEVEL 1L +#define LINEJOIN_ROUND 2L +#define LINEJOIN_MITRE 3L + +/* character directions */ +#define CHDIRN_ERROR (-1L) +#define CHDIRN_DEFAULT 0L +#define CHDIRN_LEFTRIGHT 1L +#define CHDIRN_TOPBOTTOM 2L +#define CHDIRN_RIGHTLEFT 3L +#define CHDIRN_BOTTOMTOP 4L + +/* character modes */ +#define CM_ERROR (-1L) +#define CM_DEFAULT 0L +#define CM_MODE1 1L +#define CM_MODE2 2L +#define CM_MODE3 3L + +/* basic marker symbols */ +#define MARKSYM_ERROR (-1L) +#define MARKSYM_DEFAULT 0L +#define MARKSYM_CROSS 1L +#define MARKSYM_PLUS 2L +#define MARKSYM_DIAMOND 3L +#define MARKSYM_SQUARE 4L +#define MARKSYM_SIXPOINTSTAR 5L +#define MARKSYM_EIGHTPOINTSTAR 6L +#define MARKSYM_SOLIDDIAMOND 7L +#define MARKSYM_SOLIDSQUARE 8L +#define MARKSYM_DOT 9L +#define MARKSYM_SMALLCIRCLE 10L +#define MARKSYM_BLANK 64L + +/* formatting options for GpiCharStringPosAt */ +#define CHS_OPAQUE 0x0001L +#define CHS_VECTOR 0x0002L +#define CHS_LEAVEPOS 0x0008L +#define CHS_CLIP 0x0010L + +/* bundle codes for GpiSetAttributes and GpiQueryAttributes */ +#define PRIM_LINE 1L +#define PRIM_CHAR 2L +#define PRIM_MARKER 3L +#define PRIM_AREA 4L +#define PRIM_IMAGE 5L + +/* line bundle mask bits */ +#define LBB_COLOR 0x0001L +#define LBB_MIX_MODE 0x0004L +#define LBB_WIDTH 0x0010L +#define LBB_GEOM_WIDTH 0x0020L +#define LBB_TYPE 0x0040L +#define LBB_END 0x0080L +#define LBB_JOIN 0x0100L + +/* character bundle mask bits */ +#define CBB_COLOR 0x0001L +#define CBB_BACK_COLOR 0x0002L +#define CBB_MIX_MODE 0x0004L +#define CBB_BACK_MIX_MODE 0x0008L +#define CBB_SET 0x0010L +#define CBB_MODE 0x0020L +#define CBB_BOX 0x0040L +#define CBB_ANGLE 0x0080L +#define CBB_SHEAR 0x0100L +#define CBB_DIRECTION 0x0200L + +/* marker bundle mask bits */ +#define MBB_COLOR 0x0001L +#define MBB_BACK_COLOR 0x0002L +#define MBB_MIX_MODE 0x0004L +#define MBB_BACK_MIX_MODE 0x0008L +#define MBB_SET 0x0010L +#define MBB_SYMBOL 0x0020L +#define MBB_BOX 0x0040L + +/* pattern bundle mask bits */ +#define ABB_COLOR 0x0001L +#define ABB_BACK_COLOR 0x0002L +#define ABB_MIX_MODE 0x0004L +#define ABB_BACK_MIX_MODE 0x0008L +#define ABB_SET 0x0010L +#define ABB_SYMBOL 0x0020L +#define ABB_REF_POINT 0x0040L + +/* image bundle mask bits */ +#define IBB_COLOR 0x0001L +#define IBB_BACK_COLOR 0x0002L +#define IBB_MIX_MODE 0x0004L +#define IBB_BACK_MIX_MODE 0x0008L + +/* structure for GpiSetArcParams and GpiQueryArcParams */ +typedef struct _ARCPARAMS { /* arcp */ + LONG lP; + LONG lQ; + LONG lR; + LONG lS; +} ARCPARAMS; +typedef ARCPARAMS FAR *PARCPARAMS; + +/* variation of SIZE used for FIXEDs */ +typedef struct _SIZEF { /* sizfx */ + FIXED cx; + FIXED cy; +} SIZEF; +typedef SIZEF FAR *PSIZEF; + +/* structure for gradient parameters e.g. for GpiSetCharAngle */ +typedef struct _GRADIENTL { /* gradl */ + LONG x; + LONG y; +} GRADIENTL; +typedef GRADIENTL FAR *PGRADIENTL; + +/* line bundle for GpiSetAttributes and GpiQueryAttributes */ +typedef struct _LINEBUNDLE { /* lbnd */ + LONG lColor; + LONG lReserved; + USHORT usMixMode; + USHORT usReserved; + FIXED fxWidth; + LONG lGeomWidth; + USHORT usType; + USHORT usEnd; + USHORT usJoin; +} LINEBUNDLE; + +/* character bundle for GpiSetAttributes and GpiQueryAttributes */ +typedef struct _CHARBUNDLE { /* cbnd */ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usPrecision; + SIZEF sizfxCell; + POINTL ptlAngle; + POINTL ptlShear; + USHORT usDirection; +} CHARBUNDLE; + +/* marker bundle for GpiSetAttributes and GpiQueryAttributes */ +typedef struct _MARKERBUNDLE { /* mbnd */ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usSymbol; + SIZEF sizfxCell; +} MARKERBUNDLE; + +/* pattern bundle for GpiSetAttributes and GpiQueryAttributes */ +typedef struct _AREABUNDLE { /* pbnd */ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usSymbol; + POINTL ptlRefPoint ; +} AREABUNDLE; + +/* image bundle for GpiSetAttributes and GpiQueryAttributes */ +typedef struct _IMAGEBUNDLE { /* ibmd */ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; +} IMAGEBUNDLE; + +/* pointer to any bundle used by GpiSet/QueryAttrs */ +typedef PVOID PBUNDLE; + +/* array indices for GpiQueryTextBox */ +#define TXTBOX_TOPLEFT 0L +#define TXTBOX_BOTTOMLEFT 1L +#define TXTBOX_TOPRIGHT 2L +#define TXTBOX_BOTTOMRIGHT 3L +#define TXTBOX_CONCAT 4L +/* array count for GpiQueryTextBox */ +#define TXTBOX_COUNT 5L + +/* return codes for GpiPtVisible */ +#define PVIS_ERROR 0L +#define PVIS_INVISIBLE 1L +#define PVIS_VISIBLE 2L + +/* return codes for GpiRectVisible */ +#define RVIS_ERROR 0L +#define RVIS_INVISIBLE 1L +#define RVIS_PARTIAL 2L +#define RVIS_VISIBLE 3L + +#ifndef INCL_DDIDEFS + +/*** attribute mode functions */ +BOOL APIENTRY GpiSetAttrMode( HPS hps, LONG lMode ); +LONG APIENTRY GpiQueryAttrMode( HPS hps ); +/*** bundle primitive functions */ +BOOL APIENTRY GpiSetAttrs( HPS hps, LONG lPrimType, ULONG flAttrMask + , ULONG flDefMask, PBUNDLE ppbunAttrs ); +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiQueryAttrs( HPS hps, LONG lPrimType + , ULONG flAttrMask, PBUNDLE ppbunAttrs ); + +#endif /* no INCL_SAADEFS */ + +/*** global primitive functions */ +BOOL APIENTRY GpiSetBackColor( HPS hps, LONG lColor ); +LONG APIENTRY GpiQueryBackColor( HPS hps ); +BOOL APIENTRY GpiSetMix( HPS hps, LONG lMixMode ); +LONG APIENTRY GpiQueryMix( HPS hps ); +BOOL APIENTRY GpiSetBackMix( HPS hps, LONG lMixMode ); +LONG APIENTRY GpiQueryBackMix( HPS hps ); + +/*** line primitive functions */ +BOOL APIENTRY GpiSetLineType( HPS hps, LONG lLineType ); +LONG APIENTRY GpiQueryLineType( HPS hps ); +BOOL APIENTRY GpiSetLineWidth( HPS hps, FIXED fxLineWidth ); +FIXED APIENTRY GpiQueryLineWidth( HPS hps ); + +BOOL APIENTRY GpiSetLineWidthGeom( HPS hps, LONG lLineWidth ); +LONG APIENTRY GpiQueryLineWidthGeom( HPS hps ); +BOOL APIENTRY GpiSetLineEnd( HPS hps, LONG lLineEnd ); +LONG APIENTRY GpiQueryLineEnd( HPS hps ); +BOOL APIENTRY GpiSetLineJoin( HPS hps, LONG lLineJoin ); +LONG APIENTRY GpiQueryLineJoin( HPS hps ); + +BOOL APIENTRY GpiSetCurrentPosition( HPS hps, PPOINTL pptlPoint ); +BOOL APIENTRY GpiQueryCurrentPosition( HPS hps, PPOINTL pptlPoint ); + +/*** arc primitive functions */ +BOOL APIENTRY GpiSetArcParams( HPS hps, PARCPARAMS parcpArcParams ); +BOOL APIENTRY GpiQueryArcParams( HPS hps, PARCPARAMS parcpArcParams ); + +LONG APIENTRY GpiPointArc( HPS hps, PPOINTL pptl2 ); + +LONG APIENTRY GpiFullArc( HPS hps, LONG lControl, FIXED fxMultiplier ); +LONG APIENTRY GpiPartialArc( HPS hps, PPOINTL pptlCenter, FIXED fxMultiplier + , FIXED fxStartAngle, FIXED fxSweepAngle ); +LONG APIENTRY GpiPolyFillet( HPS hps, LONG lCount, PPOINTL aptlPoints ); +LONG APIENTRY GpiPolySpline( HPS hps, LONG lCount, PPOINTL aptlPoints ); +LONG APIENTRY GpiPolyFilletSharp( HPS hps, LONG lCount, PPOINTL aptlPoints + , PFIXED afxPoints ); + +/*** area primitive functions */ +BOOL APIENTRY GpiSetPatternSet( HPS hps, LONG lSet ); +LONG APIENTRY GpiQueryPatternSet( HPS hps ); +BOOL APIENTRY GpiSetPatternRefPoint( HPS hps, PPOINTL pptlRefPoint ); +BOOL APIENTRY GpiQueryPatternRefPoint( HPS hps, PPOINTL pptlRefPoint ); + +/*** character primitive functions */ + +BOOL APIENTRY GpiQueryCharStringPos( HPS hps, ULONG flOptions, LONG lCount + , PCH pchString, PLONG alXincrements + , PPOINTL aptlPositions ); +BOOL APIENTRY GpiQueryCharStringPosAt( HPS hps, PPOINTL pptlStart + , ULONG flOptions, LONG lCount + , PCH pchString, PLONG alXincrements + , PPOINTL aptlPositions ); +BOOL APIENTRY GpiQueryTextBox( HPS hps, LONG lCount1, PCH pchString + , LONG lCount2, PPOINTL aptlPoints ); +BOOL APIENTRY GpiQueryDefCharBox( HPS hps, PSIZEL psizlSize ); +BOOL APIENTRY GpiSetCharSet( HPS hps, LONG llcid ); +LONG APIENTRY GpiQueryCharSet( HPS hps ); +BOOL APIENTRY GpiSetCharBox( HPS hps, PSIZEF psizfxBox ); +BOOL APIENTRY GpiQueryCharBox( HPS hps, PSIZEF psizfxSize ); +BOOL APIENTRY GpiSetCharAngle( HPS hps, PGRADIENTL pgradlAngle ); +BOOL APIENTRY GpiQueryCharAngle( HPS hps, PGRADIENTL pgradlAngle ); +BOOL APIENTRY GpiSetCharShear( HPS hps, PPOINTL pptlAngle ); +BOOL APIENTRY GpiQueryCharShear( HPS hps, PPOINTL pptlShear ); +BOOL APIENTRY GpiSetCharDirection( HPS hps, LONG lDirection ); +LONG APIENTRY GpiQueryCharDirection( HPS hps ); +BOOL APIENTRY GpiSetCharMode( HPS hps, LONG lMode ); +LONG APIENTRY GpiQueryCharMode( HPS hps ); + +LONG APIENTRY GpiCharStringPos( HPS hps, PRECTL prclRect, ULONG flOptions + , LONG lCount, PCH pchString, PLONG alAdx ); +LONG APIENTRY GpiCharStringPosAt( HPS hps, PPOINTL pptlStart, PRECTL prclRect + , ULONG flOptions, LONG lCount, PCH pchString + , PLONG alAdx ); + +/*** marker primitive functions */ +LONG APIENTRY GpiMarker( HPS hps, PPOINTL pptlPoint ); +LONG APIENTRY GpiPolyMarker( HPS hps, LONG lCount, PPOINTL aptlPoints ); +BOOL APIENTRY GpiSetMarker( HPS hps, LONG lSymbol ); +BOOL APIENTRY GpiSetMarkerBox( HPS hps, PSIZEF psizfxSize ); +BOOL APIENTRY GpiSetMarkerSet( HPS hps, LONG lSet ); +LONG APIENTRY GpiQueryMarker( HPS hps ); +BOOL APIENTRY GpiQueryMarkerBox( HPS hps, PSIZEF psizfxSize ); +LONG APIENTRY GpiQueryMarkerSet( HPS hps ); + +/*** image primitive functions */ +LONG APIENTRY GpiImage( HPS hps, LONG lFormat, PSIZEL psizlImageSize + , LONG lLength, PBYTE pbData ); + +/*** miscellaneous primitive functions */ +BOOL APIENTRY GpiPop( HPS hps, LONG lCount ); +LONG APIENTRY GpiPtVisible( HPS hps, PPOINTL pptlPoint ); +LONG APIENTRY GpiRectVisible( HPS hps, PRECTL prclRectangle ); +BOOL APIENTRY GpiComment( HPS hps, LONG lLength, PBYTE pbData ); + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPIPRIMITIVES */ +#ifdef INCL_GPILCIDS + +/* return codes from GpiCreateLogFont */ +#define FONT_DEFAULT 1L +#define FONT_MATCH 2L + +/* lcid type for GpiQuerySetIds */ +#define LCIDT_FONT 6L + +#define LCIDT_BITMAP 7L + +/* constant used to delete all lcids by GpiDeleteSetId */ +#define LCID_ALL (-1L) + +/* kerning data returned by GpiQueryKerningPairs */ +typedef struct _KERNINGPAIRS { /* krnpr */ + SHORT sFirstChar; + SHORT sSecondChar; + SHORT sKerningAmount; +} KERNINGPAIRS; +typedef KERNINGPAIRS FAR *PKERNINGPAIRS; + +/* options for GpiQueryFonts */ +#define QF_PUBLIC 0x0001L +#define QF_PRIVATE 0x0002L + +#ifndef INCL_SAADEFS + +/* font file descriptions for GpiQueryFontFileDescriptions */ +typedef CHAR FFDESCS[2][FACESIZE]; /* ffdescs */ +typedef FFDESCS FAR *PFFDESCS; + +#endif /* no INCL_SAADEFS */ + +#ifndef INCL_DDIDEFS + +/*** physical and logical font functions */ +LONG APIENTRY GpiCreateLogFont( HPS hps, PSTR8 pName, LONG lLcid + , PFATTRS pfatAttrs ); +BOOL APIENTRY GpiDeleteSetId( HPS hps, LONG lLcid ); +BOOL APIENTRY GpiLoadFonts( HAB hab, PSZ pszFilename ); +BOOL APIENTRY GpiUnloadFonts( HAB hab, PSZ pszFilename ); +LONG APIENTRY GpiQueryFonts( HPS hps, ULONG flOptions, PSZ pszFacename + , PLONG plReqFonts, LONG lMetricsLength + , PFONTMETRICS afmMetrics ); +BOOL APIENTRY GpiQueryFontMetrics( HPS hps, LONG lMetricsLength + , PFONTMETRICS pfmMetrics ); +LONG APIENTRY GpiQueryKerningPairs( HPS hps, LONG lCount + , PKERNINGPAIRS akrnprData ); +BOOL APIENTRY GpiQueryWidthTable( HPS hps, LONG lFirstChar, LONG lCount + , PLONG alData ); +LONG APIENTRY GpiQueryNumberSetIds( HPS hps ); +BOOL APIENTRY GpiQuerySetIds( HPS hps, LONG lCount, PLONG alTypes + , PSTR8 aNames, PLONG allcids ); + +#ifndef INCL_SAADEFS +BOOL APIENTRY GpiSetCp( HPS hps, USHORT usCodePage ); +USHORT APIENTRY GpiQueryCp( HPS hps ); +LONG APIENTRY GpiQueryFontFileDescriptions( HAB hab, PSZ pszFilename + , PLONG plCount + , PFFDESCS affdescsNames ); +#endif /* no INCL_SAADEFS */ + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPILCIDS */ +#if (defined(INCL_GPIBITMAPS) || !defined(INCL_NOCOMMON)) + +/* rastor operations defined for GpiBitBlt */ +#define ROP_SRCCOPY 0x00CCL +#define ROP_SRCPAINT 0x00EEL +#define ROP_SRCAND 0x0088L +#define ROP_SRCINVERT 0x0066L +#define ROP_SRCERASE 0x0044L +#define ROP_NOTSRCCOPY 0x0033L +#define ROP_NOTSRCERASE 0x0011L +#define ROP_MERGECOPY 0x00C0L +#define ROP_MERGEPAINT 0x00BBL +#define ROP_PATCOPY 0x00F0L +#define ROP_PATPAINT 0x00FBL +#define ROP_PATINVERT 0x005AL +#define ROP_DSTINVERT 0x0055L +#define ROP_ZERO 0x0000L +#define ROP_ONE 0x00FFL + +/* Blt options for GpiBitBlt */ +#define BBO_OR 0L +#define BBO_AND 1L +#define BBO_IGNORE 2L + +/* error return for GpiSetBitmap */ +#define HBM_ERROR ((HBITMAP)-1L) + +#ifndef INCL_DDIDEFS + +/*** bitmap and pel functions */ +LONG APIENTRY GpiBitBlt( HPS hpsTarget, HPS hpsSource, LONG lCount + , PPOINTL aptlPoints, LONG lRop, ULONG flOptions ); +BOOL APIENTRY GpiDeleteBitmap( HBITMAP hbm ); +HBITMAP APIENTRY GpiLoadBitmap( HPS hps, HMODULE Resource, USHORT idBitmap + , LONG lWidth, LONG lHeight ); +HBITMAP APIENTRY GpiSetBitmap(HPS hps, HBITMAP hbm ); +LONG APIENTRY GpiWCBitBlt( HPS hpsTarget, HBITMAP hbmSource, LONG lCount + , PPOINTL aptlPoints, LONG lRop, ULONG flOptions ); + + +#endif /* no INCL_DDIDEFS */ + +#endif /* common GPIBITMAPS */ +#ifdef INCL_GPIBITMAPS + +/* usage flags for GpiCreateBitmap */ +#define CBM_INIT 0x0004L + +/* bitmap parameterization used by GpiCreateBitmap and others */ +typedef struct _BITMAPINFOHEADER { /* bmp */ + ULONG cbFix; + USHORT cx; + USHORT cy; + USHORT cPlanes; + USHORT cBitCount; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER FAR *PBITMAPINFOHEADER; + +/* RGB data for _BITMAPINFO struct */ +typedef struct _RGB { /* rgb */ + BYTE bBlue; + BYTE bGreen; + BYTE bRed; +} RGB; + +/* bitmap data used by GpiSetBitmapBits and others */ +typedef struct _BITMAPINFO { /* bmi */ + ULONG cbFix; + USHORT cx; + USHORT cy; + USHORT cPlanes; + USHORT cBitCount; + RGB argbColor[1]; +} BITMAPINFO; +typedef BITMAPINFO FAR *PBITMAPINFO; + +/* error return code for GpiSet/QueryBitmapBits */ +#define BMB_ERROR (-1L) + +#ifndef INCL_DDIDEFS + +/*** bitmap and pel functions */ +HBITMAP APIENTRY GpiCreateBitmap( HPS hps, PBITMAPINFOHEADER pbmpNew + , ULONG flOptions, PBYTE pbInitData + , PBITMAPINFO pbmiInfoTable ); +LONG APIENTRY GpiSetBitmapBits( HPS hps, LONG lScanStart, LONG lScans + , PBYTE pbBuffer, PBITMAPINFO pbmiInfoTable ); +BOOL APIENTRY GpiSetBitmapDimension( HBITMAP hbm, PSIZEL psizlBitmapDimension ); +BOOL APIENTRY GpiSetBitmapId( HPS hps, HBITMAP hbm, LONG lLcid ); +LONG APIENTRY GpiQueryBitmapBits( HPS hps, LONG lScanStart, LONG lScans + , PBYTE pbBuffer, PBITMAPINFO pbmiInfoTable ); +BOOL APIENTRY GpiQueryBitmapDimension( HBITMAP hbm, PSIZEL psizlBitmapDimension ); +HBITMAP APIENTRY GpiQueryBitmapHandle( HPS hps, LONG lLcid ); +BOOL APIENTRY GpiQueryBitmapParameters( HBITMAP hbm + , PBITMAPINFOHEADER pbmpData ); +BOOL APIENTRY GpiQueryDeviceBitmapFormats( HPS hps, LONG lCount + , PLONG alArray ); + +LONG APIENTRY GpiSetPel( HPS hps, PPOINTL pptlPoint ); +LONG APIENTRY GpiQueryPel( HPS hps, PPOINTL pptlPoint ); + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPIBITMAPS */ +#ifdef INCL_GPIREGIONS + +/* options for GpiCombineRegion */ +#define CRGN_OR 1L +#define CRGN_COPY 2L +#define CRGN_XOR 4L +#define CRGN_AND 6L +#define CRGN_DIFF 7L + +/* usDirection of returned region data for GpiQueryRegionRects */ +#define RECTDIR_LFRT_TOPBOT 1L +#define RECTDIR_RTLF_TOPBOT 2L +#define RECTDIR_LFRT_BOTTOP 3L +#define RECTDIR_RTLF_BOTTOP 4L + +/* control data for GpiQueryRegionRects */ +typedef struct _RGNRECT { /* rgnrc */ + USHORT ircStart; + USHORT crc; + USHORT crcReturned; + USHORT usDirection; +} RGNRECT; +typedef RGNRECT FAR *PRGNRECT; + +/* return code to indicate type of region for GpiCombineRegion and others */ +#define RGN_ERROR 0L +#define RGN_NULL 1L +#define RGN_RECT 2L +#define RGN_COMPLEX 3L + +/* return codes for GpiPtInRegion */ +#define PRGN_ERROR 0L +#define PRGN_OUTSIDE 1L +#define PRGN_INSIDE 2L + +/* return codes for GpiRectInRegion */ +#define RRGN_ERROR 0L +#define RRGN_OUTSIDE 1L +#define RRGN_PARTIAL 2L +#define RRGN_INSIDE 3L + +/* return codes for GpiEqualRegion */ +#define EQRGN_ERROR 0L +#define EQRGN_NOTEQUAL 1L +#define EQRGN_EQUAL 2L + +/* error return code for GpiSetRegion */ +#define HRGN_ERROR ((HRGN)-1L) + +#ifndef INCL_DDIDEFS + +/*** main region functions */ +LONG APIENTRY GpiCombineRegion( HPS hps, HRGN hrgnDest, HRGN hrgnSrc1 + , HRGN hrgnSrc2, LONG lMode ); +HRGN APIENTRY GpiCreateRegion( HPS hps, LONG lCount, PRECTL arclRectangles ); +BOOL APIENTRY GpiDestroyRegion( HPS hps, HRGN hrgn ); +LONG APIENTRY GpiEqualRegion( HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2 ); +BOOL APIENTRY GpiOffsetRegion( HPS hps, HRGN Hrgn, PPOINTL pptlOffset ); +LONG APIENTRY GpiPaintRegion( HPS hps, HRGN hrgn ); +LONG APIENTRY GpiPtInRegion( HPS hps, HRGN hrgn, PPOINTL pptlPoint ); +LONG APIENTRY GpiQueryRegionBox( HPS hps, HRGN hrgn, PRECTL prclBound ); +BOOL APIENTRY GpiQueryRegionRects( HPS hps, HRGN hrgn, PRECTL prclBound + , PRGNRECT prgnrcControl, PRECTL prclRect ); +LONG APIENTRY GpiRectInRegion( HPS hps, HRGN hrgn, PRECTL prclRect ); +BOOL APIENTRY GpiSetRegion( HPS hps, HRGN hrgn, LONG lcount + , PRECTL arclRectangles ); + +/*** clip region functions */ +LONG APIENTRY GpiSetClipRegion( HPS hps, HRGN hrgn, PHRGN phrgnOld ); + +#ifndef INCL_SAADEFS + +HRGN APIENTRY GpiQueryClipRegion( HPS hps ); +LONG APIENTRY GpiQueryClipBox( HPS hps, PRECTL prclBound ); + +#endif /* no INCL_SAADEFS */ + +LONG APIENTRY GpiExcludeClipRectangle( HPS hps, PRECTL prclRectangle ); +LONG APIENTRY GpiIntersectClipRectangle( HPS hps, PRECTL prclRectangle ); + +#ifndef INCL_SAADEFS + +LONG APIENTRY GpiOffsetClipRegion( HPS hps, PPOINTL pptlPoint ); + +#endif /* no INCL_SAADEFS */ + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPIREGIONS */ +#ifdef INCL_GPIMETAFILES + +#ifndef INCL_DDIDEFS + +/* constants for index values of options array for GpiPlayMetafile */ +#define PMF_SEGBASE 0 +#define PMF_LOADTYPE 1 +#define PMF_RESOLVE 2 +#define PMF_LCIDS 3 +#define PMF_RESET 4 +#define PMF_SUPPRESS 5 +#define PMF_COLORTABLES 6 +#define PMF_COLORREALIZABLE 7 +#define PMF_DEFAULTS 8 + +/* options for GpiPlayMetafile */ +#define RS_DEFAULT 0L +#define RS_NODISCARD 1L +#define LC_DEFAULT 0L +#define LC_NOLOAD 1L +#define LC_LOADDISC 3L +#define LT_DEFAULT 0L +#define LT_NOMODIFY 1L +#define LT_ORIGINALVIEW 4L +#define RES_DEFAULT 0L +#define RES_NORESET 1L +#define RES_RESET 2L +#define SUP_DEFAULT 0L +#define SUP_NOSUPPRESS 1L +#define SUP_SUPPRESS 2L +#define CTAB_DEFAULT 0L +#define CTAB_NOMODIFY 1L +#define CTAB_REPLACE 3L +#define CREA_DEFAULT 0L +#define CREA_REALIZE 1L +#define CREA_NOREALIZE 2L + +#ifndef INCL_SAADEFS + +#define DDEF_DEFAULT 0L +#define DDEF_IGNORE 1L +#define DDEF_LOADDISC 3L +#define RSP_DEFAULT 0L +#define RSP_NODISCARD 1L + +#endif /* no INCL_SAADEFS */ + +/*** metafile functions */ +HMF APIENTRY GpiCopyMetaFile( HMF hmf ); +BOOL APIENTRY GpiDeleteMetaFile( HMF hmf ); +HMF APIENTRY GpiLoadMetaFile( HAB hab, PSZ pszFilename ); +LONG APIENTRY GpiPlayMetaFile( HPS hps, HMF hmf, LONG lCount1 + , PLONG alOptarray, PLONG plSegCount + , LONG lCount2, PSZ pszDesc ); +BOOL APIENTRY GpiQueryMetaFileBits( HMF hmf, LONG lOffset, LONG lLength + , PBYTE pbData ); +LONG APIENTRY GpiQueryMetaFileLength( HMF hmf ); +BOOL APIENTRY GpiSaveMetaFile( HMF hmf, PSZ pszFilename ); + + +#ifndef INCL_SAADEFS + +BOOL APIENTRY GpiSetMetaFileBits( HMF hmf, LONG lOffset, LONG lLength + , PBYTE pbBuffer ); + +#endif /* no INCL_SAADEFS */ + +#endif /* no INCL_DDIDEFS */ + +#endif /* non-common GPIMETAFILES */ + +#ifdef INCL_GPIDEFAULTS + +/*** default functions */ +BOOL APIENTRY GpiQueryDefArcParams( HPS hps, PARCPARAMS parcpArcParams ); +BOOL APIENTRY GpiQueryDefAttrs( HPS hps, LONG lPrimType, ULONG flAttrMask + , PBUNDLE ppbunAttrs ); +BOOL APIENTRY GpiQueryDefTag( HPS hps, PLONG plTag ); +BOOL APIENTRY GpiQueryDefViewingLimits( HPS hps, PRECTL prclLimits ); + +BOOL APIENTRY GpiSetDefArcParams( HPS hps, PARCPARAMS parcpArcParams ); +BOOL APIENTRY GpiSetDefAttrs( HPS hps, LONG lPrimType, ULONG flAttrMask + , PBUNDLE ppbunAttrs ); +BOOL APIENTRY GpiSetDefTag( HPS hps, LONG lTag ); +BOOL APIENTRY GpiSetDefViewingLimits( HPS hps, PRECTL prclLimits ); + + +#endif /* GPIDEFAULTS */ + +#ifdef INCL_GPIERRORS + +#include <pmerr.h> + +#endif /* non-common GPIERRORS */ diff --git a/private/oleauto/tools/win16/os2/inc/pmhelp.h b/private/oleauto/tools/win16/os2/inc/pmhelp.h new file mode 100644 index 000000000..f52e39f80 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmhelp.h @@ -0,0 +1,268 @@ +/***************************************************************************\ +* +* Module Name: PMHELP.H +* +* OS/2 Information Presentation Facility (IPF) for providing Help +* +* Copyright (c) International Business Machines Corporation 1989 +* Copyright (c) Microsoft Corporation 1989 +* +***************************************************************************** +* Define INCL_WINHELP before OS2.H to include this file +\***************************************************************************/ + +#ifndef PMHELP_H +#define PMHELP_H + +/******************************************************************************/ +/* HelpSubTable entry structure */ +/******************************************************************************/ + +typedef int HELPSUBTABLE; +typedef int far *PHELPSUBTABLE; + +/******************************************************************************/ +/* HelpTable entry structure */ +/******************************************************************************/ + +typedef struct _HELPTABLE { /* ht */ + USHORT idAppWindow; + PHELPSUBTABLE phstHelpSubTable; + USHORT idExtPanel; +} HELPTABLE; +typedef HELPTABLE FAR *PHELPTABLE; + +/******************************************************************************/ +/* IPF Initialization Structure used on the */ +/* WinCreateHelpInstance() call. */ +/******************************************************************************/ + +typedef struct _HELPINIT { /* hinit */ + USHORT cb; + ULONG ulReturnCode; + PSZ pszTutorialName; + PHELPTABLE phtHelpTable; + HMODULE hmodHelpTableModule; + HMODULE hmodAccelActionBarModule; + USHORT idAccelTable; + USHORT idActionBar; + PSZ pszHelpWindowTitle; + USHORT usShowPanelId; + PSZ pszHelpLibraryName; +} HELPINIT; +typedef HELPINIT FAR *PHELPINIT; + + +/******************************************************************************/ +/* Search parent chain indicator for HM_SET_ACTIVE_WINDOW message. */ +/******************************************************************************/ + +#define HWND_PARENT (HWND)NULL + +/******************************************************************************/ +/* Constants used to define whether user wants to display panel using */ +/* panel number or panel name. */ +/******************************************************************************/ + +#define HM_RESOURCEID 0 +#define HM_PANELNAME 1 + +#define HMPANELTYPE_NUMBER 0 +#define HMPANELTYPE_NAME 1 + +/******************************************************************************/ +/* Constants used to define how the panel IDs are displayed on */ +/* help panels. */ +/******************************************************************************/ + +#define CMIC_HIDE_PANEL_ID 0x0000 +#define CMIC_SHOW_PANEL_ID 0x0001 +#define CMIC_TOGGLE_PANEL_ID 0x0002 + +/******************************************************************************/ +/* Window Help function declarations. */ +/******************************************************************************/ + +BOOL APIENTRY WinDestroyHelpInstance( HWND hwndHelpInstance); +HWND APIENTRY WinCreateHelpInstance( HAB hab, PHELPINIT phinitHMInitStructure); +BOOL APIENTRY WinAssociateHelpInstance( HWND hwndHelpInstance, HWND hwndApp); +HWND APIENTRY WinQueryHelpInstance( HWND hwndApp); +BOOL APIENTRY WinLoadHelpTable (HWND hwndHelpInstance, USHORT idHelpTable, + HMODULE Module); +BOOL APIENTRY WinCreateHelpTable (HWND hwndHelpInstance, + PHELPTABLE phtHelpTable); + +/******************************************************************************/ +/* IPF message base. */ +/******************************************************************************/ + +#define HM_MSG_BASE 0x0220 + +/******************************************************************************/ +/* Messages applications can send to the IPF. */ +/******************************************************************************/ + +#define HM_DISMISS_WINDOW HM_MSG_BASE+0x0001 +#define HM_DISPLAY_HELP HM_MSG_BASE+0x0002 +#define HM_EXT_HELP HM_MSG_BASE+0x0003 +#define HM_SET_ACTIVE_WINDOW HM_MSG_BASE+0x0004 +#define HM_LOAD_HELP_TABLE HM_MSG_BASE+0x0005 +#define HM_CREATE_HELP_TABLE HM_MSG_BASE+0x0006 +#define HM_SET_HELP_WINDOW_TITLE HM_MSG_BASE+0x0007 +#define HM_SET_SHOW_PANEL_ID HM_MSG_BASE+0x0008 +#define HM_REPLACE_HELP_FOR_HELP HM_MSG_BASE+0x0009 +#define HM_HELP_INDEX HM_MSG_BASE+0x000a +#define HM_HELP_CONTENTS HM_MSG_BASE+0x000b +#define HM_KEYS_HELP HM_MSG_BASE+0x000c +#define HM_SET_HELP_LIBRARY_NAME HM_MSG_BASE+0x000d + +/******************************************************************************/ +/* Messages the IPF sends to the applications active window */ +/* as defined by the IPF. */ +/******************************************************************************/ + +#define HM_ERROR HM_MSG_BASE+0x000e +#define HM_HELPSUBITEM_NOT_FOUND HM_MSG_BASE+0x000f +#define HM_QUERY_KEYS_HELP HM_MSG_BASE+0x0010 +#define HM_TUTORIAL HM_MSG_BASE+0x0011 +#define HM_EXT_HELP_UNDEFINED HM_MSG_BASE+0x0012 +#define HM_ACTIONBAR_COMMAND HM_MSG_BASE+0x0013 +#define HM_INFORM HM_MSG_BASE+0x0014 + +/******************************************************************************/ +/* HMERR_NO_FRAME_WND_IN_CHAIN - There is no frame window in the */ +/* window chain from which to find or set the associated help */ +/* instance. */ +/******************************************************************************/ + +#define HMERR_NO_FRAME_WND_IN_CHAIN 0x00001001L + +/******************************************************************************/ +/* HMERR_INVALID_ASSOC_APP_WND - The application window handle */ +/* specified on the WinAssociateHelpInstance() call is not a valid */ +/* window handle. */ +/******************************************************************************/ + +#define HMERR_INVALID_ASSOC_APP_WND 0x00001002L + +/******************************************************************************/ +/* HMERR_INVALID_ASSOC_HELP_INST - The help instance handle specified */ +/* on the WinAssociateHelpInstance() call is not a valid */ +/* window handle. */ +/******************************************************************************/ + +#define HMERR_INVALID_ASSOC_HELP_INST 0x00001003L + +/******************************************************************************/ +/* HMERR_INVALID_DESTROY_HELP_INST - The window handle specified */ +/* as the help instance to destroy is not of the help instance class. */ +/******************************************************************************/ + +#define HMERR_INVALID_DESTROY_HELP_INST 0x00001004L + +/******************************************************************************/ +/* HMERR_NO_HELP_INST_IN_CHAIN - The parent or owner chain of the */ +/* application window specified does not have a help instance */ +/* associated with it. */ +/******************************************************************************/ + +#define HMERR_NO_HELP_INST_IN_CHAIN 0x00001005L + +/******************************************************************************/ +/* HMERR_INVALID_HELP_INSTANCE_HDL - The handle specified to be a */ +/* help instance does not have the class name of a IPF */ +/* help instance. */ +/******************************************************************************/ + +#define HMERR_INVALID_HELP_INSTANCE_HDL 0x00001006L + +/******************************************************************************/ +/* HMERR_INVALID_QUERY_APP_WND - The application window specified on */ +/* a WinQueryHelpInstance() call is not a valid window handle. */ +/******************************************************************************/ + +#define HMERR_INVALID_QUERY_APP_WND 0x00001007L + +/******************************************************************************/ +/* HMERR_HELP_INST_CALLED_INVALID - The handle of the help instance */ +/* specified on an API call to the IPF does not have the */ +/* class name of an IPF help instance. */ +/******************************************************************************/ + +#define HMERR_HELP_INST_CALLED_INVALID 0x00001008L +#define HMERR_HELPTABLE_UNDEFINE 0x00001009L +#define HMERR_HELP_INSTANCE_UNDEFINE 0x0000100aL +#define HMERR_HELPITEM_NOT_FOUND 0x0000100bL +#define HMERR_INVALID_HELPSUBITEM_SIZE 0x0000100cL +#define HMERR_HELPSUBITEM_NOT_FOUND 0x0000100dL + +/******************************************************************************/ +/* HMERR_INDEX_NOT_FOUND - No index in library file. */ +/******************************************************************************/ + +#define HMERR_INDEX_NOT_FOUND 0x00002001L + +/******************************************************************************/ +/* HMERR_CONTENT_NOT_FOUND - Library file does not have any contents. */ +/******************************************************************************/ + +#define HMERR_CONTENT_NOT_FOUND 0x00002002L + +/******************************************************************************/ +/* HMERR_OPEN_LIB_FILE - Cannot open library file. */ +/******************************************************************************/ + +#define HMERR_OPEN_LIB_FILE 0x00002003L + +/******************************************************************************/ +/* HMERR_READ_LIB_FILE - Cannot read library file. */ +/******************************************************************************/ + +#define HMERR_READ_LIB_FILE 0x00002004L + +/******************************************************************************/ +/* HMERR_CLOSE_LIB_FILE - Cannot close library file. */ +/******************************************************************************/ + +#define HMERR_CLOSE_LIB_FILE 0x00002005L + +/******************************************************************************/ +/* HMERR_INVALID_LIB_FILE - Improper library file provided. */ +/******************************************************************************/ + +#define HMERR_INVALID_LIB_FILE 0x00002006L + +/******************************************************************************/ +/* HMERR_NO_MEMORY - Unable to allocate the requested amount of memory. */ +/******************************************************************************/ + +#define HMERR_NO_MEMORY 0x00002007L + +/******************************************************************************/ +/* HMERR_ALLOCATE_SEGMENT - Unable */ +/* to allocate a segment of memory for memory allocation requested */ +/* from the IPF. */ +/******************************************************************************/ + +#define HMERR_ALLOCATE_SEGMENT 0x00002008L + +/******************************************************************************/ +/* HMERR_FREE_MEMORY - Unable to free allocated memory. */ +/******************************************************************************/ + +#define HMERR_FREE_MEMORY 0x00002009L + +/******************************************************************************/ +/* HMERR_PANEL_NOT_FOUND - Unable */ +/* to find a help panel requested to IPF. */ +/******************************************************************************/ + +#define HMERR_PANEL_NOT_FOUND 0x00002010L + +/******************************************************************************/ +/* HMERR_DATABASE_NOT_OPEN - Unable to read the unopened database. */ +/******************************************************************************/ + +#define HMERR_DATABASE_NOT_OPEN 0x00002011L + +#endif diff --git a/private/oleauto/tools/win16/os2/inc/pmmle.h b/private/oleauto/tools/win16/os2/inc/pmmle.h new file mode 100644 index 000000000..9ff1bc2d1 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmmle.h @@ -0,0 +1,232 @@ +/***************************************************************************\ +* +* Module Name: PMMLE.H +* +* OS/2 Presentation Manager MultiLine Edit Control - Version 1.0 +* +* Copyright (c) International Business Machines Corporation 1989 +* Copyright (c) Microsoft Corporation 1989 +* +\***************************************************************************/ + +/***************************************************************************\ +* MLE Class and dialog code +\***************************************************************************/ +/* in pmwin.h */ + +/***************************************************************************\ +* MLE Window styles ( in addition to WS_* ) +\***************************************************************************/ +#define MLS_WORDWRAP 0x00000001L +#define MLS_BORDER 0x00000002L +#define MLS_VSCROLL 0x00000004L +#define MLS_HSCROLL 0x00000008L +#define MLS_READONLY 0x00000010L +#define MLS_IGNORETAB 0x00000020L +#define MLS_DISABLEUNDO 0x00000040L + +/***************************************************************************\ +* MLE External Data Types +\***************************************************************************/ +typedef LONG IPT; /* insertion point */ +typedef PLONG PIPT; /* insertion point */ +typedef LONG PIX; /* pixel */ +typedef ULONG LINE; /* Line number */ + +typedef struct _FORMATRECT { /* MLEFRD format rectangle data */ + LONG cxFormat; /* format rectangle width */ + LONG cyFormat; /* format rectangle height */ +} MLEFORMATRECT; +typedef MLEFORMATRECT FAR *PFORMATRECT; + +typedef struct _MLECTLDATA { /* MLECTL control data */ + USHORT cbCtlData; /* Length of the MLECTLDATA structure */ + USHORT afIEFormat; /* import/export format */ + ULONG cchText; /* text limit */ + IPT iptAnchor; /* beginning of selection */ + IPT iptCursor; /* ending of selection */ + LONG cxFormat; /* format rectangle width */ + LONG cyFormat; /* format rectangle height */ + ULONG afFormatFlags; /* formatting rectangle flags - see mask below */ +} MLECTLDATA; +typedef MLECTLDATA FAR *PMLECTLDATA; + +/***************************************************************************\ +* afFormatFlags mask +\***************************************************************************/ +#define MLFFMTRECT_LIMITHORZ 0x00000001L +#define MLFFMTRECT_LIMITVERT 0x00000002L +#define MLFFMTRECT_MATCHWINDOW 0x00000004L +#define MLFFMTRECT_FORMATRECT 0x00000007L +/***************************************************************************\ +* afIEFormat - Import/Export Format flags +\***************************************************************************/ +#define MLFIE_CFTEXT 0 +#define MLFIE_NOTRANS 1 +#define MLFIE_WINFMT 2 +#define MLFIE_RTF 3 + +/***************************************************************************\ +* MLN_OVERFLOW structure +\***************************************************************************/ +typedef struct _MLEOVERFLOW { /* overflow structure */ + ULONG afErrInd; /* see mask below */ + LONG nBytesOver; /* number of bytes overflowed */ + LONG pixHorzOver; /* number of pixels horizontally overflowed */ + LONG pixVertOver; /* number of pixels vertically overflowed */ +} MLEOVERFLOW; +typedef MLEOVERFLOW FAR *POVERFLOW; + +/***************************************************************************\ +* afErrInd - error format rectangle flags +\***************************************************************************/ +#define MLFEFR_RESIZE 0x00000001L +#define MLFEFR_TABSTOP 0x00000002L +#define MLFEFR_FONT 0x00000004L +#define MLFEFR_TEXT 0x00000008L +#define MLFEFR_WORDWRAP 0x00000010L +#define MLFETL_TEXTBYTES 0x00000020L + +/***************************************************************************\ +* MLN_MARGIN structure +\***************************************************************************/ +typedef struct _MLEMARGSTRUCT { /* margin structure */ + USHORT afMargins; /* margin indicator */ + USHORT usMouMsg; /* mouse message */ + IPT iptNear; /* the geometrically nearest insertion point */ +} MLEMARGSTRUCT; +typedef MLEMARGSTRUCT FAR *PMARGSTRUCT; + +/***************************************************************************\ +* afFlags - margin notification indicators +\***************************************************************************/ +#define MLFMARGIN_LEFT 0x0001 +#define MLFMARGIN_BOTTOM 0x0002 +#define MLFMARGIN_RIGHT 0x0003 +#define MLFMARGIN_TOP 0x0004 + +/***************************************************************************\ +* MLM_QUERYSELECTION flags +\***************************************************************************/ +#define MLFQS_MINMAXSEL 0 +#define MLFQS_MINSEL 1 +#define MLFQS_MAXSEL 2 +#define MLFQS_ANCHORSEL 3 +#define MLFQS_CURSORSEL 4 + +/***************************************************************************\ +* MLN_CLPBDFAIL flags +\***************************************************************************/ +#define MLFCLPBD_TOOMUCHTEXT 0x00000001L +#define MLFCLPBD_ERROR 0x00000002L + +/***************************************************************************\ +* MLM_SEARCH structure +\***************************************************************************/ +typedef struct _SEARCH { /* search structure */ + USHORT cb; /* size of search spec structure */ + PCHAR pchFind; /* string to search for */ + PCHAR pchReplace; /* string to replace with */ + SHORT cchFind; /* length of pchFindString */ + SHORT cchReplace; /* length of replace string */ + IPT iptStart; /* point at which to start search */ + /* (negative indicates cursor pt) */ + /* becomes pt where string found */ + IPT iptStop; /* point at which to stop search */ + /* (negative indicates EOT) */ + USHORT cchFound; /* Length of found string at iptStart */ +} MLE_SEARCHDATA; +typedef MLE_SEARCHDATA FAR *PMLE_SEARCHDATA; + +/***************************************************************************\ +* MLM_SEARCH style flags +\***************************************************************************/ +#define MLFSEARCH_CASESENSITIVE 0x00000001L +#define MLFSEARCH_SELECTMATCH 0x00000002L +#define MLFSEARCH_CHANGEALL 0x00000004L + +/***************************************************************************\ +* MLE messages - MLM from 0x01b0 to 0x01de; MLN from 0x0001 to 0x000f +\***************************************************************************/ +/* formatting messages */ +#define MLM_SETTEXTLIMIT 0x01b0 +#define MLM_QUERYTEXTLIMIT 0x01b1 +#define MLM_SETFORMATRECT 0x01b2 +#define MLM_QUERYFORMATRECT 0x01b3 +#define MLM_SETWRAP 0x01b4 +#define MLM_QUERYWRAP 0x01b5 +#define MLM_SETTABSTOP 0x01b6 +#define MLM_QUERYTABSTOP 0x01b7 +#define MLM_SETREADONLY 0x01b8 +#define MLM_QUERYREADONLY 0x01b9 + +/* text content manipulation and queries messages */ +#define MLM_QUERYCHANGED 0x01ba +#define MLM_SETCHANGED 0x01bb +#define MLM_QUERYLINECOUNT 0x01bc +#define MLM_CHARFROMLINE 0x01bd +#define MLM_LINEFROMCHAR 0x01be +#define MLM_QUERYLINELENGTH 0x01bf +#define MLM_QUERYTEXTLENGTH 0x01c0 + +/* text import and export messages */ +#define MLM_FORMAT 0x01c1 +#define MLM_SETIMPORTEXPORT 0x01c2 +#define MLM_IMPORT 0x01c3 +#define MLM_EXPORT 0x01c4 +#define MLM_DELETE 0x01c6 +#define MLM_QUERYFORMATLINELENGTH 0x01c7 +#define MLM_QUERYFORMATTEXTLENGTH 0x01c8 +#define MLM_INSERT 0x01c9 + +/* selection messages */ +#define MLM_SETSEL 0x01ca +#define MLM_QUERYSEL 0x01cb +#define MLM_QUERYSELTEXT 0x01cc + +/* undo and redo messages */ +#define MLM_QUERYUNDO 0x01cd +#define MLM_UNDO 0x01ce +#define MLM_RESETUNDO 0x01cf + +/* text attributes messages */ +#define MLM_QUERYFONT 0x01d0 +#define MLM_SETFONT 0x01d1 +#define MLM_SETTEXTCOLOR 0x01d2 +#define MLM_QUERYTEXTCOLOR 0x01d3 +#define MLM_SETBACKCOLOR 0x01d4 +#define MLM_QUERYBACKCOLOR 0x01d5 + +/* scrolling messages */ +#define MLM_QUERYFIRSTCHAR 0x01d6 +#define MLM_SETFIRSTCHAR 0x01d7 + +/* clipboard messages */ +#define MLM_CUT 0x01d8 +#define MLM_COPY 0x01d9 +#define MLM_PASTE 0x01da +#define MLM_CLEAR 0x01db + +/* display manipulation messages */ +#define MLM_ENABLEREFRESH 0x01dc +#define MLM_DISABLEREFRESH 0x01dd + +/* search message */ +#define MLM_SEARCH 0x01de +#define MLM_QUERYIMPORTEXPORT 0x01df + +/* notification messages */ +#define MLN_OVERFLOW 0x0001 +#define MLN_PIXHORZOVERFLOW 0x0002 +#define MLN_PIXVERTOVERFLOW 0x0003 +#define MLN_TEXTOVERFLOW 0x0004 +#define MLN_VSCROLL 0x0005 +#define MLN_HSCROLL 0x0006 +#define MLN_CHANGE 0x0007 +#define MLN_SETFOCUS 0x0008 +#define MLN_KILLFOCUS 0x0009 +#define MLN_MARGIN 0x000a +#define MLN_SEARCHPAUSE 0x000b +#define MLN_MEMERROR 0x000c +#define MLN_UNDOOVERFLOW 0x000d +#define MLN_CLPBDFAIL 0x000f diff --git a/private/oleauto/tools/win16/os2/inc/pmord.h b/private/oleauto/tools/win16/os2/inc/pmord.h new file mode 100644 index 000000000..7859198eb --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmord.h @@ -0,0 +1,793 @@ +/****************************** Module Header ******************************\ +* +* Module Name: PMORD.H +* +* This is the include file which defines all the structures and constants +* that can be used to build or intepret GOCA orders for the GPI +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ========================================================================== +* +* The orders fall into 4 categories :- +* +* 1) 1-byte orders +* +* 2) 2-byte orders - second byte contains the value +* +* 3) Long orders - second byte gives the order length, subsequent bytes +* contain the values (up to 256 bytes long) +* +* 4) Very long orders - third and fourth bytes gives the order length, +* subsequent bytes contain the values (up to 64K long) +* +\***************************************************************************/ + +/***************************************************************************\ +* +* Miscellaneous structures used in this file +* +\***************************************************************************/ + +/* form of RECTL with shorts instead of longs */ +typedef struct _RECT1S { /* rcs */ + SHORT xLeft; + SHORT yBottom; + SHORT xRight; + SHORT yTop; +} RECT1S; + +/* form of POINTL with 1 byte offsets instead of longs */ +typedef struct _ODPOINT { /* odpt */ + CHAR dx; + CHAR dy; +} ODPOINT; + +/* form of SIZEL with shorts instead of longs */ +typedef struct _SIZES { /* sizs */ + SHORT cx; + SHORT cy; +} SIZES; + +/* unsigned two-byte swapped integer */ +typedef struct _SWPUSHORT { /* swpus */ + UCHAR HiByte; + UCHAR LoByte; +} SWPUSHORT; + +/***************************************************************************\ +* +* 1-byte orders +* +\***************************************************************************/ + +/* macro to tell whether this is a 1-byte order */ +#define BYTE_ORDER(oc) ((oc)==OCODE_GNOP1 || (oc)==OCODE_GESD) + +/* 1-byte order codes */ +#define OCODE_GNOP1 0x00 /* No-operation */ +#define OCODE_GESD 0xFF /* End symbol definition */ + +/***************************************************************************\ +* +* 2-byte orders +* +\***************************************************************************/ + +/* definitions to help determine whether an order code is a 2-byte order */ +#define OCODE2_1 0x80 +#define OCODE2_2 0x88 + +#define SHORT_ORDER(oc) ((((oc)^OCODE2_1)&OCODE2_2)==OCODE2_2) + +/* General 2-byte order structure */ +typedef struct _ORDER { /* ord */ + UCHAR idCode; + UCHAR uchData; +} ORDER; + +/* 2-byte order codes */ +#define OCODE_GBAR 0x68 /* Begin area */ +#define OCODE_GCFIG 0x7D /* Close figure */ +#define OCODE_GEEL 0x49 /* End element */ +#define OCODE_GEPTH 0x7F /* End path */ +#define OCODE_GEPROL 0x3E /* End prologue */ +#define OCODE_GPOP 0x3F /* Pop */ +#define OCODE_GSBMX 0x0D /* Set background mix */ +#define OCODE_GPSBMX 0x4D /* Push & set b/g mix */ +#define OCODE_GSCD 0x3A /* Set char direction */ +#define OCODE_GPSCD 0x7A /* Push & set char direction */ +#define OCODE_GSCR 0x39 /* Set char precision */ +#define OCODE_GPSCR 0x79 /* Push & set char precision */ +#define OCODE_GSCS 0x38 /* Set char set */ +#define OCODE_GPSCS 0x78 /* Push & set char set */ +#define OCODE_GSCOL 0x0A /* Set color */ +#define OCODE_GPSCOL 0x4A /* Push & set color */ +#define OCODE_GSLE 0x1A /* Set line end */ +#define OCODE_GPSLE 0x5A /* Push & set line end */ +#define OCODE_GSLJ 0x1B /* Set line join */ +#define OCODE_GPSLJ 0x5B /* Push & set line join */ +#define OCODE_GSLT 0x18 /* Set line type */ +#define OCODE_GPSLT 0x58 /* Push & set line type */ +#define OCODE_GSLW 0x19 /* Set line width */ +#define OCODE_GPSLW 0x59 /* Push & set line width */ +#define OCODE_GSMP 0x3B /* Set marker precision */ +#define OCODE_GPSMP 0x7B /* Push & set marker precision */ +#define OCODE_GSMS 0x3C /* Set marker set */ +#define OCODE_GPSMS 0x7C /* Push & set marker set */ +#define OCODE_GSMT 0x29 /* Set marker symbol */ +#define OCODE_GPSMT 0x69 /* Push & set marker symbol */ +#define OCODE_GSMX 0x0C /* Set mix */ +#define OCODE_GPSMX 0x4C /* Push & set mix */ +#define OCODE_GSPS 0x08 /* Set pattern set */ +#define OCODE_GPSPS 0x48 /* Push & set pattern set */ +#define OCODE_GSPT 0x28 /* Set pattern symbol */ +#define OCODE_GPSPT 0x09 /* Push & set pattern symbol */ + +/* constants for 2-byte orders */ + +/* Begin area */ +#define GBAR_RESERVED 0x80 +#define GBAR_BOUNDARY 0xC0 +#define GBAR_NOBOUNDARY 0x80 +#define GBAR_WINDING 0xA0 +#define GBAR_ALTERNATE 0x80 + +/* Set Character Precision */ +#define GSCR_PRECISION 0x0F + +/***************************************************************************\ +* +* Long orders +* +\***************************************************************************/ + +/* definitions to help determine whether an order code is a long order */ + +#define OCODE_VLONG 0xFE + +#define LONG_ORDER(oc) (!((oc)==OCODE_VLONG||BYTE_ORDER(oc)||SHORT_ORDER(oc))) + +/* long order structure */ +#define LORDER_ML 253 +typedef struct _LORDER { /* lord */ + UCHAR idCode; + UCHAR uchLength; + UCHAR uchData[LORDER_ML]; +} LORDER; + +/* Long orders for which the length of data is normally zero */ +#define OCODE_GEAR 0x60 /* End Area */ +#define OCODE_GEIMG 0x93 /* End Image */ + +/* Long orders for which the data is contained in a type already defined */ + +/* Character String */ +#define OCODE_GCCHST 0x83 /* char string at curr posn */ +#define GCCHST_MC 255 /* Max len of string in bytes */ + +#define OCODE_GCHST 0xC3 /* char string at given pos */ +#define GCHST_SMC 251 /* Max len of string (S) */ +#define GCHST_LMC 247 /* Max len of string (L) */ + +/* Character String Move */ +#define OCODE_GCCHSTM 0xB1 /* char string move at c.p. */ +#define GCCHSTM_MC 255 /* Max len of string in byte */ + +#define OCODE_GCHSTM 0xF1 /* char string move at g.p. */ +#define GCHSTM_SMC 251 /* Max len of string (S) */ +#define GCHSTM_LMC 247 /* Max len of string (L) */ + +/* Comment */ +#define OCODE_GCOMT 0x01 /* Comment */ +#define GCOMT_ML 255 /* Maximum len of comment data */ + +/* Image */ +#define OCODE_GIMD 0x92 /* Image data */ +#define GIMD_ML 255 /* Maximum len of image data */ + +/* Full Arc */ +#define OCODE_GCFARC 0x87 /* full arc at current posn */ +#define OCODE_GFARC 0xC7 /* full arc at given posn */ + +/* Label */ +#define OCODE_GLABL 0xD3 /* Label */ + +/* Set Current Position */ +#define OCODE_GSCP 0x21 /* Set current position */ +#define OCODE_GPSCP 0x61 /* Push and set curr posn */ + +/* Bezier spline */ +#define OCODE_GCBEZ 0xA5 /* Bezier spline at curr pos */ +#define GCBEZ_SMB 21 /* Max number of splines (S) */ +#define GCBEZ_LMB 10 /* Max number of splines (L) */ + +#define OCODE_GBEZ 0xE5 /* Bezier spline at given pos */ +#define GBEZ_SMB 20 /* Max number of splines (S) */ +#define GBEZ_LMB 10 /* Max number of splines (L) */ + +/* Fillet */ +#define OCODE_GCFLT 0x85 /* fillet at current posn */ +#define GCFLT_SMP 63 /* Max number of points (S) */ +#define GCFLT_LMP 31 /* Max number of points (L) */ + +#define OCODE_GFLT 0xC5 /* fillet at given position */ +#define GFLT_SMP 62 /* Max number of points (S) */ +#define GFLT_LMP 30 /* Max number of points (L) */ + +/* Polyline */ +#define OCODE_GCLINE 0x81 /* polyline at current posn */ +#define GCLINE_SMP 63 /* Max number of points (S) */ +#define GCLINE_LMP 31 /* Max number of points (L) */ + +#define OCODE_GLINE 0xC1 /* polyline at given posn */ +#define GLINE_SMP 62 /* Max number of points (S) */ +#define GLINE_LMP 30 /* Max number of points (L) */ + +/* Polymarker */ +#define OCODE_GCMRK 0x82 /* marker at current posn */ +#define GCMRK_SMP 63 /* Max number of points (S) */ +#define GCMRK_LMP 31 /* Max number of points (L) */ + +#define OCODE_GMRK 0xC2 /* marker at given posn */ +#define GMRK_SMP 62 /* Max number of points (S) */ +#define GMRK_LMP 30 /* Max number of points (L) */ + +/* Relative Line */ +#define OCODE_GCRLINE 0xA1 /* Relative line at curr pos */ +#define GCRLINE_MP 127 /* Max number of points */ + +#define OCODE_GRLINE 0xE1 /* Relative line at givn pos */ +#define GRLINE_SMP 125 /* Max number of points (S) */ +#define GRLINE_LMP 123 /* Max number of points (L) */ + +/* Set Background Color */ +#define OCODE_GSBCOL 0x25 /* Set background color */ +#define OCODE_GPSBCOL 0x65 /* Push and set b/g color */ + +/* Set Extended Color */ +#define OCODE_GSECOL 0x26 /* Set extended color */ +#define OCODE_GPSECOL 0x66 /* Push and set ext color */ + +/* Extended Color values */ +#define SECOL_DEFAULT0 0x0000 +#define SECOL_DEFAULT1 0xFF00 +#define SECOL_NEUTRAL 0xFF07 +#define SECOL_RESET 0xFF08 + +/* Set Character Angle */ +#define OCODE_GSCA 0x34 /* Set character angle */ +#define OCODE_GPSCA 0x74 /* Push and set char angle */ + +/* Set Character Shear */ +#define OCODE_GSCH 0x35 /* Set character shear */ +#define OCODE_GPSCH 0x75 /* Push and set char shear */ + +/* Set Fractional Line Width */ +#define OCODE_GSFLW 0x11 /* Set fractional line width */ +#define OCODE_GPSFLW 0x51 /* Push and set frac l width */ + +/* Set Pick Identifier */ +#define OCODE_GSPIK 0x43 /* Set pick identifier */ +#define OCODE_GPSPIK 0x23 /* Push and set pick id */ + + +/* Long Orders for which a structure can be defined for the data */ + +/* Arc */ +#define OCODE_GCARC 0x86 /* Arc at Current Position */ +#define OCODE_GARC 0xC6 /* Arc at Given Position */ + +typedef struct _ORDERS_GCARC { /* osgcarc */ + POINTS ptInter; + POINTS ptEnd; +} ORDERS_GCARC; + +typedef struct _ORDERL_GCARC { /* olgcarc */ + POINTL ptInter; + POINTL ptEnd; +} ORDERL_GCARC; + +/* Begin Element */ +#define OCODE_GBEL 0xD2 /* Begin Element */ + +#define GBEL_DL 251 +typedef struct _ORDER_GBEL { /* ogbel */ + LONG lElementType; + CHAR achDesc[GBEL_DL]; +} ORDER_GBEL; + +/* Begin Image */ +#define OCODE_GCBIMG 0x91 /* Begin Image at curr posn */ +#define OCODE_GBIMG 0xD1 /* Begin Image at given posn */ + +typedef struct _ORDER_GCBIMG { /* ogbimg */ + UCHAR uchFormat; + UCHAR uchReserved; + SWPUSHORT cx; + SWPUSHORT cy; +} ORDER_GCBIMG; + +/* Begin Path */ +#define OCODE_GBPTH 0xD0 /* Begin Path */ + +typedef struct _ORDER_GBPTH { /* ogbpth */ + USHORT usReserved; + LONG idPath; +} ORDER_GBPTH; + +/* Box */ +#define OCODE_GCBOX 0x80 /* Box at current position */ +#define OCODE_GBOX 0xC0 /* Box at given position */ + +typedef struct _ORDERS_GCBOX { /* osgcbox */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTS ptCorner; + SHORT hAxis; + SHORT vAxis; +} ORDERS_GCBOX; + +typedef struct _ORDERL_GCBOX { /* olgcbox */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTL ptCorner; + LONG hAxis; + LONG vAxis; +} ORDERL_GCBOX; + +#define GCBOX_FILL 0x40 +#define GCBOX_BOUNDARY 0x20 + +/* Call Segment */ +#define OCODE_GCALLS 0x07 /* call segment */ + +typedef struct _ORDER_GCALLS { /* ogcalls */ + USHORT sReserved; + LONG idSegment; +} ORDER_GCALLS; + +/* Fill Path */ +#define OCODE_GFPTH 0xD7 /* Fill path */ +typedef struct _ORDER_GFPTH { /* ogfpth */ + UCHAR fbFlags; + UCHAR uchReserved; + LONG idPath; +} ORDER_GFPTH; + +#define GFPTH_ALTERNATE 0x00 +#define GFPTH_WINDING 0x40 +#define GFPTH_MODIFY 0x20 + +/* Outline Path */ +#define OCODE_GOPTH 0xD4 /* Outline Path */ +typedef struct _ORDER_GOPTH { /* ogopth */ + UCHAR fbFlags; + UCHAR uchReserved; + LONG idPath; +} ORDER_GOPTH; + +/* Modify Path */ +#define OCODE_GMPTH 0xD8 /* modify path */ + +typedef struct _ORDER_GMPTH { /* ogmpth */ + UCHAR uchMode; + UCHAR uchReserved; + LONG idPath; +} ORDER_GMPTH; + +#define GMPTH_STROKE 0x06 + +/* Partial Arc */ +#define OCODE_GCPARC 0xA3 /* Partial arc at curr posn */ +#define OCODE_GPARC 0xE3 /* Partial arc at given posn */ + +typedef struct _ORDERS_GCPARC { /* osgcparc */ + POINTS ptCenter; + FIXED88 ufx88Multiplier; + LONG usStartAngle; + LONG usSweepAngle; +} ORDERS_GCPARC; + +typedef struct _ORDERL_GCPARC { /* olgcparc */ + POINTL ptCenter; + FIXED ufxMultiplier; + LONG usStartAngle; + LONG usSweepAngle; +} ORDERL_GCPARC; + +/* Set Clip Path */ +#define OCODE_GSCPTH 0xB4 /* Set clip path */ + +typedef struct _ORDER_GSCPTH { /* ogscpth */ + UCHAR fbFlags; + UCHAR uchReserved; + LONG idPath; +} ORDER_GSCPTH; + +#define GSCPTH_ALTERNATE 0x00 +#define GSCPTH_WINDING 0x40 +#define GSCPTH_RESET 0x00 +#define GSCPTH_INTERSECT 0x20 + +/* Set Arc Parameters */ +#define OCODE_GSAP 0x22 /* Set arc parameters */ +#define OCODE_GPSAP 0x62 /* Push and set arc params */ + +typedef struct _ORDERS_GSAP { /* osgsap */ + SHORT p; + SHORT q; + SHORT r; + SHORT s; +} ORDERS_GSAP; + +typedef struct _ORDERL_GSAP { /* olgsap */ + LONG p; + LONG q; + LONG r; + LONG s; +} ORDERL_GSAP; + +/* Set Background Indexed Color */ +#define OCODE_GSBICOL 0xA7 /* Set b/g indexed color */ +#define OCODE_GPSBICOL 0xE7 /* Push and set b/g ind color */ +#define OCODE_GSICOL 0xA6 /* Set indexed color */ +#define OCODE_GPSICOL 0xE6 /* Push and set indexd color */ + +typedef struct _ORDER_GSBICOL { /* ogbicol */ + UCHAR fbFlags; + UCHAR auchColor[3]; +} ORDER_GSBICOL; + +#define SICOL_SPECIFY 0x00 +#define SICOL_SPECIAL 0x40 +#define SICOL_DEFAULT 0x80 +#define SICOL_BLACK 1 +#define SICOL_WHITE 2 +#define SICOL_ONES 4 +#define SICOL_ZEROES 5 + +/* Set Character Cell */ +#define OCODE_GSCC 0x33 /* Set character cell */ +#define OCODE_GPSCC 0x03 /* Push and set char cell */ + +typedef struct _ORDERS_GSCC { /* osgscc */ + SHORT cxInt; + SHORT cyInt; + USHORT cxFract; + USHORT cyFract; + UCHAR fbFlags; + UCHAR uchReserved; +} ORDERS_GSCC; + +typedef struct _ORDERL_GSCC { /* olgscc */ + LONG cxInt; + LONG cyInt; + USHORT cxFract; + USHORT cyFract; + UCHAR fbFlags; + UCHAR uchReserved; +} ORDERL_GSCC; + +#define GSCC_ZERODEF 0x00 +#define GSCC_ZEROZERO 0x80 + +/* Set Marker Cell */ +#define OCODE_GSMC 0x37 /* Set marker cell */ +#define OCODE_GPSMC 0x77 /* Push and set marker cell */ + +typedef struct _ORDERS_GSMC { /* osgsmc */ + SHORT cx; + SHORT cy; + UCHAR fbFlags; + UCHAR uchReserved; +} ORDERS_GSMC; + +typedef struct _ORDERL_GSMC { /* olgsmc */ + LONG cx; + LONG cy; + UCHAR fbFlags; + UCHAR uchReserved; +} ORDERL_GSMC; + +#define GSMC_ZERODEF 0x00 +#define GSMC_ZEROZERO 0x80 + +/* Set Pattern Reference Point */ +#define OCODE_GSPRP 0xA0 /* Set pattern ref point */ +#define OCODE_GPSPRP 0xE0 /* Push and set patt ref pt */ + +typedef struct _ORDERS_GSPRP { /* osgsprp */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTS ptPos; +} ORDERS_GSPRP; + +typedef struct _ORDERL_GSPRP { /* olgsprp */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTL ptPos; +} ORDERL_GSPRP; + +#define GSPRP_DEFAULT 0x80 +#define GSPRP_SPECIFY 0x00 + + +/* Set Individual Attribute */ +#define OCODE_GSIA 0x14 /* Set individual attribute */ +#define OCODE_GPSIA 0x54 /* Push and set ind attr */ + +#define GSIA_VL 3 +typedef struct _ORDER_GSIA { /* ogsia */ + UCHAR uchAttrType; + UCHAR uchPrimType; + UCHAR fbFlags; + UCHAR auchValue[GSIA_VL]; +} ORDER_GSIA; + +#define GSIA_COLOR 0x01 +#define GSIA_BCOLOR 0x02 +#define GSIA_MIX 0x03 +#define GSIA_BMIX 0x04 +#define GSIA_LINE 0x01 +#define GSIA_CHAR 0x02 +#define GSIA_MARKER 0x03 +#define GSIA_PATTERN 0x04 +#define GSIA_IMAGE 0x05 +#define GSIA_SPECIFY 0x00 +#define GSIA_SPECIAL 0x40 +#define GSIA_DEFAULT 0x80 +#define GSIA_BLACK 1 +#define GSIA_WHITE 2 +#define GSIA_ONES 4 +#define GSIA_ZEROES 5 + + +/* Set Model /Viewing Transform */ +#define OCODE_GSTM 0x24 /* Set model transform */ +#define OCODE_GPSTM 0x64 /* Push and set model tfm */ + +#define OCODE_GSTV 0x31 /* Set Viewing Transform */ + +#define GSTM_ML 16 +typedef struct _ORDERS_GSTM { /* osgstm */ + UCHAR uchReserved; + UCHAR fbFlags; + USHORT fsMask; + SHORT asMatrix[GSTM_ML]; +} ORDERS_GSTM; + +typedef struct _ORDERL_GSTM { /* olgstm */ + UCHAR uchReserved; + UCHAR fbFlags; + USHORT fsMask; + LONG alMatrix[GSTM_ML]; +} ORDERL_GSTM; + +#define GSTM_M11 0x8000 +#define GSTM_M12 0x4000 +#define GSTM_M13 0x2000 +#define GSTM_M14 0x1000 +#define GSTM_M21 0x0800 +#define GSTM_M22 0x0400 +#define GSTM_M23 0x0200 +#define GSTM_M24 0x0100 +#define GSTM_M31 0x0080 +#define GSTM_M32 0x0040 +#define GSTM_M33 0x0020 +#define GSTM_M34 0x0010 +#define GSTM_M41 0x0008 +#define GSTM_M42 0x0004 +#define GSTM_M43 0x0002 +#define GSTM_M44 0x0001 + +#define GSTM_UNITY 0x00 +#define GSTM_AFTER 0x01 +#define GSTM_BEFORE 0x02 +#define GSTM_OVERWRITE 0x03 + +#define GSTV_OVERWRITE 0x00 +#define GSTV_AFTER 0x04 + +/* Set Segment Boundary, Viewing Window */ + +#define OCODE_GSSB 0x32 /* Set segment boundary */ +#define OCODE_GSVW 0x27 /* Set viewing window */ +#define OCODE_GPSVW 0x67 /* Push and set view window */ + +#define GSSB_ML 4 +typedef struct _ORDERS_GSSB { /* osgssb */ + UCHAR fbFlags; + UCHAR fbMask; + SHORT alMatrix[GSSB_ML]; +} ORDERS_GSSB; + +typedef struct _ORDERL_GSSB { /* olgssb */ + UCHAR fbFLags; + UCHAR fbMask; + LONG alMatrix[GSSB_ML]; +} ORDERL_GSSB; + +#define GSSB_XLEFT 0x20 +#define GSSB_XRIGHT 0x10 +#define GSSB_YBOTTOM 0x08 +#define GSSB_YTOP 0x04 + +#define GSVW_INTERSECT 0x00 +#define GSVW_REPLACE 0x80 + +/* Set Segment Characteristics */ +#define OCODE_GSGCH 0x04 /* Set segment characteristics */ + +#define GSGCH_ML 254 +typedef struct _ORDER_GSGCH { /* ogsgch */ + UCHAR uchIdent; + UCHAR auchData[GSGCH_ML]; +} ORDER_GSGCH; + +/* Set Stroke Line Width */ +#define OCODE_GSSLW 0x15 /* Set stroke line width */ +#define OCODE_GPSSLW 0x55 /* Push and set strk l width */ + +typedef struct _ORDERS_GSSLW { /* osgsslw */ + UCHAR fbFlags; + UCHAR uchReserved; + SHORT LineWidth; +} ORDERS_GSSLW; + +typedef struct _ORDERL_GSSLW { /* olgsslw */ + UCHAR fbFlags; + UCHAR uchReserved; + LONG LineWidth; +} ORDERL_GSSLW; + +#define GSSLW_DEFAULT 0x80 +#define GSSLW_SPECIFY 0x00 + +/* Sharp Fillet at Current Position */ +#define OCODE_GCSFLT 0xA4 /* Sharp fillet at curr pos */ +#define OCODE_GSFLT 0xE4 /* Sharp fillet at given pos */ + +#define GCSFLT_SMF 21 +#define GSFLT_SMF 20 + +typedef struct _ORDERS_GCSFLT { /* osgcsflt */ + POINTS apt[2*GCSFLT_SMF]; + FIXED afxSharpness[GCSFLT_SMF]; +} ORDERS_GCSFLT; + +#define GCSFLT_LMF 12 +#define GSFLT_LMF 12 + +typedef struct _ORDERL_GCSFLT { /* olgcsflt */ + POINTL apt[2*GCSFLT_SMF]; + FIXED afxSharpness[GCSFLT_SMF]; +} ORDERL_GCSFLT; + +/* Bitblt */ +#define OCODE_GBBLT 0xD6 /* Bitblt */ + +typedef struct _ORDERS_GBBLT { /* osgbblt */ + USHORT fsFlags; + USHORT usMix; + HBITMAP hbmSrc; + LONG lOptions; + RECT1S rcsTargetRect; + RECTL rclSourceRect; +} ORDERS_GBBLT; + +typedef struct _ORDERL_GBBLT { /* olgbblt */ + USHORT fsFlags; + USHORT usMix; + HBITMAP hbmSrc; + LONG lOptions; + RECTL rclTargetRect; + RECTL rclSourceRect; +} ORDERL_GBBLT; + +/* Escape */ +#define OCODE_GESCP 0xD5 /* Escape */ + +/* + * type describes type of escape order, identifier gives the escape + * order if the type is registered + */ +#define GESCP_ML 253 +typedef struct _ORDER_GESCP { /* ogescp */ + UCHAR uchType; + UCHAR uchIdent; + UCHAR auchData[GESCP_ML]; /* Escape data */ +} ORDER_GESCP; + +#define GESCP_REG 0x80 /* identifier is registered */ + +/* Escape (Bitblt) */ +#define GEBB_REGID 0x02 /* uchIdent - Bitblt */ + +#define ETYPE_GEBB 0x800200D5L + +#define GEBB_LMP 29 +typedef struct _ORDERL_GEBB { /* olgebb */ + UCHAR fbFlags; + USHORT usMix; + UCHAR cPoints; + HBITMAP hbmSrc; + LONG lReserved; + LONG lOptions; + POINTL aptPoints[GEBB_LMP]; +} ORDERL_GEBB; + +/* Escape (Set Pel) */ +#define GEPEL_REGID 0x01 /* uchIdent - Set Pel */ + +#define ETYPE_GEPEL 0x800100D5L + +/* Element Types for attribute bundles */ +#define ETYPE_LINEBUNDLE 0x0000FD01L +#define ETYPE_CHARBUNDLE 0x0000FD02L +#define ETYPE_MARKERBUNDLE 0x0000FD03L +#define ETYPE_AREABUNDLE 0x0000FD04L +#define ETYPE_IMAGEBUNDLE 0x0000FD05L + +/***************************************************************************\ +* +* Very long orders +* +\***************************************************************************/ + +/* macro to tell whether this is a very long order */ +#define VLONG_ORDER(oc) ((oc)==OCODE_VLONG) + +/* Very long order structure */ +#define VORDER_ML 65531 +typedef struct _VORDER { /* vord */ + UCHAR idCode; + UCHAR uchQualifier; + SWPUSHORT uchLength; + UCHAR uchData[VORDER_ML]; +} VORDER; + +/* Character String Extended */ +#define OCODEQ_GCCHSTE 0xB0 /* Qualifier - current posn */ +#define OCODEQ_GCHSTE 0xF0 /* Qualifier - given position */ + +#define ETYPE_GCCHSTE 0x0000FEB0L +#define ETYPE_GCHSTE 0x0000FEF0L + +typedef struct _ORDERS_GCCHSTE { /* osgcchste */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTS ptRect[2]; + SWPUSHORT cchString; + CHAR achString[1]; + SHORT adx[1]; +} ORDERS_GCCHSTE; + +typedef struct _ORDERL_GCCHSTE { /* olgcchste */ + UCHAR fbFlags; + UCHAR uchReserved; + POINTL ptRect[2]; + SWPUSHORT cchString; + CHAR achString[1]; + LONG adx[1]; +} ORDERL_GCCHSTE; + +#define GCCHSTE_DRAWRECT 0x80 +#define GCCHSTE_NORECT 0x00 +#define GCCHSTE_CLIP 0x40 +#define GCCHSTE_NOCLIP 0x00 +#define GCCHSTE_DEEMPHASIZE 0x20 +#define GCCHSTE_NODEEMPHASIZE 0x00 +#define GCCHSTE_LEAVEPOS 0x10 +#define GCCHSTE_MOVEPOS 0x00 + +/* Extended Escape */ +#define OCODEQ_GEESCP 0xD5 /* Qualifier - extended escape */ + +#define GEESCP_ML 65533 +typedef struct _ORDER_GEESCP { /* ogeescp */ + UCHAR uchType; + UCHAR uchIdent; + UCHAR auchData[GEESCP_ML]; +} ORDER_GEESCP; diff --git a/private/oleauto/tools/win16/os2/inc/pmpic.h b/private/oleauto/tools/win16/os2/inc/pmpic.h new file mode 100644 index 000000000..dd7650d10 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmpic.h @@ -0,0 +1,24 @@ +/***************************************************************************\ +* +* Module Name: PMPIC.H +* +* OS/2 Presentation Manager Picture function declarations +* +* Copyright (c) International Business Machines Corporation 1989 +* Copyright (c) Microsoft Corporation 1989 +* +\***************************************************************************/ + +/* type of picture to print */ + +#define PIP_MF 1L +#define PIP_PIF 2L + +BOOL APIENTRY PicPrint(HAB hab, PSZ pszFilename, LONG lType, PSZ pszParams); + +/* type of conversion required */ + +#define PIC_PIFTOMET 0L +#define PIC_SSTOFONT 2L + +BOOL APIENTRY PicIchg(HAB hab, PSZ pszFilename1, PSZ pszFilename2, LONG lType); diff --git a/private/oleauto/tools/win16/os2/inc/pmsei.h b/private/oleauto/tools/win16/os2/inc/pmsei.h new file mode 100644 index 000000000..17c38e311 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmsei.h @@ -0,0 +1,44 @@ +/***************************************************************************\ +* +* Module Name: PMSEI.H +* +* OS/2 Presentation Manager SetErrorInfo constants and function declaration +* +* This is included from PMWIN.H when appropriate INCL symbols are defined +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ======================================================================= + +/* SetErrorInfo API */ + +/* XLATOFF */ +#define WinSetErrorInfo WINSETERRORINFO +/* XLATON */ +ERRORID cdecl FAR WINSETERRORINFO(ERRORID, USHORT, ...); + +#define SEI_BREAKPOINT 0x8000 /* Always enter an INT 3 breakpt */ +#define SEI_NOBEEP 0x4000 /* Do not call DosBeep */ +#define SEI_NOPROMPT 0x2000 /* Do not prompt the user */ +#define SEI_DBGRSRVD 0x1000 /* Reserved for debug use */ +#define SEI_DEBUGONLY (SEI_BREAKPOINT | SEI_NOBEEP | SEI_NOPROMPT | SEI_RESERVED) + +#define SEI_STACKTRACE 0x0001 /* save the stack trace */ +#define SEI_REGISTERS 0x0002 /* save the registers */ +#define SEI_ARGCOUNT 0x0004 /* first USHORT in args is arg count */ +#define SEI_DOSERROR 0x0008 /* first USHORT in args is OS2 error code */ +#define SEI_MSGSTR 0x0010 /* first PSZ in arg -> msg string */ +#define SEI_RESERVED 0x0FE0 /* Reserved for future use */ + +/* Note that when SEI_ARGCOUNT, SEI_DOSERROR and DOS_MSGSTR are specified */ +/* together, then the implied order of the parameters is: */ +/* */ +/* */ +/* WinSetErrorInfo( MAKEERRORID( .... ), */ +/* SEI_ARGCOUNT | SEI_DOSERROR | SEI_MSGSTR, */ +/* argCount, */ +/* dosErrorCode, */ +/* "This is the error msg string: %s\n", */ +/* "This is an insert for the %s format specifier" ); */ +/* */ diff --git a/private/oleauto/tools/win16/os2/inc/pmshl.h b/private/oleauto/tools/win16/os2/inc/pmshl.h new file mode 100644 index 000000000..4821edb4e --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmshl.h @@ -0,0 +1,402 @@ +/******************************************************************************\ +* +* Module Name: PMSHL.H +* +* OS/2 Presentation Manager Shell constants, types, messages and +* function declarations +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ============================================================================= +* +* The following symbols are used in this file for conditional sections. +* +* INCL_WINSHELLDATA Include Presentation Manager profile calls +* INCL_SHLERRORS defined if INCL_ERRORS is defined +* INCL_WINSWITCHLIST Include Switch List Calls +* INCL_WINPROGRAMLIST Include Program List Calls +* +\******************************************************************************/ + + +/* common types, constants and function declarations */ + +/* maximum title length */ +#define MAXNAMEL 60 + +/* window size structure */ +typedef struct _XYWINSIZE { /* xywin */ + SHORT x; + SHORT y; + SHORT cx; + SHORT cy; + USHORT fsWindow; +} XYWINSIZE; +typedef XYWINSIZE FAR *PXYWINSIZE; + +/* Definitions for fsWindow */ +#define XYF_NOAUTOCLOSE 0x0008 +#define XYF_MINIMIZED 0x0004 /* D23914 */ +#define XYF_MAXIMIZED 0x0002 /* D23914 */ +#define XYF_INVISIBLE 0x0001 +#define XYF_NORMAL 0X0000 + +/* program handle */ +typedef LHANDLE HPROGRAM; /* hprog */ +typedef HPROGRAM FAR * PHPROGRAM; + +/* ini file handle */ +typedef LHANDLE HINI; /* hini */ +typedef HINI FAR * PHINI; + + +#define HINI_PROFILE (HINI) NULL +#define HINI_USERPROFILE (HINI) -1L +#define HINI_SYSTEMPROFILE (HINI) -2L + +#define HINI_USER HINI_USERPROFILE +#define HINI_SYSTEM HINI_SYSTEMPROFILE + + +typedef struct _PRFPROFILE { /* prfpro */ + ULONG cchUserName; + PSZ pszUserName; + ULONG cchSysName; + PSZ pszSysName; +} PRFPROFILE; + +typedef PRFPROFILE FAR *PPRFPROFILE; + +#ifdef INCL_WINPROGRAMLIST +/* maximum path length */ +#define MAXPATHL 128 + +/* root group handle */ +#define SGH_ROOT (HPROGRAM) -1L + +typedef struct _HPROGARRAY { /* hpga */ + HPROGRAM ahprog[1]; +} HPROGARRAY; +typedef HPROGARRAY FAR *PHPROGARRAY; + +typedef CHAR PROGCATEGORY; /* progc */ +typedef PROGCATEGORY FAR *PPROGCATEGORY; + +/* values acceptable for PROGCATEGORY for PM groups */ +#define PROG_DEFAULT (PROGCATEGORY)0 +#define PROG_FULLSCREEN (PROGCATEGORY)1 +#define PROG_WINDOWABLEVIO (PROGCATEGORY)2 +#define PROG_PM (PROGCATEGORY)3 +#define PROG_GROUP (PROGCATEGORY)5 +#define PROG_REAL (PROGCATEGORY)4 /* was 7 */ +#define PROG_DLL (PROGCATEGORY)6 +#define PROG_RESERVED (PROGCATEGORY)255 + +/* visibility flag for PROGTYPE structure */ +#define SHE_VISIBLE (BYTE)0x00 +#define SHE_INVISIBLE (BYTE)0x01 +#define SHE_RESERVED (BYTE)0xFF + +/* Protected group flag for PROGTYPE structure */ +#define SHE_UNPROTECTED (BYTE)0x00 +#define SHE_PROTECTED (BYTE)0x02 + +typedef struct _PROGTYPE { /* progt */ + PROGCATEGORY progc; + UCHAR fbVisible; +} PROGTYPE; +typedef PROGTYPE FAR *PPROGTYPE; + +typedef struct _PROGRAMENTRY { /* proge */ + HPROGRAM hprog; + PROGTYPE progt; + CHAR szTitle[MAXNAMEL+1]; +} PROGRAMENTRY; +typedef PROGRAMENTRY FAR *PPROGRAMENTRY; + +typedef struct _PIBSTRUCT { /* pib */ + PROGTYPE progt; + CHAR szTitle[MAXNAMEL+1]; + CHAR szIconFileName[MAXPATHL+1]; + CHAR szExecutable[MAXPATHL+1]; + CHAR szStartupDir[MAXPATHL+1]; + XYWINSIZE xywinInitial; + USHORT res1; + LHANDLE res2; + USHORT cchEnvironmentVars; + PCH pchEnvironmentVars; + USHORT cchProgramParameter; + PCH pchProgramParameter; +} PIBSTRUCT; +typedef PIBSTRUCT FAR *PPIBSTRUCT; + +/******************************************************************************/ +/* */ +/* Structures associated with 'Prf' calls */ +/* */ +/******************************************************************************/ + +typedef struct _PROGDETAILS { /* progde */ + ULONG Length; /* set this to sizeof(PROGDETAILS) */ + PROGTYPE progt; + USHORT pad1[3]; /* ready for 32-bit PROGTYPE */ + PSZ pszTitle; /* any of the pointers can be NULL */ + PSZ pszExecutable; + PSZ pszParameters; + PSZ pszStartupDir; + PSZ pszIcon; + PSZ pszEnvironment; /* this is terminated by /0/0 */ + SWP swpInitial; /* this replaces XYWINSIZE */ + USHORT pad2[5]; /* ready for 32-bit SWP */ +} PROGDETAILS; + +typedef PROGDETAILS FAR *PPROGDETAILS; + +typedef struct _PROGTITLE { /* progti */ + HPROGRAM hprog; + PROGTYPE progt; + USHORT pad1[3]; /* padding ready for 32-bit PROGTYPE */ + PSZ pszTitle; +} PROGTITLE; + +typedef PROGTITLE FAR *PPROGTITLE; + +typedef struct _QFEOUTBLK { /* qfeout */ + USHORT Total; + USHORT Count; + HPROGRAM ProgramArr[1]; +} QFEOUTBLK; +typedef QFEOUTBLK far *PQFEOUTBLK; + +/* Program List API Function Definitions */ + +/*** Program Use */ + +BOOL APIENTRY WinQueryProgramTitles(HAB hab, HPROGRAM hprogGroup + , PPROGRAMENTRY aprogeBuffer + , USHORT usBufferLen, PUSHORT pusTotal); + +/*** Single Program Manipulation */ +HPROGRAM APIENTRY WinAddProgram(HAB hab, PPIBSTRUCT ppibProgramInfo + , HPROGRAM hprogGroupHandle); + +USHORT APIENTRY WinQueryDefinition(HAB hab, HPROGRAM hprogProgHandle + , PPIBSTRUCT ppibProgramInfo + , USHORT usMaxLength); + +/*** Group Manipulation */ +HPROGRAM APIENTRY WinCreateGroup(HAB hab, PSZ pszTitle , UCHAR ucVisibility + , ULONG flres1, ULONG flres2); +/******************************************************************************/ +/* */ +/* Program List API available 'Prf' calls */ +/* */ +/******************************************************************************/ + +ULONG APIENTRY PrfQueryProgramTitles(HINI hini, HPROGRAM hprogGroup + , PPROGTITLE pTitles, ULONG cchBufferMax, PULONG pulCount); + +/*****************************************************************************/ +/* */ +/* NOTE: string information is concatanated after the array of PROGTITLE */ +/* structures so you need to allocate storage greater than */ +/* sizeof(PROGTITLE)*cPrograms to query programs in a group */ +/* */ +/* PrfQueryProgramTitles recommended usage to obtain titles of all progams */ +/* in a group (Hgroup=SGH_ROOT is for all groups): */ +/* */ +/* BufLen = PrfQueryProgramTitles( Hini, Hgroup */ +/* , (PPROGTITLE)NULL, 0, &Count); */ +/* */ +/* Alocate buffer of Buflen */ +/* */ +/* Len = PrfQueryProgramTitles( Hini, Hgroup, (PPROGTITLE)pBuffer, BufLen */ +/* , pCount); */ +/* */ +/*****************************************************************************/ + +HPROGRAM APIENTRY PrfAddProgram + (HINI hini, PPROGDETAILS pDetails, HPROGRAM hprogGroup); +BOOL APIENTRY PrfChangeProgram + (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails); + +/***************************************************************************/ +/* when adding/changing programs the PROGDETAILS Length field should be */ +/* set to sizeof(PROGDETAILS) */ +/***************************************************************************/ + +ULONG APIENTRY PrfQueryDefinition + (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails, ULONG cchBufferMax); + +/*****************************************************************************/ +/* */ +/* NOTE: string information is concatanated after the PROGDETAILS field */ +/* structure so you need to allocate storage greater than */ +/* sizeof(PROGDETAILS) to query programs */ +/* */ +/* PrfQueryDefinition recomended usage: */ +/* */ +/* bufferlen = PrfQueryDefinition( Hini, Hprog, (PPROGDETAILS)NULL, 0) */ +/* */ +/* Alocate buffer of bufferlen bytes */ +/* set Length field (0 will be supported) */ +/* */ +/* (PPROGDETAILS)pBuffer->Length=sizeof(PPROGDETAILS) */ +/* */ +/* len = PrfQueryDefinition(Hini, Hprog, (PPROGDETAILS)pBuffer, bufferlen) */ +/* */ +/*****************************************************************************/ + +BOOL APIENTRY PrfRemoveProgram(HINI hini,HPROGRAM hprog); +ULONG APIENTRY PrfQueryProgramHandle (HINI hini,PSZ pszExe + ,PHPROGARRAY phprogArray, ULONG cchBufferMax,PULONG pulCount); +HPROGRAM APIENTRY PrfCreateGroup + (HINI hini, PSZ pszTitle, UCHAR chVisibility); +BOOL APIENTRY PrfDestroyGroup(HINI hini,HPROGRAM hprogGroup); +PROGCATEGORY APIENTRY PrfQueryProgramCategory(HINI hini, PSZ pszExe); + +#endif /* INCL_WINPROGRAMLIST */ + +#if (defined(INCL_WINSWITCHLIST) || !defined(INCL_NOCOMMON)) + +typedef LHANDLE HSWITCH; /* hsw */ +typedef HSWITCH FAR *PHSWITCH; + +/* visibility flag for SWCNTRL structure */ +#define SWL_VISIBLE (BYTE)0x04 +#define SWL_INVISIBLE (BYTE)0x01 +#define SWL_GRAYED (BYTE)0x02 + +/* visibility flag for SWCNTRL structure */ +#define SWL_JUMPABLE (BYTE)0x02 +#define SWL_NOTJUMPABLE (BYTE)0x01 + +typedef struct _SWCNTRL { /* swctl */ + HWND hwnd; + HWND hwndIcon; + HPROGRAM hprog; + USHORT idProcess; + USHORT idSession; + UCHAR uchVisibility; + UCHAR fbJump; + CHAR szSwtitle[MAXNAMEL+1]; + BYTE fReserved; /* To align on word boundary */ +} SWCNTRL; +typedef SWCNTRL FAR *PSWCNTRL; + +/*** Switching Program functions */ +HSWITCH EXPENTRY WinAddSwitchEntry( PSWCNTRL ); +USHORT EXPENTRY WinRemoveSwitchEntry( HSWITCH ); + +#endif /* not INCL_NOCOMMON */ + +#ifdef INCL_WINSWITCHLIST + +typedef struct _SWENTRY { /* swent */ + HSWITCH hswitch; + SWCNTRL swctl; +} SWENTRY; +typedef SWENTRY FAR *PSWENTRY; + +typedef struct _SWBLOCK { /* swblk */ + USHORT cswentry; + SWENTRY aswentry[1]; +} SWBLOCK; +typedef SWBLOCK FAR *PSWBLOCK; + +USHORT EXPENTRY WinChangeSwitchEntry( HSWITCH hswitchSwitch + , PSWCNTRL pswctlSwitchData); +HSWITCH EXPENTRY WinCreateSwitchEntry( HAB, PSWCNTRL ); +USHORT EXPENTRY WinQuerySessionTitle( HAB hab, USHORT usSession + , PSZ pszTitle, USHORT usTitlelen); +USHORT EXPENTRY WinQuerySwitchEntry( HSWITCH hswitchSwitch + , PSWCNTRL pswctlSwitchData); +HSWITCH EXPENTRY WinQuerySwitchHandle( HWND hwnd, PID usProcess); +USHORT EXPENTRY WinQuerySwitchList( HAB hab, PSWBLOCK pswblkSwitchEntries + , USHORT usDataLength); +USHORT EXPENTRY WinQueryTaskSizePos( HAB hab, USHORT usScreenGroup + , PSWP pswpPositionData); +USHORT EXPENTRY WinQueryTaskTitle( USHORT usSession, PSZ pszTitle + , USHORT usTitlelen); +USHORT EXPENTRY WinSwitchToProgram( HSWITCH hswitchSwHandle); + +#endif + +/* if error definitions are required then allow Shell errors */ +#ifdef INCL_ERRORS + #define INCL_SHLERRORS +#endif /* INCL_ERRORS */ + +#ifdef INCL_WINSHELLDATA + + +/*** OS2.INI Access functions */ +SHORT APIENTRY WinQueryProfileInt( HAB hab, PSZ pszAppName + , PSZ pszKeyName, SHORT sDefault); +USHORT APIENTRY WinQueryProfileString( HAB hab, PSZ pszAppName, PSZ pszKeyName + , PSZ pszDefault, PVOID pProfileString + , USHORT usMaxPstring); +BOOL APIENTRY WinWriteProfileString( HAB hab, PSZ pszAppName, PSZ pszKeyName + , PSZ pszValue); +USHORT APIENTRY WinQueryProfileSize( HAB hab, PSZ pszAppName, PSZ pszKeyName + , PUSHORT pusValue); +BOOL APIENTRY WinQueryProfileData( HAB hab, PSZ pszAppName, PSZ pszKeyName + , PVOID pValue, PUSHORT pusSize); +BOOL APIENTRY WinWriteProfileData( HAB hab, PSZ pszAppName, PSZ pszKeyName + , PVOID pValue, USHORT usSize); + +/******************************************************************************/ +/* */ +/* INI file access API available calls 'Prf' */ +/* */ +/******************************************************************************/ + +SHORT APIENTRY PrfQueryProfileInt(HINI hini,PSZ pszApp,PSZ pszKey + ,SHORT sDefault); +ULONG APIENTRY PrfQueryProfileString(HINI hini,PSZ pszApp, PSZ pszKey + ,PSZ pszDefault, PVOID pBuffer, ULONG cchBufferMax); +BOOL APIENTRY PrfWriteProfileString + (HINI hini,PSZ pszApp, PSZ pszKey , PSZ pszData); +BOOL APIENTRY PrfQueryProfileSize + (HINI hini,PSZ pszApp, PSZ pszKey ,PULONG pulReqLen); +BOOL APIENTRY PrfQueryProfileData + (HINI hini, PSZ pszApp, PSZ pszKey, PVOID pBuffer, PULONG pulBuffLen); + +BOOL APIENTRY PrfWriteProfileData + (HINI hini, PSZ pszApp,PSZ pszKey,PVOID pData, ULONG cchDataLen); + +HINI APIENTRY PrfOpenProfile(HAB hab, PSZ pszFileName); +BOOL APIENTRY PrfCloseProfile(HINI hini); +BOOL APIENTRY PrfReset(HAB hab, PPRFPROFILE pPrfProfile); +BOOL APIENTRY PrfQueryProfile(HAB hab, PPRFPROFILE pPrfProfile); + +/* new public message, broadcast on WinReset */ +#define PL_ALTERED 0x008E /* WM_SHELLFIRST + 0E */ + + +#endif /* INCL_WINSHELLDATA */ + +#ifdef INCL_SHLERRORS + +#include <pmerr.h> + +#endif /* INCL_SHLERRORS */ + +typedef LHANDLE HAPP; + +HAPP EXPENTRY WinInstStartApp( HINI hini, HWND hwndNotifyWindow, + USHORT cCount, PSZ far * aszApplication, + PSZ pszCmdLine, PVOID pData, USHORT fsOptions ); + +BOOL EXPENTRY WinTerminateApp( HAPP happ ); + +/* bit values for Options parameter of WinInstStartAppl */ +#define SAF_VALIDFLAGS 0x001F + +#define SAF_INSTALLEDCMDLINE 0x0001 /* use installed parameters */ +#define SAF_STARTCHILDAPP 0x0002 /* related application */ +#define SAF_MAXIMIZED 0x0004 /* Start App maximized */ +#define SAF_MINIMIZED 0x0008 /* Start App minimized, if !SAF_MAXIMIZED */ +#define SAF_BACKGROUND 0x0010 /* Start app in the background */ + diff --git a/private/oleauto/tools/win16/os2/inc/pmspl.h b/private/oleauto/tools/win16/os2/inc/pmspl.h new file mode 100644 index 000000000..728b79fe6 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmspl.h @@ -0,0 +1,647 @@ +/***************************************************************************\ +* +* Module Name: PMSPL.H +* +* OS/2 Presentation Manager Spooler constants, types and function declarations +* +* Copyright(c) IBM Corporation 1987-1990 +* Copyright(c) Microsoft Corp., 1987-1990 +* +* ============================================================================= +* +* The following symbols are used in this file for conditional sections. +* +* INCL_SPLERRORS - defined if INCL_ERRORS defined +* INCL_SPLFSE - file system emulation calls +* +\***************************************************************************/ + +/* if error definitions are required then allow Spooler errors */ +#ifdef INCL_ERRORS + #define INCL_SPLERRORS +#endif /* INCL_ERRORS */ + +/* Names of various OS2SYS.INI spooler variables */ + +#define SPL_INI_SPOOLER "PM_SPOOLER" +#define SPL_INI_QUEUE "PM_SPOOLER_QUEUE" +#define SPL_INI_PRINTER "PM_SPOOLER_PRINTER" +#define SPL_INI_PRINTERDESCR "PM_SPOOLER_PRINTER_DESCR" +#define SPL_INI_QUEUEDESCR "PM_SPOOLER_QUEUE_DESCR" +#define SPL_INI_QUEUEDD "PM_SPOOLER_QUEUE_DD" +#define SPL_INI_QUEUEDDDATA "PM_SPOOLER_QUEUE_DDDATA" + +/* General SPL return values */ +#define SPL_ERROR 0L +#define SPL_OK 1L + +/* handle to a spool file */ +typedef LHANDLE HSPL; /* hspl */ +/* Used in recording of PM_Q_STD data via SplStdxxx calls */ +typedef LHANDLE HSTD; /* hstd */ +typedef HSTD far *PHSTD; +/* spooler manager open data */ +typedef PSZ FAR *PQMOPENDATA; /* pqmdop */ + +/*** Spooler Queue manager Interface */ +HSPL EXPENTRY SplQmOpen( PSZ, LONG, PQMOPENDATA ); +BOOL EXPENTRY SplQmStartDoc( HSPL, PSZ ); +BOOL EXPENTRY SplQmWrite( HSPL, LONG, PBYTE ); +BOOL EXPENTRY SplQmEndDoc( HSPL ); +BOOL EXPENTRY SplQmClose( HSPL ); +BOOL EXPENTRY SplQmAbort( HSPL ); +BOOL EXPENTRY SplQmAbortDoc( HSPL ); + +#ifdef INCL_SPLFSE +/*** Direct Device File System Interface */ + +USHORT EXPENTRY PrtOpen( PSZ, PUSHORT, PUSHORT, ULONG, + USHORT, USHORT, USHORT, ULONG ); +USHORT EXPENTRY PrtClose( HFILE ); +USHORT EXPENTRY PrtWrite( HFILE, PCH, USHORT, PUSHORT ); +USHORT EXPENTRY PrtDevIOCtl( PVOID, PVOID, USHORT, USHORT, HFILE ); +void EXPENTRY PrtAbort ( HFILE hFile ); +#endif /* include File System Emulation functions */ + +/*** Spooler Queue Processor interface */ + +BOOL EXPENTRY SplQpQueryDt( PLONG, PSZ FAR * ); +BOOL EXPENTRY SplQpInstall( HWND ); + +/* Style for SplMessageBox */ +/* Same as for WinMsgBox see PMWIN.H for details */ + +/*** Spooler message interface */ +USHORT EXPENTRY SplMessageBox( PSZ, USHORT, USHORT, + PSZ, PSZ, USHORT, USHORT ); + +/*** PM_Q_STD datatype functions */ +BOOL EXPENTRY SplStdOpen( HDC ); +BOOL EXPENTRY SplStdClose( HDC ); +BOOL EXPENTRY SplStdStart( HDC ); +HSTD EXPENTRY SplStdStop( HDC ); +BOOL EXPENTRY SplStdDelete( HSTD ); +BOOL EXPENTRY SplStdGetBits( HSTD, LONG, LONG, PCH ); +LONG EXPENTRY SplStdQueryLength( HSTD ); + +/* Error information and return codes +** ================================== +*/ +/* Error information for SplMessageBox */ +#define SPLINFO_QPERROR 0x0001 +#define SPLINFO_DDERROR 0x0002 +#define SPLINFO_SPLERROR 0x0004 +#define SPLINFO_OTHERERROR 0x0080 +#define SPLINFO_INFORMATION 0x0100 /* @P3C */ +#define SPLINFO_WARNING 0x0200 /* @P3C */ +#define SPLINFO_ERROR 0x0400 /* @P3C */ +#define SPLINFO_SEVERE 0x0800 /* @P3C */ +#define SPLINFO_USERINTREQD 0x1000 + +/* Error Data for SplMessageBox */ +#define SPLDATA_PRINTERJAM 0x0001 +#define SPLDATA_FORMCHGREQD 0x0002 +#define SPLDATA_CARTCHGREQD 0x0004 +#define SPLDATA_PENCHGREQD 0x0008 +#define SPLDATA_DATAERROR 0x0010 +#define SPLDATA_UNEXPECTERROR 0x0020 +#define SPLDATA_OTHER 0x8000 + +/* return code for SplStdQueryLength */ +#define SSQL_ERROR (-1L) + +#ifdef INCL_SPLERRORS + +#include <pmerr.h> + +#endif /* INCL_SPLERRORS */ + + + + +/* length for character arrays in structures (excluding zero terminator) */ +#define CNLEN 15 /* Computer name length */ +#define UNLEN 20 /* Maximum user name length */ +#define QNLEN 12 /* Queue name maximum length */ +#define PDLEN 8 /* Print destination length */ +#define DTLEN 9 /* Spool file data type */ + /* e.g. PM_Q_STD,PM_Q_RAW */ +#define QP_DATATYPE_SIZE 15 /* returned by SplQpQueryDt */ +#define DRIV_DEVICENAME_SIZE 31 /* see DRIVDATA struc */ +#define DRIV_NAME_SIZE 8 /* name of device driver */ +#define PRINTERNAME_SIZE 32 /* max printer name length */ +#define FORMNAME_SIZE 31 /* max form name length */ +#define MAXCOMMENTSZ 48 /* queue comment length */ + +#define DEFAULT_LM_PROC "LMPRINT" + +/**INTERNAL_ONLY**/ +/* IOctl for DosPrintJobGetId */ +#define SPOOL_LMCAT 83 +#define SPOOL_LMGetPrintId 0x60 + +/**END_INTERNAL**/ + + +typedef unsigned SPLERR; /* err */ + +typedef struct _PRJINFO { /* prj1 */ + USHORT uJobId; + CHAR szUserName[UNLEN+1]; + CHAR pad_1; + CHAR szNotifyName[CNLEN+1]; + CHAR szDataType[DTLEN+1]; + PSZ pszParms; + USHORT uPosition; + USHORT fsStatus; + PSZ pszStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; +} PRJINFO; +typedef PRJINFO far *PPRJINFO; +typedef PRJINFO near *NPPRJINFO; + +typedef struct _PRJINFO2 { /* prj2 */ + USHORT uJobId; + USHORT uPriority; + PSZ pszUserName; + USHORT uPosition; + USHORT fsStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; + PSZ pszDocument; +} PRJINFO2; +typedef PRJINFO2 far *PPRJINFO2; +typedef PRJINFO2 near *NPPRJINFO2; + +typedef struct _PRJINFO3 { /* prj */ + USHORT uJobId; + USHORT uPriority; + PSZ pszUserName; + USHORT uPosition; + USHORT fsStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; + PSZ pszDocument; + PSZ pszNotifyName; + PSZ pszDataType; + PSZ pszParms; + PSZ pszStatus; + PSZ pszQueue; + PSZ pszQProcName; + PSZ pszQProcParms; + PSZ pszDriverName; + PDRIVDATA pDriverData; + PSZ pszPrinterName; +} PRJINFO3; +typedef PRJINFO3 far *PPRJINFO3; +typedef PRJINFO3 near *NPPRJINFO3; + + +typedef struct _PRDINFO { /* prd1 */ + CHAR szName[PDLEN+1]; + CHAR szUserName[UNLEN+1]; + USHORT uJobId; + USHORT fsStatus; + PSZ pszStatus; + USHORT time; +} PRDINFO; +typedef PRDINFO far *PPRDINFO; +typedef PRDINFO near *NPPRDINFO; + + +typedef struct _PRDINFO3 { /* prd */ + PSZ pszPrinterName; + PSZ pszUserName; + PSZ pszLogAddr; + USHORT uJobId; + USHORT fsStatus; + PSZ pszStatus; + PSZ pszComment; + PSZ pszDrivers; + USHORT time; + USHORT usTimeOut; +} PRDINFO3; +typedef PRDINFO3 far *PPRDINFO3; +typedef PRDINFO3 near *NPPRDINFO3; + + +typedef struct _PRQINFO { /* prq1 */ + CHAR szName[QNLEN+1]; + CHAR pad_1; + USHORT uPriority; + USHORT uStartTime; + USHORT uUntilTime; + PSZ pszSepFile; + PSZ pszPrProc; + PSZ pszDestinations; + PSZ pszParms; + PSZ pszComment; + USHORT fsStatus; + USHORT cJobs; +} PRQINFO; +typedef PRQINFO far *PPRQINFO; +typedef PRQINFO near *NPPRQINFO; + + +typedef struct _PRQINFO3 { /* prq */ + PSZ pszName; + USHORT uPriority; + USHORT uStartTime; + USHORT uUntilTime; + USHORT pad1; + PSZ pszSepFile; + PSZ pszPrProc; + PSZ pszParms; + PSZ pszComment; + USHORT fsStatus; + USHORT cJobs; + PSZ pszPrinters; + PSZ pszDriverName; + PDRIVDATA pDriverData; +} PRQINFO3; +typedef PRQINFO3 far *PPRQINFO3; +typedef PRQINFO3 near *NPPRQINFO3; + + +/* + * structure for DosPrintJobGetId + */ +typedef struct _PRIDINFO { /* prjid */ + USHORT uJobId; + CHAR szServer[CNLEN + 1]; + CHAR szQName[QNLEN+1]; + CHAR pad_1; +} PRIDINFO; +typedef PRIDINFO far *PPRIDINFO; +typedef PRIDINFO near *NPPRIDINFO; + +/* + * structure for DosPrintDriverEnum + */ +typedef struct _PRDRIVINFO { /* prdid */ + CHAR szDrivName[DRIV_NAME_SIZE+1+DRIV_DEVICENAME_SIZE+1]; +} PRDRIVINFO; +typedef PRDRIVINFO far *PPRDRIVINFO; +typedef PRDRIVINFO near *NPPRDRIVINFO; + + +/* + * structure for DosPrintQProcessorEnum + */ +typedef struct _PRQPROCINFO { /* prqp */ + CHAR szQProcName[QNLEN+1]; +} PRQPROCINFO; +typedef PRQPROCINFO far *PPRQPROCINFO; +typedef PRQPROCINFO near *NPPRQPROCINFO; + +/* + * structure for DosPrintPortEnum + */ +typedef struct _PRPORTINFO { /* prpo */ + CHAR szPortName[PDLEN+1]; +} PRPORTINFO; +typedef PRPORTINFO far *PPRPORTINFO; +typedef PRPORTINFO near *NPPRPORTINFO; + + +/**************************************************************** + * * + * Function prototypes * + * * + ****************************************************************/ + +SPLERR EXPENTRY DosPrintDestEnum( + PSZ pszServer, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcReturned, + PUSHORT pcTotal + ); + +SPLERR EXPENTRY DosPrintDestControl( + PSZ pszServer, + PSZ pszDevName, + USHORT uControl + ); + +SPLERR EXPENTRY DosPrintDestGetInfo( + PSZ pszServer, + PSZ pszName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcbNeeded + ); + +SPLERR EXPENTRY DosPrintDestAdd( + PSZ pszServer, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf + ); + +SPLERR EXPENTRY DosPrintDestSetInfo( + PSZ pszServer, + PSZ pszName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + USHORT uParmNum + ); + +SPLERR EXPENTRY DosPrintDestDel( + PSZ pszServer, + PSZ pszPrinterName + ); + +SPLERR EXPENTRY DosPrintQEnum( + PSZ pszServer, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcReturned, + PUSHORT pcTotal + ); + +SPLERR EXPENTRY DosPrintQGetInfo( + PSZ pszServer, + PSZ pszQueueName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcbNeeded + ); + +SPLERR EXPENTRY DosPrintQSetInfo( + PSZ pszServer, + PSZ pszQueueName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + USHORT uParmNum + ); + +SPLERR EXPENTRY DosPrintQPause( + PSZ pszServer, + PSZ pszQueueName + ); + +SPLERR EXPENTRY DosPrintQContinue( + PSZ pszServer, + PSZ pszQueueName + ); + +SPLERR EXPENTRY DosPrintQPurge( + PSZ pszServer, + PSZ pszQueueName + ); + +SPLERR EXPENTRY DosPrintQAdd( + PSZ pszServer, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf + ); + +SPLERR EXPENTRY DosPrintQDel( + PSZ pszServer, + PSZ pszQueueName + ); + +SPLERR EXPENTRY DosPrintJobGetInfo( + PSZ pszServer, + USHORT uJobId, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcbNeeded + ); + +SPLERR EXPENTRY DosPrintJobSetInfo( + PSZ pszServer, + USHORT uJobId, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + USHORT uParmNum + ); + +SPLERR EXPENTRY DosPrintJobPause( + PSZ pszServer, + USHORT uJobId + ); + +SPLERR EXPENTRY DosPrintJobContinue( + PSZ pszServer, + USHORT uJobId + ); + +SPLERR EXPENTRY DosPrintJobDel( + PSZ pszServer, + USHORT uJobId + ); + +SPLERR EXPENTRY DosPrintJobEnum( + PSZ pszServer, + PSZ pszQueueName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcReturned, + PUSHORT pcTotal + ); + +SPLERR EXPENTRY DosPrintJobGetId( + HFILE hFile, + PPRIDINFO pInfo, + USHORT cbInfo + ); + +/**INTERNAL_ONLY**/ + +SPLERR EXPENTRY DosPrintJobAdd2( + PSZ pszServer, + PSZ pszQueueName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PSZ pszFileName, + PUSHORT puJobId + ); + +SPLERR EXPENTRY DosPrintJobSchedule( + PSZ pszServer, + USHORT uJobId + ); + +SPLERR APIENTRY CorePrintJobEnum( + PSZ pszServer, + PSZ pszQueueName, + USHORT uLevel, + PBYTE pbBuf, + USHORT cbBuf, + PUSHORT pcReturned, + PUSHORT pcTotal); + +SPLERR EXPENTRY DosPrintDriverEnum( + PSZ pszHostName, + USHORT sLevel, + PBYTE pbBuf, + USHORT usBuflen, + PUSHORT pusRead, + PUSHORT pusTotal + ); + +SPLERR EXPENTRY DosPrintQProcessorEnum( + PSZ pszHostName, + USHORT sLevel, + PBYTE pbBuf, + USHORT usBuflen, + PUSHORT pusRead, + PUSHORT pusTotal + ); + +SPLERR EXPENTRY DosPrintPortEnum( + PSZ pszHostName, + USHORT sLevel, + PBYTE pbBuf, + USHORT usBuflen, + PUSHORT pusRead, + PUSHORT pusTotal + ); + +/**END_INTERNAL**/ + +/* + * Values for parmnum in DosPrintQSetInfo. + */ + +#define PRQ_PRIORITY_PARMNUM 2 +#define PRQ_STARTTIME_PARMNUM 3 +#define PRQ_UNTILTIME_PARMNUM 4 +#define PRQ_SEPARATOR_PARMNUM 5 +#define PRQ_PROCESSOR_PARMNUM 6 +#define PRQ_DESTINATIONS_PARMNUM 7 +#define PRQ_PARMS_PARMNUM 8 +#define PRQ_COMMENT_PARMNUM 9 +#define PRQ_PRINTERS_PARMNUM 12 +#define PRQ_DRIVERNAME_PARMNUM 13 +#define PRQ_DRIVERDATA_PARMNUM 14 +#define PRQ_MAXPARMNUM 14 + +/* + * Print Queue Priority + */ + +#define PRQ_MAX_PRIORITY 1 /* highest priority */ +#define PRQ_DEF_PRIORITY 5 +#define PRQ_MIN_PRIORITY 9 /* lowest priority */ +#define PRQ_NO_PRIORITY 0 + +/* + * Print queue status bitmask and values for level 1 + */ + +#define PRQ_STATUS_MASK 3 +#define PRQ_ACTIVE 0 +#define PRQ_PAUSED 1 +#define PRQ_ERROR 2 +#define PRQ_PENDING 3 + +/* + * Print queue status bits for level 3 + */ + +#define PRQ3_PAUSED 0x1 +#define PRQ3_PENDING 0x2 + +/* + * Values for parmnum in DosPrintJobSetInfo. + */ + +#define PRJ_NOTIFYNAME_PARMNUM 3 +#define PRJ_DATATYPE_PARMNUM 4 +#define PRJ_PARMS_PARMNUM 5 +#define PRJ_POSITION_PARMNUM 6 +#define PRJ_COMMENT_PARMNUM 11 +#define PRJ_DOCUMENT_PARMNUM 12 +#define PRJ_PRIORITY_PARMNUM 14 +#define PRJ_PROCPARMS_PARMNUM 16 +#define PRJ_DRIVERDATA_PARMNUM 18 +#define PRJ_MAXPARMNUM 18 + +/* + * Bitmap masks for status field of PRJINFO. + */ + +/* 2-7 bits also used in device status */ + +#define PRJ_QSTATUS 0x0003 /* Bits 0,1 */ +#define PRJ_DEVSTATUS 0x0ffc /* 2-11 bits */ +#define PRJ_COMPLETE 0x0004 /* Bit 2 */ +#define PRJ_INTERV 0x0008 /* Bit 3 */ +#define PRJ_ERROR 0x0010 /* Bit 4 */ +#define PRJ_DESTOFFLINE 0x0020 /* Bit 5 */ +#define PRJ_DESTPAUSED 0x0040 /* Bit 6 */ +#define PRJ_NOTIFY 0x0080 /* Bit 7 */ +#define PRJ_DESTNOPAPER 0x0100 /* Bit 8 */ +#define PRJ_DESTFORMCHG 0x0200 /* BIT 9 */ +#define PRJ_DESTCRTCHG 0x0400 /* BIT 10 */ +#define PRJ_DESTPENCHG 0x0800 /* BIT 11 */ +#define PRJ_DELETED 0x8000 /* Bit 15 */ + +/* + * Values of PRJ_QSTATUS bits in fsStatus field of PRJINFO. + */ + +#define PRJ_QS_QUEUED 0 +#define PRJ_QS_PAUSED 1 +#define PRJ_QS_SPOOLING 2 +#define PRJ_QS_PRINTING 3 + +/* + * Print Job Priority + */ + +#define PRJ_MAX_PRIORITY 99 /* lowest priority */ +#define PRJ_MIN_PRIORITY 1 /* highest priority */ +#define PRJ_NO_PRIORITY 0 + + +/* + * Bitmap masks for status field of PRDINFO. + * see PRJ_... for bits 2-11 + */ + +#define PRD_STATUS_MASK 0x0003 /* Bits 0,1 */ +#define PRD_DEVSTATUS 0x0ffc /* 2-11 bits */ + +/* + * Values of PRD_STATUS_MASK bits in fsStatus field of PRDINFO. + */ + +#define PRD_ACTIVE 0 +#define PRD_PAUSED 1 + +/* + * Control codes used in DosPrintDestControl. + */ + +#define PRD_DELETE 0 +#define PRD_PAUSE 1 +#define PRD_CONT 2 +#define PRD_RESTART 3 + +/* + * Values for parmnum in DosPrintDestSetInfo. + */ + +#define PRD_LOGADDR_PARMNUM 3 +#define PRD_COMMENT_PARMNUM 7 +#define PRD_DRIVERS_PARMNUM 8 +#define PRD_TIMEOUT_PARMNUM 10 diff --git a/private/oleauto/tools/win16/os2/inc/pmstddlg.h b/private/oleauto/tools/win16/os2/inc/pmstddlg.h new file mode 100644 index 000000000..890239b18 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmstddlg.h @@ -0,0 +1,335 @@ +/**********************************************************************/ +/* */ +/* Module Name: PMSTDDLG.H */ +/* */ +/* OS/2 Presentation Manager Standard Dialog Declarations */ +/* */ +/* ===================================================================*/ +/* The following symbols are used in this file for conditional */ +/* sections: */ +/* */ +/* INCL_WINSTDSPIN - spin button control class */ +/* INCL_WINSTDDRAG - standard drag dll */ +/* */ +/**********************************************************************/ + +#ifdef INCL_WINSTDDLGS /* enable everything */ + #define INCL_WINSTDSPIN + #define INCL_WINSTDDRAG +#endif /* INCL_WINSTDDLGS */ + + +#ifdef INCL_WINSTDSPIN +/**********************************************************************/ +/* */ +/* S P I N B U T T O N */ +/* */ +/**********************************************************************/ + +/**********************************************************************/ +/* SPINBUTTON Creation Flags */ +/**********************************************************************/ + +/**********************************************************************/ +/* Character Acceptance */ +/**********************************************************************/ +#define SPBS_ALLCHARACTERS 0x00000000L /* Default: All chars accepted */ +#define SPBS_NUMERICONLY 0x00000001L /* Only 0 - 9 accepted & VKeys */ +#define SPBS_READONLY 0x00000002L /* No chars allowed in entryfld*/ + +/**********************************************************************/ +/* Type of Component */ +/**********************************************************************/ +#define SPBS_MASTER 0x00000010L +#define SPBS_SERVANT 0x00000000L /* Default: Servant */ + +/**********************************************************************/ +/* Type of Justification */ +/**********************************************************************/ +#define SPBS_JUSTDEFAULT 0x00000000L /* Default: Same as Left */ +#define SPBS_JUSTLEFT 0x00000008L +#define SPBS_JUSTRIGHT 0x00000004L +#define SPBS_JUSTCENTER 0x0000000CL + +/**********************************************************************/ +/* Border or not */ +/**********************************************************************/ +#define SPBS_NOBORDER 0x00000020L /* Borderless SpinField */ + /* Default is to have a border. */ + +/**********************************************************************/ +/* Fast spin or not */ +/**********************************************************************/ +#define SPBS_FASTSPIN 0x00000100L /* Allow fast spinning. Fast */ + /* spinning is performed by */ + /* skipping over numbers */ + +/**********************************************************************/ +/* Pad numbers on front with 0's */ +/**********************************************************************/ +#define SPBS_PADWITHZEROS 0x00000080L /* Pad the number with zeroes */ + +/**********************************************************************/ +/* SPINBUTTON Messages */ +/**********************************************************************/ + +/**********************************************************************/ +/* Notification from Spinbutton to the application is sent in a */ +/* WM_CONTROL message. */ +/**********************************************************************/ +#define SPBN_UPARROW 0x20A /* up arrow button was pressed */ +#define SPBN_DOWNARROW 0x20B /* down arrow button was pressed*/ +#define SPBN_ENDSPIN 0x20C /* mouse button was released */ +#define SPBN_CHANGE 0x20D /* spinfield text has changed */ +#define SPBN_SETFOCUS 0x20E /* spinfield received focus */ +#define SPBN_KILLFOCUS 0x20F /* spinfield lost focus */ + +/**********************************************************************/ +/* Messages from application to Spinbutton */ +/**********************************************************************/ +#define SPBM_OVERRIDESETLIMITS 0x200 /* Set spinbutton limits without*/ + /* resetting the current value */ +#define SPBM_QUERYLIMITS 0x201 /* Query limits set by */ + /* SPBM_SETLIMITS */ +#define SPBM_SETTEXTLIMIT 0x202 /* Max entryfield characters */ +#define SPBM_SPINUP 0x203 /* Tell entry field to spin up */ +#define SPBM_SPINDOWN 0x204 /* Tell entry field to spin down*/ +#define SPBM_QUERYVALUE 0x205 /* Tell entry field to send */ + /* current value */ + +/**********************************************************************/ +/* Query Flags */ +/**********************************************************************/ +#define SPBQ_UPDATEIFVALID 0 /* Default */ +#define SPBQ_ALWAYSUPDATE 1 +#define SPBQ_DONOTUPDATE 3 + +/**********************************************************************/ +/* Return value for Empty Field. */ +/* If ptr too long, variable sent in query msg */ +/**********************************************************************/ +#define SPBM_SETARRAY 0x206 /* Change the data to spin */ +#define SPBM_SETLIMITS 0x207 /* Change the numeric Limits */ +#define SPBM_SETCURRENTVALUE 0x208 /* Change the current value */ +#define SPBM_SETMASTER 0x209 /* Tell entryfield who master is*/ + +/**********************************************************************/ +/* SPINBUTTON Window Class Definition */ +/**********************************************************************/ +#define WC_SPINBUTTON ((PSZ)0xffff0020L) + +#endif /* INCL_WINSTDSPIN */ + + +#ifdef INCL_WINSTDDRAG +/**********************************************************************/ +/* */ +/* D I R E C T M A N I P U L A T I O N */ +/* */ +/**********************************************************************/ + +#define PMERR_NOT_DRAGGING 0x1f00 /* move to pmerr.h */ +#define PMERR_ALREADY_DRAGGING 0x1f01 + +#define MSGF_DRAG 0x0010 /* message filter identifier */ + +#define WM_DRAGFIRST 0x0310 +#define WM_DRAGLAST (WM_DRAGFIRST + 0x001F) + +#define DM_DROP (WM_DRAGLAST - 0x0) +#define DM_DRAGOVER (WM_DRAGLAST - 0x1) +#define DM_DRAGLEAVE (WM_DRAGLAST - 0x2) +#define DM_DROPHELP (WM_DRAGLAST - 0x3) +#define DM_ENDCONVERSATION (WM_DRAGLAST - 0x4) +#define DM_PRINT (WM_DRAGLAST - 0x5) +#define DM_RENDER (WM_DRAGLAST - 0x6) +#define DM_RENDERCOMPLETE (WM_DRAGLAST - 0x7) +#define DM_RENDERPREPARE (WM_DRAGLAST - 0x8) +#define DM_DRAGFILECOMPLETE (WM_DRAGLAST - 0x9) +#define DM_EMPHASIZETARGET (WM_DRAGLAST - 0xA) +#define DM_DRAGERROR (WM_DRAGLAST - 0xB) +#define DM_FILERENDERED (WM_DRAGLAST - 0xC) +#define DM_RENDERFILE (WM_DRAGLAST - 0xD) + +#define DRT_ASM "Assembler Code" /* drag type constants */ +#define DRT_BASIC "BASIC Code" +#define DRT_BINDATA "Binary Data" +#define DRT_BITMAP "Bitmap" +#define DRT_C "C Code" +#define DRT_COBOL "COBOL Code" +#define DRT_DLL "Dynamic Link Library" +#define DRT_DOSCMD "DOS Command File" +#define DRT_EXE "Executable" +#define DRT_FORTRAN "FORTRAN Code" +#define DRT_ICON "Icon" +#define DRT_LIB "Library" +#define DRT_METAFILE "Metafile" +#define DRT_OS2CMD "OS/2 Command File" +#define DRT_PASCAL "Pascal Code" +#define DRT_RESOURCE "Resource File" +#define DRT_TEXT "Plain Text" +#define DRT_UNKNOWN "Unknown" + +#define DOR_NODROP 0x0000 /* DM_DRAGOVER response codes */ +#define DOR_DROP 0x0001 +#define DOR_NODROPOP 0x0002 +#define DOR_NEVERDROP 0x0003 + +#define DO_COPYABLE 0x0001 /* supported operation flags */ +#define DO_MOVEABLE 0x0002 + +#define DC_OPEN 0x0001 /* source control flags */ +#define DC_REF 0x0002 +#define DC_GROUP 0x0004 +#define DC_CONTAINER 0x0008 +#define DC_PREPARE 0x0010 +#define DC_REMOVEABLEMEDIA 0x0020 + +#define DO_DEFAULT 0xBFFE /* Default operation */ +#define DO_UNKNOWN 0xBFFF /* Unknown operation */ +#define DO_COPY KC_CTRL +#define DO_MOVE KC_ALT + +#define DMFL_TARGETSUCCESSFUL 0x0001 /* transfer reply flags */ +#define DMFL_TARGETFAIL 0x0002 +#define DMFL_NATIVERENDER 0x0004 +#define DMFL_RENDERRETRY 0x0008 +#define DMFL_RENDEROK 0x0010 +#define DMFL_RENDERFAIL 0x0020 + +#define DRG_ICON 0x00000001L /* drag image manipulation */ +#define DRG_BITMAP 0x00000002L /* flags */ +#define DRG_POLYGON 0x00000004L +#define DRG_STRETCH 0x00000008L +#define DRG_TRANSPARENT 0x00000010L +#define DRG_CLOSED 0x00000020L + +#define DME_IGNOREABORT 1 /* DM_DRAGERROR return values */ +#define DME_IGNORECONTINUE 2 +#define DME_REPLACE 3 +#define DME_RETRY 4 + +#define DF_MOVE 0x0001 /* DM_DRAGFILECOMPLETE flags */ +#define DF_SOURCE 0x0002 +#define DF_SUCCESSFUL 0x0004 + +#define DFF_MOVE 1 /* DM_DRAGERROR operation IDs */ +#define DFF_COPY 2 +#define DFF_DELETE 3 + + +typedef LHANDLE HSTR; /* hstr */ + +typedef struct _DRAGITEM { /* ditem */ + HWND hwndItem; /* conversation partner */ + ULONG ulItemID; /* identifies item being dragged */ + HSTR hstrType; /* type of item */ + HSTR hstrRMF; /* rendering mechanism and format*/ + HSTR hstrContainerName; /* name of source container */ + HSTR hstrSourceName; /* name of item at source */ + HSTR hstrTargetName; /* suggested name of item at dest*/ + SHORT cxOffset; /* x offset of the origin of the */ + /* image from the mouse hotspot*/ + SHORT cyOffset; /* y offset of the origin of the */ + /* image from the mouse hotspot*/ + USHORT fsControl; /* source item control flags */ + USHORT fsSupportedOps; /* ops supported by source */ +} DRAGITEM; +typedef DRAGITEM FAR *PDRAGITEM; + +typedef struct _DRAGINFO { /* dinfo */ + ULONG cbDraginfo; /* Size of DRAGINFO and DRAGITEMs*/ + USHORT cbDragitem; /* size of DRAGITEM */ + USHORT usOperation; /* current drag operation */ + HWND hwndSource; /* window handle of source */ + SHORT xDrop; /* x coordinate of drop position */ + SHORT yDrop; /* y coordinate of drop position */ + USHORT cditem; /* count of DRAGITEMs */ + USHORT usReserved; /* reserved for future use */ +} DRAGINFO; +typedef DRAGINFO FAR *PDRAGINFO; + +typedef struct _DRAGIMAGE { /* dimg */ + USHORT cb; /* size control block */ + USHORT cptl; /* count of pts, if DRG_POLYGON */ + LHANDLE hImage; /* image handle passed to DrgDrag*/ + SIZEL sizlStretch; /* size to strecth ico or bmp to */ + ULONG fl; /* flags passed to DrgDrag */ + SHORT cxOffset; /* x offset of the origin of the */ + /* image from the mouse hotspot*/ + SHORT cyOffset; /* y offset of the origin of the */ + /* image from the mouse hotspot*/ +} DRAGIMAGE; +typedef DRAGIMAGE FAR *PDRAGIMAGE; + +typedef struct _DRAGTRANSFER { /* dxfer */ + ULONG cb; /* size of control block */ + HWND hwndClient; /* handle of target */ + PDRAGITEM pditem; /* DRAGITEM being transferred */ + HSTR hstrSelectedRMF; /* rendering mech & fmt of choice*/ + HSTR hstrRenderToName; /* name source will use */ + ULONG ulTargetInfo; /* reserved for target's use */ + USHORT usOperation; /* operation being performed */ + USHORT fsReply; /* reply flags */ +} DRAGTRANSFER; +typedef DRAGTRANSFER FAR *PDRAGTRANSFER; + +typedef struct _RENDERFILE { /* rndf */ + HWND hwndDragFiles; /* conversation window */ + HSTR hstrSource; /* handle to source file name */ + HSTR hstrTarget; /* handle to target file name */ + BOOL fMove; /* TRUE - move, FALSE - copy */ + USHORT usRsvd; /* reserved */ +} RENDERFILE; +typedef RENDERFILE FAR *PRENDERFILE; + + +BOOL EXPENTRY DrgAcceptDroppedFiles (HWND hwnd, PSZ pszPath, PSZ pszTypes, + USHORT usDefaultOp, USHORT usRsvd); +BOOL EXPENTRY DrgAccessDraginfo (PDRAGINFO pdinfo); +HSTR EXPENTRY DrgAddStrHandle (PSZ psz); +PDRAGINFO EXPENTRY DrgAllocDraginfo (USHORT cditem); +PDRAGTRANSFER EXPENTRY DrgAllocDragtransfer (USHORT cdxfer); +BOOL EXPENTRY DrgDeleteDraginfoStrHandles (PDRAGINFO pdinfo); +BOOL EXPENTRY DrgDeleteStrHandle (HSTR hstr); +HWND EXPENTRY DrgDrag (HWND hwndSource, PDRAGINFO pdinfo, PDRAGIMAGE pdimg, + USHORT cdimg, SHORT vkTerminate, PVOID pRsvd); +BOOL EXPENTRY DrgDragFiles (HWND hwnd, PSZ FAR *apszFiles, PSZ FAR *apszTypes, + PSZ FAR *apszTargets, USHORT cFiles, + HPOINTER hptrDrag, USHORT vkTerm, + BOOL fSourceRender, ULONG ulRsvd); +BOOL EXPENTRY DrgFreeDraginfo (PDRAGINFO pdinfo); +BOOL EXPENTRY DrgFreeDragtransfer (PDRAGTRANSFER pdxfer); +HPS EXPENTRY DrgGetPS (HWND hwnd); +BOOL EXPENTRY DrgPostTransferMsg (HWND hwnd, USHORT msg, PDRAGTRANSFER pdxfer, + USHORT fs, USHORT usRsvd, BOOL fRetry); +BOOL EXPENTRY DrgPushDraginfo (PDRAGINFO pdinfo, HWND hwndDest); +BOOL EXPENTRY DrgQueryDragitem (PDRAGINFO pdinfo, USHORT cbBuffer, + PDRAGITEM pditem, USHORT iItem); +USHORT EXPENTRY DrgQueryDragitemCount (PDRAGINFO pdinfo); +PDRAGITEM EXPENTRY DrgQueryDragitemPtr (PDRAGINFO pdinfo, USHORT i); +BOOL EXPENTRY DrgQueryNativeRMF (PDRAGITEM pditem, + USHORT cbBuffer, PCHAR pBuffer); +USHORT EXPENTRY DrgQueryNativeRMFLen (PDRAGITEM pditem); +USHORT EXPENTRY DrgQueryStrName (HSTR hstr, USHORT cbBuffer, PSZ pBuffer); +USHORT EXPENTRY DrgQueryStrNameLen (HSTR hstr); +BOOL EXPENTRY DrgQueryTrueType (PDRAGITEM pditem, USHORT cbBuffer, PSZ pBuffer); +USHORT EXPENTRY DrgQueryTrueTypeLen (PDRAGITEM pditem); +BOOL EXPENTRY DrgReleasePS (HPS hps); +MRESULT EXPENTRY DrgSendTransferMsg (HWND hwnd, USHORT msg, + MPARAM mp1, MPARAM mp2); +BOOL EXPENTRY DrgSetDragitem (PDRAGINFO pdinfo, PDRAGITEM pditem, + USHORT cbBuffer, USHORT iItem); +BOOL EXPENTRY DrgSetDragPointer (PDRAGINFO pdinfo, HPOINTER hptr); +BOOL EXPENTRY DrgSetDragImage (PDRAGINFO pdinfo, PDRAGIMAGE pdimg, + USHORT cdimg, PVOID pRsvd); +BOOL EXPENTRY DrgVerifyNativeRMF (PDRAGITEM pditem, PSZ pszRMF); +BOOL EXPENTRY DrgVerifyRMF (PDRAGITEM pditem, PSZ pszMech, PSZ pszFmt); +BOOL EXPENTRY DrgVerifyTrueType (PDRAGITEM pditem, PSZ pszType); +BOOL EXPENTRY DrgVerifyType (PDRAGITEM pditem, PSZ pszType); +BOOL EXPENTRY DrgVerifyTypeSet (PDRAGITEM pditem, PSZ pszType, USHORT cbMatch, + PSZ pszMatch); + +#endif /* INCL_WINSTDDRAG */ + + diff --git a/private/oleauto/tools/win16/os2/inc/pmtypes.h b/private/oleauto/tools/win16/os2/inc/pmtypes.h new file mode 100644 index 000000000..7278c6e88 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmtypes.h @@ -0,0 +1,264 @@ +/***************************************************************************\ +* +* Module Name: PMTYPES.H +* +* OS/2 Presentation Manager Datatypes include file +* +* This is conditionally included from PMWIN.H +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +*****************************************************************************/ + +#define DTYP_USER ((SHORT)16384) + +#define DTYP_CTL_ARRAY ((SHORT)1) +#define DTYP_CTL_PARRAY ((SHORT)(-1)) +#define DTYP_CTL_OFFSET ((SHORT)2) +#define DTYP_CTL_LENGTH ((SHORT)3) + + +/**********************************************************************/ +/* Ordinary datatypes */ +/**********************************************************************/ + +#define DTYP_ACCEL ((SHORT)28) +#define DTYP_ACCELTABLE ((SHORT)29) +#define DTYP_ARCPARAMS ((SHORT)38) +#define DTYP_AREABUNDLE ((SHORT)139) +#define DTYP_ATOM ((SHORT)90) +#define DTYP_BITMAPINFO ((SHORT)60) +#define DTYP_BITMAPINFOHEADER ((SHORT)61) +#define DTYP_BIT16 ((SHORT)20) +#define DTYP_BIT32 ((SHORT)21) +#define DTYP_BIT8 ((SHORT)19) +#define DTYP_BOOL ((SHORT)18) +#define DTYP_BTNCDATA ((SHORT)35) +#define DTYP_BYTE ((SHORT)13) +#define DTYP_CATCHBUF ((SHORT)141) +#define DTYP_CHAR ((SHORT)15) +#define DTYP_CHARBUNDLE ((SHORT)135) +#define DTYP_CLASSINFO ((SHORT)95) +#define DTYP_COUNT2 ((SHORT)93) +#define DTYP_COUNT2B ((SHORT)70) +#define DTYP_COUNT2CH ((SHORT)82) +#define DTYP_COUNT4 ((SHORT)152) +#define DTYP_COUNT4B ((SHORT)42) +#define DTYP_CPID ((SHORT)57) +#define DTYP_CREATESTRUCT ((SHORT)98) +#define DTYP_CURSORINFO ((SHORT)34) +#define DTYP_DEVOPENSTRUC ((SHORT)124) +#define DTYP_DLGTEMPLATE ((SHORT)96) +#define DTYP_DLGTITEM ((SHORT)97) +#define DTYP_ENTRYFDATA ((SHORT)127) +#define DTYP_ERRORID ((SHORT)45) +#define DTYP_FATTRS ((SHORT)75) +#define DTYP_FFDESCS ((SHORT)142) +#define DTYP_FIXED ((SHORT)99) +#define DTYP_FONTMETRICS ((SHORT)74) +#define DTYP_FRAMECDATA ((SHORT)144) +#define DTYP_GRADIENTL ((SHORT)48) +#define DTYP_HAB ((SHORT)10) +#define DTYP_HACCEL ((SHORT)30) +#define DTYP_HAPP ((SHORT)146) +#define DTYP_HATOMTBL ((SHORT)91) +#define DTYP_HBITMAP ((SHORT)62) +#define DTYP_HCINFO ((SHORT)46) +#define DTYP_HDC ((SHORT)132) +#define DTYP_HENUM ((SHORT)117) +#define DTYP_HHEAP ((SHORT)109) +#define DTYP_HINI ((SHORT)53) +#define DTYP_HLIB ((SHORT)147) +#define DTYP_HMF ((SHORT)85) +#define DTYP_HMQ ((SHORT)86) +#define DTYP_HPOINTER ((SHORT)106) +#define DTYP_HPROGRAM ((SHORT)131) +#define DTYP_HPS ((SHORT)12) +#define DTYP_HRGN ((SHORT)116) +#define DTYP_HSEM ((SHORT)140) +#define DTYP_HSPL ((SHORT)32) +#define DTYP_HSWITCH ((SHORT)66) +#define DTYP_HVPS ((SHORT)58) +#define DTYP_HWND ((SHORT)11) +#define DTYP_IDENTITY ((SHORT)133) +#define DTYP_IDENTITY4 ((SHORT)169) +#define DTYP_IMAGEBUNDLE ((SHORT)136) +#define DTYP_INDEX2 ((SHORT)81) +#define DTYP_IPT ((SHORT)155) +#define DTYP_KERNINGPAIRS ((SHORT)118) +#define DTYP_LENGTH2 ((SHORT)68) +#define DTYP_LENGTH4 ((SHORT)69) +#define DTYP_LINEBUNDLE ((SHORT)137) +#define DTYP_LONG ((SHORT)25) +#define DTYP_MARKERBUNDLE ((SHORT)138) +#define DTYP_MATRIXLF ((SHORT)113) +#define DTYP_MLECTLDATA ((SHORT)161) +#define DTYP_MLEMARGSTRUCT ((SHORT)157) +#define DTYP_MLEOVERFLOW ((SHORT)158) +#define DTYP_OFFSET2B ((SHORT)112) +#define DTYP_OWNERITEM ((SHORT)154) +#define DTYP_PID ((SHORT)92) +#define DTYP_PIX ((SHORT)156) +#define DTYP_POINTERINFO ((SHORT)105) +#define DTYP_POINTL ((SHORT)77) +#define DTYP_PROGCATEGORY ((SHORT)129) +#define DTYP_PROGRAMENTRY ((SHORT)128) +#define DTYP_PROGTYPE ((SHORT)130) +#define DTYP_PROPERTY2 ((SHORT)88) +#define DTYP_PROPERTY4 ((SHORT)89) +#define DTYP_QMSG ((SHORT)87) +#define DTYP_RECTL ((SHORT)121) +#define DTYP_RESID ((SHORT)125) +#define DTYP_RGB ((SHORT)111) +#define DTYP_RGNRECT ((SHORT)115) +#define DTYP_SBCDATA ((SHORT)159) +#define DTYP_SEGOFF ((SHORT)126) +#define DTYP_SHORT ((SHORT)23) +#define DTYP_SIZEF ((SHORT)101) +#define DTYP_SIZEL ((SHORT)102) +#define DTYP_STRL ((SHORT)17) +#define DTYP_STR16 ((SHORT)40) +#define DTYP_STR32 ((SHORT)37) +#define DTYP_STR64 ((SHORT)47) +#define DTYP_STR8 ((SHORT)33) +#define DTYP_SWBLOCK ((SHORT)63) +#define DTYP_SWCNTRL ((SHORT)64) +#define DTYP_SWENTRY ((SHORT)65) +#define DTYP_SWP ((SHORT)31) +#define DTYP_TID ((SHORT)104) +#define DTYP_TIME ((SHORT)107) +#define DTYP_TRACKINFO ((SHORT)73) +#define DTYP_UCHAR ((SHORT)22) +#define DTYP_ULONG ((SHORT)26) +#define DTYP_USERBUTTON ((SHORT)36) +#define DTYP_USHORT ((SHORT)24) +#define DTYP_WIDTH4 ((SHORT)108) +#define DTYP_WNDPARAMS ((SHORT)83) +#define DTYP_WNDPROC ((SHORT)84) +#define DTYP_WPOINT ((SHORT)59) +#define DTYP_WRECT ((SHORT)55) +#define DTYP_XYWINSIZE ((SHORT)52) + + +/**********************************************************************/ +/* Pointer datatypes */ +/**********************************************************************/ + +#define DTYP_PACCEL ((SHORT)(-28)) +#define DTYP_PACCELTABLE ((SHORT)(-29)) +#define DTYP_PARCPARAMS ((SHORT)(-38)) +#define DTYP_PAREABUNDLE ((SHORT)(-139)) +#define DTYP_PATOM ((SHORT)(-90)) +#define DTYP_PBITMAPINFO ((SHORT)(-60)) +#define DTYP_PBITMAPINFOHEADER ((SHORT)(-61)) +#define DTYP_PBIT16 ((SHORT)(-20)) +#define DTYP_PBIT32 ((SHORT)(-21)) +#define DTYP_PBIT8 ((SHORT)(-19)) +#define DTYP_PBOOL ((SHORT)(-18)) +#define DTYP_PBTNCDATA ((SHORT)(-35)) +#define DTYP_PBYTE ((SHORT)(-13)) +#define DTYP_PCATCHBUF ((SHORT)(-141)) +#define DTYP_PCHAR ((SHORT)(-15)) +#define DTYP_PCHARBUNDLE ((SHORT)(-135)) +#define DTYP_PCLASSINFO ((SHORT)(-95)) +#define DTYP_PCOUNT2 ((SHORT)(-93)) +#define DTYP_PCOUNT2B ((SHORT)(-70)) +#define DTYP_PCOUNT2CH ((SHORT)(-82)) +#define DTYP_PCOUNT4 ((SHORT)(-152)) +#define DTYP_PCOUNT4B ((SHORT)(-42)) +#define DTYP_PCPID ((SHORT)(-57)) +#define DTYP_PCREATESTRUCT ((SHORT)(-98)) +#define DTYP_PCURSORINFO ((SHORT)(-34)) +#define DTYP_PDEVOPENSTRUC ((SHORT)(-124)) +#define DTYP_PDLGTEMPLATE ((SHORT)(-96)) +#define DTYP_PDLGTITEM ((SHORT)(-97)) +#define DTYP_PENTRYFDATA ((SHORT)(-127)) +#define DTYP_PERRORID ((SHORT)(-45)) +#define DTYP_PFATTRS ((SHORT)(-75)) +#define DTYP_PFFDESCS ((SHORT)(-142)) +#define DTYP_PFIXED ((SHORT)(-99)) +#define DTYP_PFONTMETRICS ((SHORT)(-74)) +#define DTYP_PFRAMECDATA ((SHORT)(-144)) +#define DTYP_PGRADIENTL ((SHORT)(-48)) +#define DTYP_PHAB ((SHORT)(-10)) +#define DTYP_PHACCEL ((SHORT)(-30)) +#define DTYP_PHAPP ((SHORT)(-146)) +#define DTYP_PHATOMTBL ((SHORT)(-91)) +#define DTYP_PHBITMAP ((SHORT)(-62)) +#define DTYP_PHCINFO ((SHORT)(-46)) +#define DTYP_PHDC ((SHORT)(-132)) +#define DTYP_PHENUM ((SHORT)(-117)) +#define DTYP_PHHEAP ((SHORT)(-109)) +#define DTYP_PHINI ((SHORT)(-53)) +#define DTYP_PHLIB ((SHORT)(-147)) +#define DTYP_PHMF ((SHORT)(-85)) +#define DTYP_PHMQ ((SHORT)(-86)) +#define DTYP_PHPOINTER ((SHORT)(-106)) +#define DTYP_PHPROGRAM ((SHORT)(-131)) +#define DTYP_PHPS ((SHORT)(-12)) +#define DTYP_PHRGN ((SHORT)(-116)) +#define DTYP_PHSEM ((SHORT)(-140)) +#define DTYP_PHSPL ((SHORT)(-32)) +#define DTYP_PHSWITCH ((SHORT)(-66)) +#define DTYP_PHVPS ((SHORT)(-58)) +#define DTYP_PHWND ((SHORT)(-11)) +#define DTYP_PIDENTITY ((SHORT)(-133)) +#define DTYP_PIDENTITY4 ((SHORT)(-169)) +#define DTYP_PIMAGEBUNDLE ((SHORT)(-136)) +#define DTYP_PINDEX2 ((SHORT)(-81)) +#define DTYP_PIPT ((SHORT)(-155)) +#define DTYP_PKERNINGPAIRS ((SHORT)(-118)) +#define DTYP_PLENGTH2 ((SHORT)(-68)) +#define DTYP_PLENGTH4 ((SHORT)(-69)) +#define DTYP_PLINEBUNDLE ((SHORT)(-137)) +#define DTYP_PLONG ((SHORT)(-25)) +#define DTYP_PMARKERBUNDLE ((SHORT)(-138)) +#define DTYP_PMATRIXLF ((SHORT)(-113)) +#define DTYP_PMLECTLDATA ((SHORT)(-161)) +#define DTYP_PMLEMARGSTRUCT ((SHORT)(-157)) +#define DTYP_PMLEOVERFLOW ((SHORT)(-158)) +#define DTYP_POFFSET2B ((SHORT)(-112)) +#define DTYP_POWNERITEM ((SHORT)(-154)) +#define DTYP_PPID ((SHORT)(-92)) +#define DTYP_PPIX ((SHORT)(-156)) +#define DTYP_PPOINTERINFO ((SHORT)(-105)) +#define DTYP_PPOINTL ((SHORT)(-77)) +#define DTYP_PPROGCATEGORY ((SHORT)(-129)) +#define DTYP_PPROGRAMENTRY ((SHORT)(-128)) +#define DTYP_PPROGTYPE ((SHORT)(-130)) +#define DTYP_PPROPERTY2 ((SHORT)(-88)) +#define DTYP_PPROPERTY4 ((SHORT)(-89)) +#define DTYP_PQMSG ((SHORT)(-87)) +#define DTYP_PRECTL ((SHORT)(-121)) +#define DTYP_PRESID ((SHORT)(-125)) +#define DTYP_PRGB ((SHORT)(-111)) +#define DTYP_PRGNRECT ((SHORT)(-115)) +#define DTYP_PSBCDATA ((SHORT)(-159)) +#define DTYP_PSEGOFF ((SHORT)(-126)) +#define DTYP_PSHORT ((SHORT)(-23)) +#define DTYP_PSIZEF ((SHORT)(-101)) +#define DTYP_PSIZEL ((SHORT)(-102)) +#define DTYP_PSTRL ((SHORT)(-17)) +#define DTYP_PSTR16 ((SHORT)(-40)) +#define DTYP_PSTR32 ((SHORT)(-37)) +#define DTYP_PSTR64 ((SHORT)(-47)) +#define DTYP_PSTR8 ((SHORT)(-33)) +#define DTYP_PSWBLOCK ((SHORT)(-63)) +#define DTYP_PSWCNTRL ((SHORT)(-64)) +#define DTYP_PSWENTRY ((SHORT)(-65)) +#define DTYP_PSWP ((SHORT)(-31)) +#define DTYP_PTID ((SHORT)(-104)) +#define DTYP_PTIME ((SHORT)(-107)) +#define DTYP_PTRACKINFO ((SHORT)(-73)) +#define DTYP_PUCHAR ((SHORT)(-22)) +#define DTYP_PULONG ((SHORT)(-26)) +#define DTYP_PUSERBUTTON ((SHORT)(-36)) +#define DTYP_PUSHORT ((SHORT)(-24)) +#define DTYP_PWIDTH4 ((SHORT)(-108)) +#define DTYP_PWNDPARAMS ((SHORT)(-83)) +#define DTYP_PWNDPROC ((SHORT)(-84)) +#define DTYP_PWPOINT ((SHORT)(-59)) +#define DTYP_PWRECT ((SHORT)(-55)) +#define DTYP_PXYWINSIZE ((SHORT)(-52)) + diff --git a/private/oleauto/tools/win16/os2/inc/pmwin.h b/private/oleauto/tools/win16/os2/inc/pmwin.h new file mode 100644 index 000000000..b7b1365b3 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/pmwin.h @@ -0,0 +1,2980 @@ +/*static char *SCCSID = "@(#)pmwin.h 13.1 91/01/16";*/ +/***************************************************************************\ +* +* Module Name: PMWIN.H +* +* OS/2 Presentation Manager Window Manager include file +* +* Copyright (c) International Business Machines Corporation 1981, 1988, 1989 +* Copyright (c) Microsoft Corporation 1981, 1988, 1989 +* +* ======================================================================= +* +* The folowing symbols are used in this file for conditional sections. +* +* If INCL_WIN is defined, all subcomponents are included. +* +* Subcomponents marked with "+" are partially included by default: +* +* #define: To include: +* +* + INCL_WINWINDOWMGR General window management +* + INCL_WINMESSAGEMGR Message management +* + INCL_WININPUT Mouse and keyboard input +* + INCL_WINDIALOGS Dialog boxes +* + INCL_WINSTATICS Static controls +* + INCL_WINBUTTONS Button controls +* + INCL_WINENTRYFIELDS Entry Fields +* INCL_WINMLE Multiple Line Entry Fields +* + INCL_WINLISTBOXES List box controls +* + INCL_WINMENUS Menu controls +* + INCL_WINSCROLLBARS Scroll bar controls +* + INCL_WINFRAMEMGR Frame manager +* INCL_WINFRAMECTLS Frame controls (title bars & size border) +* INCL_WINRECTANGLES Rectangle routines +* INCL_WINSYS System values (and colors) +* INCL_WINTIMER Timer routines +* + INCL_WINACCELERATORS Keyboard accelerators +* INCL_WINTRACKRECT WinTrackRect() function +* INCL_WINCLIPBOARD Clipboard manager +* + INCL_WINCURSORS Text cursors +* + INCL_WINPOINTERS Mouse pointers +* INCL_WINHOOKS Hook manager +* + INCL_WINSWITCHLIST Shell Switch List API +* INCL_WINPROGRAMLIST Shell Program List API +* INCL_WINSHELLDATA Shell Data (?) +* INCL_WINCOUNTRY Country support +* INCL_WINHEAP Heap Manager +* INCL_WINATOM Atom Manager +* INCL_WINCATCHTHROW WinCatch/WinThrow support +* INCL_WINERRORS Error code definitions +* INCL_NLS DBCS window manager definition +* + INCL_WINHELP Help Manager definitions +* INCL_WINSEI Set Error Info API +* INCL_WINLOAD Load/Delete Library/Procedure +* INCL_WINTYPES Definitions for Datatypes +* +\***************************************************************************/ + +#define INCL_WININCLUDED + + +#ifdef INCL_WIN + +#define INCL_WINWINDOWMGR +#define INCL_WINMESSAGEMGR +#define INCL_WININPUT +#define INCL_WINDIALOGS +#define INCL_WINSTATICS +#define INCL_WINBUTTONS +#define INCL_WINENTRYFIELDS +#define INCL_WINMLE +#define INCL_WINLISTBOXES +#define INCL_WINMENUS +#define INCL_WINSCROLLBARS +#define INCL_WINFRAMEMGR +#define INCL_WINFRAMECTLS +#define INCL_WINRECTANGLES +#define INCL_WINSYS +#define INCL_WINTIMER +#define INCL_WINACCELERATORS +#define INCL_WINTRACKRECT +#define INCL_WINCLIPBOARD +#define INCL_WINCURSORS +#define INCL_WINPOINTERS +#define INCL_WINHOOKS +#define INCL_WINSWITCHLIST +#define INCL_WINPROGRAMLIST +#define INCL_WINSHELLDATA +#define INCL_WINCOUNTRY +#define INCL_WINHEAP +#define INCL_WINATOM +#define INCL_WINCATCHTHROW +#define INCL_WINERRORS +#define INCL_WINDDE +#define INCL_WINHELP +#define INCL_WINSEI +#define INCL_WINLOAD +#define INCL_WINTYPES + +#else /* INCL_WIN */ + +#ifdef RC_INVOKED +#define INCL_WININPUT +#define INCL_WINDIALOGS +#define INCL_WINSTATICS +#define INCL_WINBUTTONS +#define INCL_WINENTRYFIELDS +#define INCL_WINLISTBOXES +#define INCL_WINMENUS +#define INCL_WINSCROLLBARS +#define INCL_WINFRAMEMGR +#define INCL_WINFRAMECTLS +#define INCL_WINACCELERATORS +#define INCL_WINPOINTERS +#define INCL_WINMESSAGEMGR +#define INCL_WINMLE +#define INCL_WINHELP +#endif /* RC_INVOKED */ + +#endif /* INCL_WIN */ + +/* ensure standard entry field defintions if MLE is defined */ +#ifdef INCL_WINMLE +#ifndef INCL_WINENTRYFIELDS +#define INCL_WINENTRYFIELDS +#endif /* INCL_WINENTRYFIELDS */ +#endif /* INCL_WINMLE */ + +/* INCL_WINCOMMON compatability */ +#ifdef INCL_WINCOMMON +#define INCL_WINWINDOWMGR +#endif /* INCL_WINCOMMON */ + +#ifdef INCL_ERRORS +#define INCL_WINERRORS +#endif /* INCL_ERRORS */ + +/***************************************************************************/ +/*** General Window Management types, constants and macros ***/ + +typedef VOID FAR *MPARAM; /* mp */ +typedef MPARAM FAR *PMPARAM; /* pmp */ +typedef VOID FAR *MRESULT; /* mres */ +typedef MRESULT FAR *PMRESULT; /* pmres */ + +/* Macros to make an MPARAM from standard types. */ +#define MPFROMP(p) ((MPARAM)(VOID FAR *)(p)) +#define MPFROMHWND(hwnd) ((MPARAM)(HWND)(hwnd)) +#define MPFROMCHAR(ch) ((MPARAM)(USHORT)(ch)) +#define MPFROMSHORT(s) ((MPARAM)(USHORT)(s)) +#define MPFROM2SHORT(s1, s2) ((MPARAM)MAKELONG(s1, s2)) +#define MPFROMSH2CH(s, uch1, uch2) ((MPARAM)MAKELONG(s, MAKESHORT(uch1, uch2))) +#define MPFROMLONG(l) ((MPARAM)(ULONG)(l)) + +/* Macros to extract standard types from an MPARAM */ +#define PVOIDFROMMP(mp) ((VOID FAR *)(mp)) +#define HWNDFROMMP(mp) ((HWND)(mp)) +#define CHAR1FROMMP(mp) ((UCHAR)(mp)) +#define CHAR2FROMMP(mp) ((UCHAR)((ULONG)mp >> 8)) +#define CHAR3FROMMP(mp) ((UCHAR)((ULONG)mp >> 16)) +#define CHAR4FROMMP(mp) ((UCHAR)((ULONG)mp >> 24)) +#define SHORT1FROMMP(mp) ((USHORT)(ULONG)(mp)) +#define SHORT2FROMMP(mp) ((USHORT)((ULONG)mp >> 16)) +#define LONGFROMMP(mp) ((ULONG)(mp)) + +/* Macros to make an MRESULT from standard types. */ +#define MRFROMP(p) ((MRESULT)(VOID FAR *)(p)) +#define MRFROMSHORT(s) ((MRESULT)(USHORT)(s)) +#define MRFROM2SHORT(s1, s2) ((MRESULT)MAKELONG(s1, s2)) +#define MRFROMLONG(l) ((MRESULT)(ULONG)(l)) + +/* Macros to extract standard types from an MRESULT */ +#define PVOIDFROMMR(mr) ((VOID FAR *)(mr)) +#define SHORT1FROMMR(mr) ((USHORT)((ULONG)mr)) +#define SHORT2FROMMR(mr) ((USHORT)((ULONG)mr >> 16)) +#define LONGFROMMR(mr) ((ULONG)(mr)) + +typedef MRESULT (PASCAL FAR *PFNWP)(HWND, USHORT, MPARAM, MPARAM); + +#ifndef INCL_SAADEFS +#define HWND_DESKTOP (HWND)1 +#define HWND_OBJECT (HWND)2 +#endif /* !INCL_SAADEFS */ + +#define HWND_TOP (HWND)3 +#define HWND_BOTTOM (HWND)4 + +#ifndef INCL_SAADEFS +#define HWND_THREADCAPTURE (HWND)5 +#endif /* !INCL_SAADEFS */ + + +/* Standard Window Styles */ + +#define WS_VISIBLE 0x80000000L +#define WS_DISABLED 0x40000000L +#define WS_CLIPCHILDREN 0x20000000L +#define WS_CLIPSIBLINGS 0x10000000L +#define WS_PARENTCLIP 0x08000000L +#define WS_SAVEBITS 0x04000000L +#define WS_SYNCPAINT 0x02000000L +#define WS_MINIMIZED 0x01000000L +#define WS_MAXIMIZED 0x00800000L + +/* Dialog manager styles */ + +#define WS_GROUP 0x00010000L +#define WS_TABSTOP 0x00020000L +#define WS_MULTISELECT 0x00040000L + + +/* Class styles */ + +#define CS_MOVENOTIFY 0x00000001L +#define CS_SIZEREDRAW 0x00000004L +#define CS_HITTEST 0x00000008L +#define CS_PUBLIC 0x00000010L +#define CS_FRAME 0x00000020L +#define CS_CLIPCHILDREN 0x20000000L +#define CS_CLIPSIBLINGS 0x10000000L +#define CS_PARENTCLIP 0x08000000L +#define CS_SAVEBITS 0x04000000L +#define CS_SYNCPAINT 0x02000000L + +/***************************************************************************/ +/**** Window Manager Subsection part 1 ****/ +#if (defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)) + +BOOL APIENTRY WinRegisterClass(HAB hab, PSZ pszClassName, PFNWP pfnWndProc, + ULONG flStyle, USHORT cbWindowData); + +MRESULT APIENTRY WinDefWindowProc(HWND hwnd, USHORT msg, MPARAM mp1, + MPARAM mp2); +BOOL APIENTRY WinDestroyWindow(HWND hwnd); +BOOL APIENTRY WinShowWindow(HWND hwnd, BOOL fShow); +BOOL APIENTRY WinQueryWindowRect(HWND hwnd, PRECTL prclDest); + +HPS APIENTRY WinGetPS(HWND hwnd); +BOOL APIENTRY WinReleasePS(HPS hps); +BOOL APIENTRY WinEndPaint(HPS hps); +#ifndef INCL_SAADEFS +HPS APIENTRY WinGetClipPS(HWND hwnd, HWND hwndClip, USHORT fs); +BOOL APIENTRY WinIsWindowShowing(HWND hwnd); +#endif /* !INCL_SAADEFS */ + +HPS APIENTRY WinBeginPaint(HWND hwnd, HPS hps, PRECTL prclPaint); +HDC APIENTRY WinOpenWindowDC(HWND hwnd); + +SHORT APIENTRY WinScrollWindow(HWND hwnd, SHORT dx, SHORT dy, + PRECTL prclScroll, PRECTL prclClip, + HRGN hrgnUpdate, PRECTL prclUpdate, + USHORT rgfsw); + +/* WinGetClipPS() flags */ + +#ifndef INCL_SAADEFS +#define PSF_LOCKWINDOWUPDATE 0x0001 +#define PSF_CLIPUPWARDS 0x0002 +#define PSF_CLIPDOWNWARDS 0x0004 +#define PSF_CLIPSIBLINGS 0x0008 +#define PSF_CLIPCHILDREN 0x0010 +#define PSF_PARENTCLIP 0x0020 + +#endif /* !INCL_SAADEFS */ + +/* WinScrollWindow() flags */ + +#define SW_SCROLLCHILDREN 0x0001 +#define SW_INVALIDATERGN 0x0002 + +BOOL APIENTRY WinFillRect(HPS hps, PRECTL prcl, LONG lColor); + +/* WinInitialize/WinTerminate Interface declarations */ + +typedef struct _QVERSDATA { /* qver */ + USHORT environment; + USHORT version; +} QVERSDATA; +typedef QVERSDATA FAR *PQVERSDATA; + +#define QV_OS2 0x0000 +#define QV_CMS 0x0001 +#define QV_TSO 0x0002 +#define QV_TSOBATCH 0x0003 +#define QV_OS400 0x0004 + + +ULONG APIENTRY WinQueryVersion(HAB hab); +HAB APIENTRY WinInitialize(USHORT); +BOOL APIENTRY WinTerminate(HAB hab); + +HAB APIENTRY WinQueryAnchorBlock(HWND hwnd); + +#endif /* INCL_WINWINDOWMGR | !INCL_NOCOMMON */ +/****************** End of Window Manager COMMON section ******************/ + + +HWND APIENTRY WinCreateWindow(HWND hwndParent, PSZ pszClass, PSZ pszName, + ULONG flStyle, SHORT x, SHORT y, SHORT cx, + SHORT cy, HWND hwndOwner, + HWND hwndInsertBehind, USHORT id, + PVOID pCtlData, PVOID pPresParams); +BOOL APIENTRY WinEnableWindow(HWND hwnd, BOOL fEnable); +BOOL APIENTRY WinIsWindowEnabled(HWND hwnd); +BOOL APIENTRY WinEnableWindowUpdate(HWND hwnd, BOOL fEnable); +BOOL APIENTRY WinIsWindowVisible(HWND hwnd); +SHORT APIENTRY WinQueryWindowText(HWND hwnd, SHORT cchBufferMax, + PCH pchBuffer); +BOOL APIENTRY WinSetWindowText(HWND hwnd, PSZ pszText); +SHORT APIENTRY WinQueryWindowTextLength(HWND hwnd); +HWND APIENTRY WinWindowFromID(HWND hwndParent, USHORT id); + +BOOL APIENTRY WinIsWindow(HAB hab, HWND hwnd); +HWND APIENTRY WinQueryWindow(HWND hwnd, SHORT cmd, BOOL fLock); +SHORT APIENTRY WinMultWindowFromIDs(HWND hwndParent, PHWND prghwnd, + USHORT idFirst, USHORT idLast); + +/* WinQueryWindow() codes */ + +#define QW_NEXT 0 +#define QW_PREV 1 +#define QW_TOP 2 +#define QW_BOTTOM 3 +#define QW_OWNER 4 +#define QW_PARENT 5 +#define QW_NEXTTOP 6 +#define QW_PREVTOP 7 +#define QW_FRAMEOWNER 8 + + +BOOL APIENTRY WinSetParent(HWND hwnd, HWND hwndNewParent, BOOL fRedraw); + +BOOL APIENTRY WinIsChild(HWND hwnd, HWND hwndParent); +BOOL APIENTRY WinSetOwner(HWND hwnd, HWND hwndNewOwner); +#ifndef INCL_SAADEFS +BOOL APIENTRY WinQueryWindowProcess(HWND hwnd, PPID ppid, PTID ptid); +#endif /* !INCL_SAADEFS */ + +HWND APIENTRY WinQueryObjectWindow(HWND hwndDesktop); +HWND APIENTRY WinQueryDesktopWindow(HAB hab, HDC hdc); + +/*** Window positioning functions */ + +/* WinSetMultWindowPos() structure */ + +typedef struct _SWP { /* swp */ + USHORT fs; + SHORT cy; + SHORT cx; + SHORT y; + SHORT x; + HWND hwndInsertBehind; + HWND hwnd; +} SWP; +typedef SWP FAR *PSWP; + +BOOL APIENTRY WinSetWindowPos(HWND hwnd, HWND hwndInsertBehind, SHORT x, + SHORT y, SHORT cx, SHORT cy, USHORT fs); +BOOL APIENTRY WinQueryWindowPos(HWND hwnd, PSWP pswp); +BOOL APIENTRY WinSetMultWindowPos(HAB hab, PSWP pswp, USHORT cswp); + +/* Values returned from WM_ADJUSTWINDOWPOS and passed to WM_WINDOWPOSCHANGED */ + +#define AWP_MINIMIZED 0x00010000L +#define AWP_MAXIMIZED 0x00020000L +#define AWP_RESTORED 0x00040000L +#define AWP_ACTIVATE 0x00080000L +#define AWP_DEACTIVATE 0x00100000L + +/* WinSetWindowPos() flags */ + +#define SWP_SIZE 0x0001 +#define SWP_MOVE 0x0002 +#define SWP_ZORDER 0x0004 +#define SWP_SHOW 0x0008 +#define SWP_HIDE 0x0010 +#define SWP_NOREDRAW 0x0020 +#define SWP_NOADJUST 0x0040 +#define SWP_ACTIVATE 0x0080 +#define SWP_DEACTIVATE 0x0100 +#define SWP_EXTSTATECHANGE 0x0200 +#define SWP_MINIMIZE 0x0400 +#define SWP_MAXIMIZE 0x0800 +#define SWP_RESTORE 0x1000 +#define SWP_FOCUSACTIVATE 0x2000 +#define SWP_FOCUSDEACTIVATE 0x4000 + +/* Window painting */ + +BOOL APIENTRY WinUpdateWindow(HWND hwnd); + +BOOL APIENTRY WinInvalidateRect(HWND hwnd, PRECTL pwrc, BOOL fIncludeChildren); +BOOL APIENTRY WinInvalidateRegion(HWND hwnd, HRGN hrgn, + BOOL fIncludeChildren); + + +/* Drawing helpers */ + +BOOL APIENTRY WinInvertRect(HPS hps, PRECTL prcl); +BOOL APIENTRY WinDrawBitmap(HPS hpsDst, HBITMAP hbm, PRECTL pwrcSrc, + PPOINTL pptlDst, LONG clrFore, LONG clrBack, + USHORT fs); + +/* WinDrawBitmap() flags */ + +#define DBM_NORMAL 0x0000 +#define DBM_INVERT 0x0001 +#define DBM_HALFTONE 0x0002 +#define DBM_STRETCH 0x0004 +#define DBM_IMAGEATTRS 0x0008 + + +SHORT APIENTRY WinDrawText(HPS hps, SHORT cchText, PCH lpchText, PRECTL prcl, + LONG clrFore, LONG clrBack, USHORT rgfCmd); +/* + * WinDrawText() codes: + * From DT_LEFT to DT_EXTERNALLEADING, the codes are designed to be OR'ed with + * SS_TEXT to create variations of the basic text static item. + */ +#define DT_LEFT 0x0000 +#define DT_EXTERNALLEADING 0x0080 +#define DT_CENTER 0x0100 +#define DT_RIGHT 0x0200 +#define DT_TOP 0x0000 +#define DT_VCENTER 0x0400 +#define DT_BOTTOM 0x0800 +#define DT_HALFTONE 0x1000 +#define DT_MNEMONIC 0x2000 +#define DT_WORDBREAK 0x4000 +#define DT_ERASERECT 0x8000 +#define DT_QUERYEXTENT 0x0002 +#define DT_TEXTATTRS 0x0040 + + +BOOL APIENTRY WinDrawBorder(HPS hps, PRECTL prcl, SHORT cx, SHORT cy, + LONG clrFore, LONG clrBack, USHORT rgfCmd); + +/* WinDrawBorder() flags */ + +#define DB_PATCOPY 0x0000 +#define DB_PATINVERT 0x0001 +#define DB_DESTINVERT 0x0002 +#define DB_AREAMIXMODE 0x0003 + +#define DB_ROP 0x0007 +#define DB_INTERIOR 0x0008 +#define DB_AREAATTRS 0x0010 +#define DB_STANDARD 0x0100 +#define DB_DLGBORDER 0x0200 + + + +/** Resource loading functions */ + +SHORT APIENTRY WinLoadString(HAB hab, HMODULE hmod, USHORT id, SHORT cchMax, + PSZ pchBuffer); +#ifndef INCL_SAADEFS +SHORT APIENTRY WinLoadMessage(HAB hab, HMODULE hmod, USHORT id, SHORT cchMax, + PSZ pchBuffer); + + +#endif /* !INCL_SAADEFS */ + +/***************************************************************************/ +/**** Window Manager Subsection part 2 ****/ +#if (defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)) + +BOOL APIENTRY WinSetActiveWindow(HWND hwndDesktop, HWND hwnd); + +#endif /* Window Manager COMMON subsection */ + +#ifdef INCL_WINWINDOWMGR +/* WM_CREATE structure */ + +typedef struct _CREATESTRUCT { /* crst */ + PVOID pPresParams; + PVOID pCtlData; + USHORT id; + HWND hwndInsertBehind; + HWND hwndOwner; + SHORT cy; + SHORT cx; + SHORT y; + SHORT x; + ULONG flStyle; + PSZ pszText; + PSZ pszClass; + HWND hwndParent; +} CREATESTRUCT; +typedef CREATESTRUCT FAR *PCREATESTRUCT; + +/* WinQueryClassInfo() structure */ + +typedef struct _CLASSINFO { /* clsi */ + ULONG flClassStyle; + PFNWP pfnWindowProc; + USHORT cbWindowData; +} CLASSINFO; +typedef CLASSINFO FAR *PCLASSINFO; + +#ifndef INCL_SAADEFS +PFNWP APIENTRY WinSubclassWindow(HWND hwnd, PFNWP pfnwp); +#endif /* !INCL_SAADEFS */ + +SHORT APIENTRY WinQueryClassName(HWND hwnd, SHORT cchMax, PCH pch); +BOOL APIENTRY WinQueryClassInfo(HAB hab, PSZ pszClassName, + PCLASSINFO pClassInfo); + +HWND APIENTRY WinQueryActiveWindow(HWND hwndDesktop, BOOL fLock); + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinIsThreadActive(HAB hab); +#endif /* !INCL_SAADEFS */ +HWND APIENTRY WinQuerySysModalWindow(HWND hwndDesktop, BOOL fLock); + +HWND APIENTRY WinLockWindow(HWND hwnd, BOOL fLock); +#ifndef INCL_SAADEFS +BOOL APIENTRY WinRegisterWindowDestroy(HWND hwnd, BOOL fRegister); +#endif /* !INCL_SAADEFS */ +BOOL APIENTRY WinSetSysModalWindow(HWND hwndDesktop, HWND hwnd); + +SHORT APIENTRY WinQueryWindowLockCount(HWND hwnd); + +#ifndef INCL_SAADEFS +USHORT APIENTRY WinQueryWindowUShort(HWND hwnd, SHORT index); +BOOL APIENTRY WinSetWindowUShort(HWND hwnd, SHORT index, USHORT us); +ULONG APIENTRY WinQueryWindowULong(HWND hwnd, SHORT index); +BOOL APIENTRY WinSetWindowULong(HWND hwnd, SHORT index, ULONG ul); +PVOID APIENTRY WinQueryWindowPtr(HWND hwnd, SHORT index); +BOOL APIENTRY WinSetWindowPtr(HWND hwnd, SHORT index, PVOID p); +BOOL APIENTRY WinSetWindowBits(HWND hwnd, SHORT index, ULONG flData, + ULONG flMask); + +/* Standard WinQueryWindowUShort/ULong() indices */ + +#define QWS_USER 0 +#define QWS_ID (-1) +#define QWS_MIN (-1) + +#define QWL_USER 0 +#define QWL_STYLE (-2) +#define QWP_PFNWP (-3) +#define QWL_HMQ (-4) +#define QWL_MIN (-4) + +/* WC_FRAME WinQueryWindowUShort/ULong() indices */ + +#define QWL_HHEAP 0x0004 +#define QWL_HWNDFOCUSSAVE 0x0018 + +#define QWS_FLAGS 0x0008 +#define QWS_RESULT 0x000a +#define QWS_XRESTORE 0x000c +#define QWS_YRESTORE 0x000e +#define QWS_CXRESTORE 0x0010 +#define QWS_CYRESTORE 0x0012 +#define QWS_XMINIMIZE 0x0014 +#define QWS_YMINIMIZE 0x0016 + + +/* Window enumeration */ + +typedef LHANDLE HENUM; /* henum */ + +HENUM APIENTRY WinBeginEnumWindows(HWND hwnd); +HWND APIENTRY WinGetNextWindow(HENUM henum); +BOOL APIENTRY WinEndEnumWindows(HENUM henum); + +#endif /* !INCL_SAADEFS */ + +HWND APIENTRY WinWindowFromPoint(HWND hwnd, PPOINTL pptl, BOOL fChildren, + BOOL fLock); +BOOL APIENTRY WinMapWindowPoints(HWND hwndFrom, HWND hwndTo, PPOINTL prgptl, + SHORT cwpt); + +/* More window painting functions */ + +BOOL APIENTRY WinValidateRect(HWND hwnd, PRECTL prcl, BOOL fIncludeChildren); +BOOL APIENTRY WinValidateRegion(HWND hwnd, HRGN hrgn, BOOL fIncludeChildren); +#ifndef INCL_SAADEFS +HWND APIENTRY WinWindowFromDC(HDC hdc); +HDC APIENTRY WinQueryWindowDC(HWND hwnd); +HPS APIENTRY WinGetScreenPS(HWND hwndDesktop); +BOOL APIENTRY WinLockWindowUpdate(HWND hwndDesktop, HWND hwndLockUpdate); +BOOL APIENTRY WinLockVisRegions(HWND hwndDesktop, BOOL fLock); +#endif /* !INCL_SAADEFS */ +BOOL APIENTRY WinQueryUpdateRect(HWND hwnd, PRECTL prcl); +SHORT APIENTRY WinQueryUpdateRegion(HWND hwnd, HRGN hrgn); +SHORT APIENTRY WinExcludeUpdateRegion(HPS hps, HWND hwnd); + +#endif /* INCL_WINWINDOWMGR */ + +#if (defined(INCL_WINMESSAGEMGR) || !defined(INCL_NOCOMMON)) + +/* QMSG structure */ + +typedef struct _QMSG { /* qmsg */ + HWND hwnd; + USHORT msg; + MPARAM mp1; + MPARAM mp2; + ULONG time; + POINTL ptl; +} QMSG; +typedef QMSG FAR *PQMSG; + +typedef LHANDLE HMQ; /* hmq */ + +/* +** This is the standard function definition for window procedures. +** Typically they are names like "XxxxxxxxWndProc", where the prefix +** "Xxxxxxxxx" is replaced by some name descriptive of the window procedure +** being declared. Window procedures must be EXPORTED in the definitions +** file used by the linker. +** +** MRESULT EXPENTRY MyclassWndProc(HWND hwnd, ** window handle ** +** USHORT msg, ** message number ** +** MPARAM mp1, ** 1st (packed) parms ** +** MPARAM mp2); ** 2nd (packed) parms ** +*/ + +/* Standard Window Messages */ + +#define WM_NULL 0x0000 +#define WM_CREATE 0x0001 +#define WM_DESTROY 0x0002 + +#ifndef INCL_SAADEFS +#define WM_OTHERWINDOWDESTROYED 0x0003 +#endif /* !INCL_SAADEFS */ + +#define WM_ENABLE 0x0004 +#define WM_SHOW 0x0005 +#define WM_MOVE 0x0006 +#define WM_SIZE 0x0007 +#define WM_ADJUSTWINDOWPOS 0x0008 + +#define WM_CALCVALIDRECTS 0x0009 + +#define WM_SETWINDOWPARAMS 0x000a +#define WM_QUERYWINDOWPARAMS 0x000b +#define WM_HITTEST 0x000c +#define WM_ACTIVATE 0x000d +#define WM_SETFOCUS 0x000f +#define WM_SETSELECTION 0x0010 + +/* language support Winproc */ +#define WM_PPAINT 0x0011 +#define WM_PSETFOCUS 0x0012 +#define WM_PSYSCOLORCHANGE 0x0013 +#define WM_PSIZE 0x0014 +#define WM_PACTIVATE 0x0015 +#define WM_PCONTROL 0x0016 + + +#define WM_COMMAND 0x0020 +#define WM_SYSCOMMAND 0x0021 +#define WM_HELP 0x0022 +#define WM_PAINT 0x0023 + +#ifndef INCL_SAADEFS +#define WM_TIMER 0x0024 +#define WM_SEM1 0x0025 +#define WM_SEM2 0x0026 +#define WM_SEM3 0x0027 +#define WM_SEM4 0x0028 +#endif /* !INCL_SAADEFS */ + +#define WM_CLOSE 0x0029 +#define WM_QUIT 0x002a +#define WM_SYSCOLORCHANGE 0x002b +#define WM_SYSVALUECHANGED 0x002d +#define WM_APPTERMINATENOTIFY 0x002e +#define WM_PRESPARAMCHANGED 0x002f + +/* Control notification messages */ + +#define WM_CONTROL 0x0030 +#define WM_VSCROLL 0x0031 +#define WM_HSCROLL 0x0032 +#define WM_INITMENU 0x0033 +#define WM_MENUSELECT 0x0034 +#define WM_MENUEND 0x0035 +#define WM_DRAWITEM 0x0036 +#define WM_MEASUREITEM 0x0037 +#define WM_CONTROLPOINTER 0x0038 +#define WM_CONTROLHEAP 0x0039 +#define WM_QUERYDLGCODE 0x003a +#define WM_INITDLG 0x003b +#define WM_SUBSTITUTESTRING 0x003c +#define WM_MATCHMNEMONIC 0x003d +#define WM_SAVEAPPLICATION 0x003e + +/* Reserve a range of messages for help manager. This range includes */ +/* public messages, defined below, and private ones, which need to be */ +/* reserved here to prevent clashing with application messages */ + +#define WM_HELPBASE 0x0F00 /* Start of msgs for help manager */ +#define WM_HELPTOP 0x0FFF /* End of msgs for help manager */ + +#define WM_USER 0x1000 + +/* WM_COMMAND msg source codes */ + +#define CMDSRC_PUSHBUTTON 1 +#define CMDSRC_MENU 2 +#define CMDSRC_ACCELERATOR 3 +#define CMDSRC_OTHER 0 + +/* + * The following structure and macro are used to access the + * WM_COMMAND, WM_HELP, and WM_SYSCOMMAND message parameters: + */ +typedef struct _COMMANDMSG { /* commandmsg */ + USHORT source; /* mp2 */ + BOOL fMouse; + USHORT cmd; /* mp1 */ + USHORT unused; +} CMDMSG; + +#define COMMANDMSG(pmsg) \ + ((struct _COMMANDMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) + +/* + * The following structure is used by the WinQueryQueueInfo() routine + */ +typedef struct _MQINFO { /* mqi */ + USHORT cb; + PID pid; + TID tid; + USHORT cmsgs; + PVOID pReserved; +} MQINFO; +typedef MQINFO FAR *PMQINFO; + + +MRESULT APIENTRY WinSendMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2); +HMQ APIENTRY WinCreateMsgQueue(HAB hab, SHORT cmsg); +BOOL APIENTRY WinDestroyMsgQueue(HMQ hmq); +BOOL APIENTRY WinQueryQueueInfo(HMQ hmq, PMQINFO pmqi, USHORT cbCopy); + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinCancelShutdown(HMQ hmq, BOOL fCancelAlways); +#endif /* INCL_SAADEFS */ + +BOOL APIENTRY WinGetMsg(HAB hab, PQMSG pqmsg, HWND hwndFilter, + USHORT msgFilterFirst, USHORT msgFilterLast); +BOOL APIENTRY WinPeekMsg(HAB hab, PQMSG pqmsg, HWND hwndFilter, + USHORT msgFilterFirst, USHORT msgFilterLast, + USHORT fs); + +MRESULT APIENTRY WinDispatchMsg(HAB hab, PQMSG pqmsg); + +BOOL APIENTRY WinPostMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2); +BOOL APIENTRY WinRegisterUserMsg(HAB hab, USHORT msgid, SHORT datatype1, + SHORT dir1, SHORT datatype2, SHORT dir2, + SHORT datatyper); +BOOL APIENTRY WinRegisterUserDatatype(HAB hab, SHORT datatype, + SHORT count, PSHORT types); +BOOL APIENTRY WinSetMsgMode(HAB hab, PSZ classname, + SHORT control); +BOOL APIENTRY WinSetSynchroMode(HAB hab, SHORT mode); + +/* WinPeekMsg() constants */ + +#define PM_REMOVE 0x0001 +#define PM_NOREMOVE 0x0000 + +/* WinRegisterUserDatatype datatypes defined in separate file */ +#ifdef INCL_WINTYPES + #include <pmtypes.h> +#endif /*INCL_WINTYPES*/ + +/* WinRegisterUserMsg direction codes */ + +#define RUM_IN 1 +#define RUM_OUT 2 +#define RUM_INOUT 3 + +/* WinSetMsgMode constants */ + +#define SMD_DELAYED 0x0001 +#define SMD_IMMEDIATE 0x0002 + +/* WinSetSynchroMode constants */ + +#define SSM_SYNCHRONOUS 0x0001 +#define SSM_ASYNCHRONOUS 0x0002 +#define SSM_MIXED 0x0003 + +#endif /* WINMESSAGEMGR || !INCL_NOCOMMON */ + +#ifdef INCL_WINMESSAGEMGR + +/* WM_CALCVALIDRECTS return flags */ + +#define CVR_ALIGNLEFT 0x0001 +#define CVR_ALIGNBOTTOM 0x0002 +#define CVR_ALIGNRIGHT 0x0004 +#define CVR_ALIGNTOP 0x0008 +#define CVR_REDRAW 0x0010 + + +/* WM_HITTEST return codes */ + +#define HT_NORMAL 0 +#define HT_TRANSPARENT (-1) +#define HT_DISCARD (-2) +#define HT_ERROR (-3) + + +/* WM_SET/QUERYWINDOWPARAMS structures and flags */ + +typedef struct _WNDPARAMS { /* wprm */ + USHORT fsStatus; + USHORT cchText; + PSZ pszText; + USHORT cbPresParams; + PVOID pPresParams; + USHORT cbCtlData; + PVOID pCtlData; +} WNDPARAMS; +typedef WNDPARAMS FAR *PWNDPARAMS; + +/* Flags used by WM_SET/QUERYWINDOWPARAMS */ + +#define WPM_TEXT 0x0001 +#define WPM_CTLDATA 0x0002 +#define WPM_PRESPARAMS 0x0004 +#define WPM_CCHTEXT 0x0008 +#define WPM_CBCTLDATA 0x0010 +#define WPM_CBPRESPARAMS 0x0020 + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinInSendMsg(HAB hab); + +#endif /* INCL_SAADEFS */ + +BOOL APIENTRY WinBroadcastMsg(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2, + USHORT rgf); + +/* WinBroadcastMsg codes */ + +#define BMSG_POST 0x0000 +#define BMSG_SEND 0x0001 +#define BMSG_POSTQUEUE 0x0002 +#define BMSG_DESCENDANTS 0x0004 +#define BMSG_FRAMEONLY 0x0008 + + + +BOOL APIENTRY WinWaitMsg(HAB hab, USHORT msgFirst, USHORT msgLast); + +#ifndef INCL_SAADEFS +ULONG APIENTRY WinQueryQueueStatus(HWND hwndDesktop); + +/* WinQueryQueueStatus() constants */ + +#define QS_KEY 0x0001 +#define QS_MOUSEBUTTON 0x0002 +#define QS_MOUSEMOVE 0x0004 +#define QS_MOUSE 0x0006 /* QS_MOUSEMOVE|QS_MOUSEBUTTON */ +#define QS_TIMER 0x0008 +#define QS_PAINT 0x0010 +#define QS_POSTMSG 0x0020 +#define QS_SEM1 0x0040 +#define QS_SEM2 0x0080 +#define QS_SEM3 0x0100 +#define QS_SEM4 0x0200 +#define QS_SENDMSG 0x0400 + + +BOOL APIENTRY WinQueryMsgPos(HAB hab, PPOINTL pptl); +ULONG APIENTRY WinQueryMsgTime(HAB hab); + +USHORT APIENTRY WinMsgSemWait(HSEM hsem, LONG dtTimeout); +USHORT APIENTRY WinMsgMuxSemWait(PUSHORT pisemCleared, PVOID pmxsl, + LONG dtTimeout); +#endif /* !INCL_SAADEFS */ +BOOL APIENTRY WinPostQueueMsg(HMQ hmq, USHORT msg, MPARAM mp1, MPARAM mp2); + + +/* WinSetMsgInterest()/WinSetClassMsgInterest() constants */ +#define SMIM_ALL 0x0EFF +#define SMI_NOINTEREST 0x0001 +#define SMI_INTEREST 0x0002 +#define SMI_RESET 0x0004 +#define SMI_AUTODISPATCH 0x0008 + +BOOL APIENTRY WinSetMsgInterest(HWND hwnd, USHORT msg_class, SHORT control); +BOOL APIENTRY WinSetClassMsgInterest(HAB hab, PSZ pszClassName, + USHORT msg_class, SHORT control); + +#endif /* INCL_WINMESSAGEMGR */ + +/*** Keyboard and mouse */ + +#if (defined(INCL_WININPUT) || !defined(INCL_NOCOMMON)) + +/*** Keyboard and mouse input COMMON subsection */ +BOOL APIENTRY WinSetFocus(HWND hwndDesktop, HWND hwndSetFocus); +BOOL APIENTRY WinFocusChange(HWND hwndDesktop, HWND hwndSetFocus, + USHORT fsFocusChange); + +#define FC_NOSETFOCUS 0x0001 +#define FC_NOBRINGTOTOP FC_NOSETFOCUS +#define FC_NOLOSEFOCUS 0x0002 +#define FC_NOBRINGTOPFIRSTWINDOW FC_NOLOSEFOCUS +#define FC_NOSETACTIVEFOCUS 0x0003 +#define FC_NOSETACTIVE 0x0004 +#define FC_NOLOSEACTIVE 0x0008 +#define FC_NOSETSELECTION 0x0010 +#define FC_NOLOSESELECTION 0x0020 + +#define QFC_NEXTINCHAIN 0x0001 +#define QFC_ACTIVE 0x0002 +#define QFC_FRAME 0x0003 +#define QFC_SELECTACTIVE 0x0004 + +#endif /* Keyboard and mouse input COMMON subsection */ + +#ifdef INCL_WININPUT + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinSetCapture(HWND hwndDesktop, HWND hwnd); +#endif /* !INCL_SAADEFS */ +HWND APIENTRY WinQueryCapture(HWND hwndDesktop, BOOL fLock); + +/* Mouse input messages */ + +#ifndef INCL_SAADEFS +#define WM_MOUSEFIRST 0x0070 +#define WM_MOUSELAST 0x0079 +#define WM_BUTTONCLICKFIRST 0x0071 +#define WM_BUTTONCLICKLAST 0x0079 +#endif /* !INCL_SAADEFS */ +#define WM_MOUSEMOVE 0x0070 + +#define WM_BUTTON1DOWN 0x0071 + +#define WM_BUTTON1UP 0x0072 +#define WM_BUTTON1DBLCLK 0x0073 +#define WM_BUTTON2DOWN 0x0074 +#define WM_BUTTON2UP 0x0075 +#define WM_BUTTON2DBLCLK 0x0076 +#ifndef INCL_SAADEFS +#define WM_BUTTON3DOWN 0x0077 +#define WM_BUTTON3UP 0x0078 +#define WM_BUTTON3DBLCLK 0x0079 +#endif /* !INCL_SAADEFS */ + +HWND APIENTRY WinQueryFocus(HWND hwndDesktop, BOOL fLock); + + +/* Key/Character input messages */ + +#define WM_CHAR 0x007a +#define WM_VIOCHAR 0x007b + +/* WM_CHAR fs field bits */ + +#define KC_CHAR 0x0001 +#define KC_VIRTUALKEY 0x0002 +#define KC_SCANCODE 0x0004 + +#define KC_SHIFT 0x0008 +#define KC_CTRL 0x0010 +#define KC_ALT 0x0020 +#define KC_KEYUP 0x0040 +#define KC_PREVDOWN 0x0080 +#define KC_LONEKEY 0x0100 +#define KC_DEADKEY 0x0200 +#define KC_COMPOSITE 0x0400 +#define KC_INVALIDCOMP 0x0800 + +#ifndef INCL_SAADEFS +#define KC_TOGGLE 0x1000 +#define KC_INVALIDCHAR 0x2000 +#define KC_DBCSRSRVD1 0x4000 +#define KC_DBCSRSRVD2 0x8000 +#endif /* !INCL_SAADEFS */ + +/* + * The following structure and macro are used to access the + * WM_MOUSEMOVE, and WM_BUTTON message parameters + */ +typedef struct _MOUSEMSG { /* mousemsg */ + USHORT codeHitTest; /* mp2 */ + USHORT unused; + SHORT x; /* mp1 */ + SHORT y; +} MSEMSG; + +#define MOUSEMSG(pmsg) \ + ((struct _MOUSEMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) + +/* + * The following structure and macro are used to access the + * WM_CHAR message parameters. + */ +typedef struct _CHARMSG { /* charmsg */ + USHORT chr; /* mp2 */ + USHORT vkey; + USHORT fs; /* mp1 */ + UCHAR cRepeat; + UCHAR scancode; +} CHRMSG; + +#define CHARMSG(pmsg) \ + ((struct _CHARMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2)) + +/*** Virtual key values */ + +#define VK_BUTTON1 0x01 +#define VK_BUTTON2 0x02 +#define VK_BUTTON3 0x03 +#define VK_BREAK 0x04 +#define VK_BACKSPACE 0x05 +#define VK_TAB 0x06 +#define VK_BACKTAB 0x07 +#define VK_NEWLINE 0x08 +#define VK_SHIFT 0x09 +#define VK_CTRL 0x0A +#define VK_ALT 0x0B +#define VK_ALTGRAF 0x0C +#define VK_PAUSE 0x0D +#define VK_CAPSLOCK 0x0E +#define VK_ESC 0x0F +#define VK_SPACE 0x10 +#define VK_PAGEUP 0x11 +#define VK_PAGEDOWN 0x12 +#define VK_END 0x13 +#define VK_HOME 0x14 +#define VK_LEFT 0x15 +#define VK_UP 0x16 +#define VK_RIGHT 0x17 +#define VK_DOWN 0x18 +#define VK_PRINTSCRN 0x19 +#define VK_INSERT 0x1A +#define VK_DELETE 0x1B +#define VK_SCRLLOCK 0x1C +#define VK_NUMLOCK 0x1D +#define VK_ENTER 0x1E +#define VK_SYSRQ 0x1F +#define VK_F1 0x20 +#define VK_F2 0x21 +#define VK_F3 0x22 +#define VK_F4 0x23 +#define VK_F5 0x24 +#define VK_F6 0x25 +#define VK_F7 0x26 +#define VK_F8 0x27 +#define VK_F9 0x28 +#define VK_F10 0x29 +#define VK_F11 0x2A +#define VK_F12 0x2B +#define VK_F13 0x2C +#define VK_F14 0x2D +#define VK_F15 0x2E +#define VK_F16 0x2F +#define VK_F17 0x30 +#define VK_F18 0x31 +#define VK_F19 0x32 +#define VK_F20 0x33 +#define VK_F21 0x34 +#define VK_F22 0x35 +#define VK_F23 0x36 +#define VK_F24 0x37 + + +#define VK_MENU VK_F10 +#ifdef INCL_NLS +#define VK_DBCSFIRST 0x0080 +#define VK_DBCSLAST 0x00ff +#endif /* INCL_NLS */ + +#define VK_USERFIRST 0x0100 +#define VK_USERLAST 0x01ff + +#ifndef INCL_SAADEFS + +SHORT APIENTRY WinGetKeyState(HWND hwndDesktop, SHORT vkey); +SHORT APIENTRY WinGetPhysKeyState(HWND hwndDesktop, SHORT sc); +BOOL APIENTRY WinEnablePhysInput(HWND hwndDesktop, BOOL fEnable); +BOOL APIENTRY WinIsPhysInputEnabled(HWND hwndDesktop); +BOOL APIENTRY WinSetKeyboardStateTable(HWND hwndDesktop, + PBYTE pKeyStateTable, BOOL fSet); + + +/* Journal Notification messages */ +#define WM_JOURNALNOTIFY 0x007c + +/*** Define the valid commands (lParm1) for journal notify message */ +#define JRN_QUEUESTATUS 0x00000001L +#define JRN_PHYSKEYSTATE 0x00000002L + +#endif /* !INCL_SAADEFS */ +#endif /* INCL_WININPUT */ + + +/**** Dialog Manager */ + +#if (defined(INCL_WINDIALOGS) || !defined(INCL_NOCOMMON)) +/**** Dialog Manager COMMON subsection */ + +/* +** This is the standard function definition for dialog procedures. +** Typically they are names like "XxxxxxxxDlgProc", where the prefix +** "Xxxxxxxxx" is replaced by some name descriptive of the dialog procedure +** being declared. Dialog procedures must be EXPORTED in the definitions +** file used by the linker. The dialog procedure declaration is identical +** to that for window procedures. +** +** MRESULT EXPENTRY MydialogDlgProc(HWND hwnd, ** window handle ** +** USHORT msg, ** message number ** +** MPARAM mp1, ** 1st (packed) parms ** +** MPARAM mp2); ** 2nd (packed) parms ** +*/ + +BOOL APIENTRY WinGetDlgMsg(HWND hwndDlg, PQMSG pqmsg); + + +HWND APIENTRY WinLoadDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + HMODULE hmod, USHORT idDlg, PVOID pCreateParams); +USHORT APIENTRY WinDlgBox(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + HMODULE hmod, USHORT idDlg, PVOID pCreateParams); + +BOOL APIENTRY WinDismissDlg(HWND hwndDlg, USHORT usResult); + +BOOL APIENTRY WinQueryDlgItemShort(HWND hwndDlg, USHORT idItem, + PSHORT pResult, BOOL fSigned); +BOOL APIENTRY WinSetDlgItemShort(HWND hwndDlg, USHORT idItem, + USHORT usValue, BOOL fSigned); +BOOL APIENTRY WinSetDlgItemText(HWND hwndDlg, USHORT idItem, PSZ pszText); +USHORT APIENTRY WinQueryDlgItemText(HWND hwndDlg, USHORT idItem, + SHORT cchBufferMax, PSZ pchBuffer); +SHORT APIENTRY WinQueryDlgItemTextLength(HWND hwndDlg, USHORT idItem); + +MRESULT APIENTRY WinDefDlgProc(HWND hwndDlg, USHORT msg, MPARAM mp1, + MPARAM mp2); + +/* Special item IDs */ + +#ifndef INCL_SAADEFS +#define DID_OK 1 +#define DID_CANCEL 2 +#define DID_ERROR 0xffff +#endif /* !INCL_SAADEFS */ + +BOOL APIENTRY WinAlarm(HWND hwndDesktop, USHORT rgfType); + +/* WinAlarm Codes */ + +#define WA_WARNING 0 +#define WA_NOTE 1 +#define WA_ERROR 2 +#define WA_CWINALARMS 3 + +USHORT APIENTRY WinMessageBox(HWND hwndParent, HWND hwndOwner, PSZ pszText, + PSZ pszCaption, USHORT idWindow, USHORT flStyle); + +/* Message box types */ + +#define MB_OK 0x0000 +#define MB_OKCANCEL 0x0001 +#define MB_RETRYCANCEL 0x0002 +#define MB_ABORTRETRYIGNORE 0x0003 +#define MB_YESNO 0x0004 +#define MB_YESNOCANCEL 0x0005 +#define MB_CANCEL 0x0006 +#define MB_ENTER 0x0007 +#define MB_ENTERCANCEL 0x0008 + +#define MB_NOICON 0x0000 +#define MB_CUANOTIFICATION 0x0000 +#define MB_ICONQUESTION 0x0010 +#define MB_ICONEXCLAMATION 0x0020 +#define MB_CUAWARNING 0x0020 +#define MB_ICONASTERISK 0x0030 +#define MB_ICONHAND 0x0040 +#define MB_CUACRITICAL 0x0040 +#define MB_QUERY MB_ICONQUESTION +#define MB_WARNING MB_CUAWARNING +#define MB_INFORMATION MB_ICONASTERISK +#define MB_CRITICAL MB_CUACRITICAL +#define MB_ERROR MB_CRITICAL + +#define MB_DEFBUTTON1 0x0000 +#define MB_DEFBUTTON2 0x0100 +#define MB_DEFBUTTON3 0x0200 + +#define MB_APPLMODAL 0x0000 +#define MB_SYSTEMMODAL 0x1000 +#define MB_HELP 0x2000 +#define MB_MOVEABLE 0x4000 + + +/* Message box return codes */ + +#define MBID_OK 1 +#define MBID_CANCEL 2 +#define MBID_ABORT 3 +#define MBID_RETRY 4 +#define MBID_IGNORE 5 +#define MBID_YES 6 +#define MBID_NO 7 +#define MBID_HELP 8 +#define MBID_ENTER 9 +#define MBID_ERROR 0xffff + +#endif /* Dialog Manager COMMON subsection */ + + +#ifdef INCL_WINDIALOGS + +/* Dialog codes: returned by WM_QUERYDLGCODE msg */ + +#define DLGC_ENTRYFIELD 0x0001 /* Entry field item understands EM_SETSEL) */ +#define DLGC_BUTTON 0x0002 /* Button item */ +#define DLGC_RADIOBUTTON 0x0004 /* Radio button */ +#define DLGC_STATIC 0x0008 /* Static item */ +#define DLGC_DEFAULT 0x0010 /* Default push button */ +#define DLGC_PUSHBUTTON 0x0020 /* Normal (Non-default) push button */ +#define DLGC_CHECKBOX 0x0040 /* Check box button control */ +#define DLGC_SCROLLBAR 0x0080 /* Scroll bar */ +#define DLGC_MENU 0x0100 /* Menu */ +#define DLGC_TABONCLICK 0x0200 +#define DLGC_MLE 0x0400 /* Multiple Line Entry */ + + +USHORT APIENTRY WinProcessDlg(HWND hwndDlg); +USHORT APIENTRY WinStartDlg(HWND hwndDlg); +MRESULT APIENTRY WinSendDlgItemMsg(HWND hwndDlg, USHORT idItem, USHORT msg, + MPARAM mp1, MPARAM mp2); +BOOL APIENTRY WinMapDlgPoints(HWND hwndDlg, PPOINTL prgwptl, USHORT cwpt, + BOOL fCalcWindowCoords); +HWND APIENTRY WinEnumDlgItem(HWND hwndDlg, HWND hwnd, USHORT code, + BOOL fLock); +SHORT APIENTRY WinSubstituteStrings(HWND hwnd, PSZ pszSrc, SHORT cchDstMax, + PSZ pszDst); + +/* WinEnumDlgItem() constants + * + * In OS/2 1.2, WinEnumDlgItem() can enumerate a window such that the + * selection cursor may be moved according to CUA (Common User Access) + * rules. + */ + +#define EDI_FIRSTTABITEM 0 +#define EDI_LASTTABITEM 1 +#define EDI_NEXTTABITEM 2 +#define EDI_PREVTABITEM 3 +#define EDI_FIRSTGROUPITEM 4 +#define EDI_LASTGROUPITEM 5 +#define EDI_NEXTGROUPITEM 6 +#define EDI_PREVGROUPITEM 7 + +/*** Dialog template definitions */ + +/* Variable-sized dialog template items: */ + +typedef struct _DLGTITEM { /* dlgti */ + USHORT fsItemStatus; + USHORT cChildren; + USHORT cchClassName; + USHORT offClassName; + USHORT cchText; + USHORT offText; + ULONG flStyle; + SHORT x; + SHORT y; + SHORT cx; + SHORT cy; + USHORT id; + USHORT offPresParams; + USHORT offCtlData; +} DLGTITEM; +typedef DLGTITEM FAR *PDLGTITEM; + +/* Dialog Template structure */ + +typedef struct _DLGTEMPLATE { /* dlgt */ + USHORT cbTemplate; + USHORT type; + USHORT codepage; + USHORT offadlgti; + USHORT fsTemplateStatus; + USHORT iItemFocus; + USHORT coffPresParams; + DLGTITEM adlgti[1]; +} DLGTEMPLATE; +typedef DLGTEMPLATE FAR *PDLGTEMPLATE; + +HWND APIENTRY WinCreateDlg(HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + PDLGTEMPLATE pdlgt, PVOID pCreateParams); + + +#endif /* INCL_WINDIALOGS */ + + +#ifdef INCL_WINSTATICS + +/*** Static Control Manager */ + +/* Static control styles: + * + * NOTE: the top 9 bits of the LOWORD of the window flStyle are used for + * DT_* flags. The lower 7 bits are for SS_* styles. This gives us up + * to 128 distinct static control types (we currently use 11 of them). + */ +#define SS_TEXT 0x0001L +#define SS_GROUPBOX 0x0002L + +#ifndef INCL_SAADEFS +#define SS_ICON 0x0003L +#define SS_BITMAP 0x0004L +#endif /* !INCL_SAADEFS */ +#define SS_FGNDRECT 0x0005L +#ifndef INCL_SAADEFS +#define SS_HALFTONERECT 0x0006L +#endif /* !INCL_SAADEFS */ +#define SS_BKGNDRECT 0x0007L +#define SS_FGNDFRAME 0x0008L +#ifndef INCL_SAADEFS +#define SS_HALFTONEFRAME 0x0009L +#endif /* !INCL_SAADEFS */ +#define SS_BKGNDFRAME 0x000aL +#define SS_SYSICON 0x000bL + +/* Static control class name */ + +#define WC_STATIC ((PSZ)0xffff0005L) + +/* Static control messages */ + +#define SM_SETHANDLE 0x0100 +#define SM_QUERYHANDLE 0x0101 + +#endif /* INCL_WINSTATICS */ + + +#ifdef INCL_WINBUTTONS +/**** Button Controls Subsection */ + +/* Button control styles */ + +#define BS_PUSHBUTTON 0L +#define BS_CHECKBOX 1L +#define BS_AUTOCHECKBOX 2L +#define BS_RADIOBUTTON 3L +#define BS_AUTORADIOBUTTON 4L +#define BS_3STATE 5L +#define BS_AUTO3STATE 6L + +#ifndef INCL_SAADEFS +#define BS_USERBUTTON 7L +#endif /* !INCL_SAADEFS */ + +#define BS_HELP 0x0100L +#define BS_SYSCOMMAND 0x0200L +#define BS_DEFAULT 0x0400L +#define BS_NOPOINTERFOCUS 0x0800L +#define BS_NOBORDER 0x1000L +#define BS_NOCURSORSELECT 0x2000L + + +/* Button class name */ + +#define WC_BUTTON ((PSZ)0xffff0003L) + + +#ifndef INCL_SAADEFS +typedef struct _BTNCDATA { /* btncd */ + USHORT cb; + USHORT fsCheckState; + USHORT fsHiliteState; +} BTNCDATA; +typedef BTNCDATA FAR *PBTNCDATA; +#endif /* !INCL_SAADEFS */ + +/* User button structure (passed in WM_CONTROL msg) */ + +#ifndef INCL_SAADEFS +typedef struct _USERBUTTON { /* ubtn */ + HWND hwnd; + HPS hps; + USHORT fsState; + USHORT fsStateOld; +} USERBUTTON; +typedef USERBUTTON FAR *PUSERBUTTON; +#endif /* !INCL_SAADEFS */ + +/* Button control messages */ + +#define BM_CLICK 0x0120 +#define BM_QUERYCHECKINDEX 0x0121 +#define BM_QUERYHILITE 0x0122 +#define BM_SETHILITE 0x0123 +#define BM_QUERYCHECK 0x0124 +#define BM_SETCHECK 0x0125 +#define BM_SETDEFAULT 0x0126 + +/* Button notification codes */ + +#define BN_CLICKED 1 +#define BN_DBLCLICKED 2 +#define BN_PAINT 3 + +/* BN_PAINT button draw state codes (must be in high byte) */ + +#ifndef INCL_SAADEFS +#define BDS_HILITED 0x0100 +#define BDS_DISABLED 0x0200 +#define BDS_DEFAULT 0x0400 + +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINBUTTONS */ + + +#ifdef INCL_WINENTRYFIELDS +/**** Entryfield controls Subsection */ + +/* Entry field styles */ + +#define ES_LEFT 0x00000000L +#define ES_CENTER 0x00000001L +#define ES_RIGHT 0x00000002L + +#ifndef INCL_SAADEFS +#define ES_AUTOSCROLL 0x00000004L +#endif /* !INCL_SAADEFS */ + +#define ES_MARGIN 0x00000008L +#define ES_AUTOTAB 0x00000010L +#define ES_READONLY 0x00000020L +#define ES_COMMAND 0x00000040L +#define ES_UNREADABLE 0x00000080L +#define ES_PICTUREMASK 0x00000100L + +#ifdef INCL_NLS +#define ES_ANY 0x00000000L +#define ES_SBCS 0x00001000L +#define ES_DBCS 0x00002000L +#define ES_MIXED 0x00003000L /* ES_SBCS | ES_DBCS */ +#endif /* INCL_NLS */ + +#define WC_COMBOBOX ((PSZ)0xffff0002L) + +/* + * combo box styles + */ +#define CBS_SIMPLE 0x0001L +#define CBS_DROPDOWN 0x0002L +#define CBS_DROPDOWNLIST 0x0004L + +/* + *IDs of combobox entry field and listbox. + */ +#define CBID_LIST 0x029A +#define CBID_EDIT 0x029B + +#define CBM_SHOWLIST 0x0170 +#define CBM_HILITE 0x0171 +#define CBM_ISLISTSHOWING 0x0172 + +#define CBN_EFCHANGE 1 +#define CBN_EFSCROLL 2 +#define CBN_MEMERROR 3 +#define CBN_LBSELECT 4 +#define CBN_LBSCROLL 5 +#define CBN_SHOWLIST 6 +#define CBN_ENTER 7 + +#define WC_ENTRYFIELD ((PSZ)0xffff0006L) + +#ifndef INCL_SAADEFS +typedef struct _ENTRYFDATA { /* efd */ + USHORT cb; + USHORT cchEditLimit; + USHORT ichMinSel; + USHORT ichMaxSel; +} ENTRYFDATA; +typedef ENTRYFDATA FAR *PENTRYFDATA; + +#endif /* !INCL_SAADEFS */ + +/* Entry Field messages */ + +#define EM_QUERYCHANGED 0x0140 +#define EM_QUERYSEL 0x0141 +#define EM_SETSEL 0x0142 +#define EM_SETTEXTLIMIT 0x0143 + +#ifndef INCL_SAADEFS +#define EM_CUT 0x0144 +#define EM_COPY 0x0145 +#endif /* !INCL_SAADEFS */ +#define EM_CLEAR 0x0146 +#ifndef INCL_SAADEFS +#define EM_PASTE 0x0147 +#endif /* !INCL_SAADEFS */ +#define EM_QUERYFIRSTCHAR 0x0148 +#define EM_SETFIRSTCHAR 0x0149 +#ifndef INCL_SAADEFS +#define EM_QUERYREADONLY 0x014a +#define EM_SETREADONLY 0x014b +#define EM_SETINSERTMODE 0x014c +#endif /* !INCL_SAADEFS */ + +/* Entry Field notification messages */ + +#define EN_SETFOCUS 0x0001 +#define EN_KILLFOCUS 0x0002 +#define EN_CHANGE 0x0004 +#define EN_SCROLL 0x0008 +#ifndef INCL_SAADEFS +#define EN_MEMERROR 0x0010 +#define EN_OVERFLOW 0x0020 +#define EN_INSERTMODETOGGLE 0x0040 +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINENTRYFIELDS */ + + +/* Multiple Line Entrys */ +#ifdef INCL_WINMLE +#define WC_MLE ((PSZ)0xffff000aL) +#include <pmmle.h> +#endif /* !INCL_WINMLE */ + + +#ifdef INCL_WINLISTBOXES + +/**** Listboxes */ + +/* List box styles */ + +#define LS_MULTIPLESEL 0x00000001L + +#ifndef INCL_SAADEFS +#define LS_OWNERDRAW 0x00000002L +#endif /* !INCL_SAADEFS */ + +#define LS_NOADJUSTPOS 0x00000004L +#define LS_HORZSCROLL 0x00000008L + + +/* Listbox class name */ + +#define WC_LISTBOX ((PSZ)0xffff0007L) + +/* List box notification messages */ + +#define LN_SELECT 1 +#define LN_SETFOCUS 2 +#define LN_KILLFOCUS 3 +#define LN_SCROLL 4 +#define LN_ENTER 5 + +/* List box messages */ + +#define LM_QUERYITEMCOUNT 0x0160 +#define LM_INSERTITEM 0x0161 +#define LM_SETTOPINDEX 0x0162 +#define LM_DELETEITEM 0x0163 +#define LM_SELECTITEM 0x0164 +#define LM_QUERYSELECTION 0x0165 +#define LM_SETITEMTEXT 0x0166 +#define LM_QUERYITEMTEXTLENGTH 0x0167 +#define LM_QUERYITEMTEXT 0x0168 + +#define LM_SETITEMHANDLE 0x0169 +#define LM_QUERYITEMHANDLE 0x016a +#define LM_SEARCHSTRING 0x016b +#define LM_SETITEMHEIGHT 0x016c +#define LM_QUERYTOPINDEX 0x016d +#define LM_DELETEALL 0x016e + +/* List box constants */ + +#define LIT_ERROR (-3) +#define LIT_MEMERROR (-2) +#define LIT_NONE (-1) +#define LIT_FIRST (-1) + +/* For LM_INSERTITEM msg */ + +#define LIT_END (-1) +#define LIT_SORTASCENDING (-2) +#define LIT_SORTDESCENDING (-3) + +/* For LM_SEARCHSTRING msg */ + +#define LSS_SUBSTRING 0x0001 +#define LSS_PREFIX 0x0002 +#define LSS_CASESENSITIVE 0x0004 + + +#endif /* INCL_WINLISTBOXES */ + + +#ifdef INCL_WINMENUS + +/**** Menu Manager Subsection */ + +/* Menu control styles */ + +#define MS_ACTIONBAR 0x00000001L +#define MS_TITLEBUTTON 0x00000002L +#define MS_VERTICALFLIP 0x00000004L + +HWND APIENTRY WinLoadMenu(HWND hwndFrame, HMODULE hmod, USHORT idMenu); + +/* Menu class name */ + +#define WC_MENU ((PSZ)0xffff0004L) + +/* Menu control messages */ + +#define MM_INSERTITEM 0x0180 +#define MM_DELETEITEM 0x0181 +#define MM_QUERYITEM 0x0182 +#define MM_SETITEM 0x0183 +#define MM_QUERYITEMCOUNT 0x0184 +#define MM_STARTMENUMODE 0x0185 +#define MM_ENDMENUMODE 0x0186 +#define MM_DISMISSMENU 0x0187 +#define MM_REMOVEITEM 0x0188 +#define MM_SELECTITEM 0x0189 +#define MM_QUERYSELITEMID 0x018a +#define MM_QUERYITEMTEXT 0x018b +#define MM_QUERYITEMTEXTLENGTH 0x018c +#define MM_SETITEMHANDLE 0x018d +#define MM_SETITEMTEXT 0x018e +#define MM_ITEMPOSITIONFROMID 0x018f +#define MM_ITEMIDFROMPOSITION 0x0190 +#define MM_QUERYITEMATTR 0x0191 +#define MM_SETITEMATTR 0x0192 +#define MM_ISITEMVALID 0x0193 + +HWND APIENTRY WinCreateMenu(HWND hwndParent, PVOID lpmt); + +/* Owner Item Structure (Also used for listboxes) */ + +#ifndef INCL_SAADEFS +typedef struct _OWNERITEM { /* oi */ + HWND hwnd; + HPS hps; + USHORT fsState; + USHORT fsAttribute; + USHORT fsStateOld; + USHORT fsAttributeOld; + RECTL rclItem; + SHORT idItem; /* This field contains idItem for menus, iItem for lb. */ + ULONG hItem; +} OWNERITEM; +typedef OWNERITEM FAR *POWNERITEM; +#endif /* !INCL_SAADEFS */ + +/* Menu item */ + +typedef struct _MENUITEM { /* mi */ + SHORT iPosition; + USHORT afStyle; + USHORT afAttribute; + USHORT id; + HWND hwndSubMenu; + ULONG hItem; +} MENUITEM; +typedef MENUITEM FAR *PMENUITEM; + +#define MIT_END (-1) +#define MIT_NONE (-1) +#define MIT_MEMERROR (-1) +#define MIT_ERROR (-1) +#define MID_NONE MIT_NONE +#define MID_ERROR (-1) + +/* Menu item styles & attributes */ + +#define MIS_TEXT 0x0001 + +#ifndef INCL_SAADEFS +#define MIS_BITMAP 0x0002 +#endif /* !INCL_SAADEFS */ +#define MIS_SEPARATOR 0x0004 + +#ifndef INCL_SAADEFS +#define MIS_OWNERDRAW 0x0008 +#endif /* !INCL_SAADEFS */ + +#define MIS_SUBMENU 0x0010 +#define MIS_MULTMENU 0x0020 /* multiple choice submenu */ +#define MIS_SYSCOMMAND 0x0040 +#define MIS_HELP 0x0080 +#define MIS_STATIC 0x0100 +#define MIS_BUTTONSEPARATOR 0x0200 +#define MIS_BREAK 0x0400 +#define MIS_BREAKSEPARATOR 0x0800 +#define MIS_GROUP 0x1000 /* multiple choice group start */ +/* In multiple choice submenus a style of 'single' denotes the item is a +** radiobutton. Absence of this style defaults the item to a checkbox. */ +#define MIS_SINGLE 0x2000 + +#define MIA_NODISMISS 0x0020 +#define MIA_FRAMED 0x1000 +#define MIA_CHECKED 0x2000 +#define MIA_DISABLED 0x4000 +#define MIA_HILITED 0x8000 + +#endif /* INCL_WINMENUS */ + + +#ifdef INCL_WINSCROLLBARS + +/*** Scroll Bar controls Subsection */ + +/* Scroll Bar styles */ + +#define SBS_HORZ 0L +#define SBS_VERT 1L +#define SBS_THUMBSIZE 2L +#define SBS_AUTOTRACK 4L + +/* Scroll bar class name */ + + +#define WC_SCROLLBAR ((PSZ)0xffff0008L) + +/* Scroll Bar messages */ + +#define SBM_SETSCROLLBAR 0x01a0 +#define SBM_SETPOS 0x01a1 +#define SBM_QUERYPOS 0x01a2 +#define SBM_QUERYRANGE 0x01a3 +#define SBM_SETTHUMBSIZE 0x01a6 + +/* Scroll Bar Commands */ + +#define SB_LINEUP 1 +#define SB_LINEDOWN 2 +#define SB_LINELEFT 1 +#define SB_LINERIGHT 2 +#define SB_PAGEUP 3 +#define SB_PAGEDOWN 4 +#define SB_PAGELEFT 3 +#define SB_PAGERIGHT 4 +#define SB_SLIDERTRACK 5 +#define SB_SLIDERPOSITION 6 +#define SB_ENDSCROLL 7 + + +#ifndef INCL_SAADEFS +typedef struct _SBCDATA { /* sbcd */ + USHORT cb; + USHORT sHilite; /* reserved, should be set to zero */ + SHORT posFirst; + SHORT posLast; + SHORT posThumb; + SHORT cVisible; + SHORT cTotal; +} SBCDATA; +typedef SBCDATA FAR *PSBCDATA; +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINSCROLLBARS */ + + +#if (defined(INCL_WINFRAMEMGR) || !defined(INCL_NOCOMMON)) +/*** Frame Manager Common subsection */ + +typedef struct _FRAMECDATA { /* fcdata */ + USHORT cb; + ULONG flCreateFlags; + HMODULE hmodResources; + USHORT idResources; +} FRAMECDATA; +typedef FRAMECDATA FAR *PFRAMECDATA; + +/* Frame window styles */ + +#define FCF_TITLEBAR 0x00000001L +#define FCF_SYSMENU 0x00000002L +#define FCF_MENU 0x00000004L +#define FCF_SIZEBORDER 0x00000008L +#define FCF_MINBUTTON 0x00000010L +#define FCF_MAXBUTTON 0x00000020L +#define FCF_MINMAX 0x00000030L /* minmax means BOTH buttons */ +#define FCF_VERTSCROLL 0x00000040L +#define FCF_HORZSCROLL 0x00000080L +#define FCF_DLGBORDER 0x00000100L +#define FCF_BORDER 0x00000200L +#define FCF_SHELLPOSITION 0x00000400L +#define FCF_TASKLIST 0x00000800L +#define FCF_NOBYTEALIGN 0x00001000L +#define FCF_NOMOVEWITHOWNER 0x00002000L +#define FCF_ICON 0x00004000L +#define FCF_ACCELTABLE 0x00008000L +#define FCF_SYSMODAL 0x00010000L +#define FCF_SCREENALIGN 0x00020000L +#define FCF_MOUSEALIGN 0x00040000L +/* New values to enable multiple palettes. Note that if none of the four */ +/* styles specified below are used then we default to the 'system' palette */ +#define FCF_PALETTE_NORMAL 0x00080000L /* normal palette */ +#define FCF_PALETTE_HELP 0x00100000L /* help palette */ +#define FCF_PALETTE_POPUPODD 0x00200000L /* odd level popup palette */ +#define FCF_PALETTE_POPUPEVEN 0x00400000L /* even level popup palette */ +/* FCF_ 0x00800000L is reserved */ +#ifdef INCL_NLS +#define FCF_DBE_APPSTAT 0x80000000L +#endif /* INCL_NLS */ + +/* FCF_TITLEBAR | FCF_SYSMENU | FCF_MENU | FCF_SIZEBORDER | FCF_MINMAX | + FCF_ICON | FCF_ACCELTABLE | FCF_SHELLPOSITION | FCF_TASKLIST | FCF_PALETTE_NORMAL */ +#define FCF_STANDARD 0x0008CC3FL + + +#define FS_ICON 0x00000001L +#define FS_ACCELTABLE 0x00000002L + +#ifndef INCL_SAADEFS +#define FS_SHELLPOSITION 0x00000004L +#endif /* !INCL_SAADEFS */ + +#define FS_TASKLIST 0x00000008L +#define FS_NOBYTEALIGN 0x00000010L +#define FS_NOMOVEWITHOWNER 0x00000020L +#define FS_SYSMODAL 0x00000040L +#define FS_DLGBORDER 0x00000080L +#define FS_BORDER 0x00000100L +#define FS_SCREENALIGN 0x00000200L +#define FS_MOUSEALIGN 0x00000400L +#define FS_SIZEBORDER 0x00000800L +#ifdef INCL_NLS +#define FS_DBE_APPSTAT 0x00008000L +#endif /* INCL_NLS */ + +/* FS_ICON | FS_ACCELTABLE | FS_SHELLPOSITION | FS_TASKLIST */ +#define FS_STANDARD 0x0000000FL + + +/* Frame Window Flags accessed via WinSet/QueryWindowUShort(QWS_FLAGS) */ + +#ifndef INCL_SAADEFS +#define FF_FLASHWINDOW 0x0001 +#define FF_ACTIVE 0x0002 +#define FF_FLASHHILITE 0x0004 +#define FF_OWNERHIDDEN 0x0008 +#define FF_DLGDISMISSED 0x0010 +#define FF_OWNERDISABLED 0x0020 +#define FF_SELECTED 0x0040 +#define FF_NOACTIVATESWP 0x0080 +#endif /* !INCL_SAADEFS */ + + +HWND APIENTRY WinCreateStdWindow(HWND hwndParent, ULONG flStyle, + PULONG pflCreateFlags, PSZ pszClientClass, + PSZ pszTitle, ULONG styleClient, HMODULE hmod, + USHORT idResources, PHWND phwndClient); + + +#endif /* Frame Manager Common subsection */ + + +#ifdef INCL_WINFRAMEMGR + +BOOL APIENTRY WinFlashWindow(HWND hwndFrame, BOOL fFlash); + +/* Frame window related messages */ + +#define WM_FLASHWINDOW 0x0040 +#define WM_FORMATFRAME 0x0041 +#define WM_UPDATEFRAME 0x0042 +#define WM_FOCUSCHANGE 0x0043 + +#define WM_SETBORDERSIZE 0x0044 +#define WM_TRACKFRAME 0x0045 +#define WM_MINMAXFRAME 0x0046 +#define WM_SETICON 0x0047 +#define WM_QUERYICON 0x0048 +#define WM_SETACCELTABLE 0x0049 +#define WM_QUERYACCELTABLE 0x004a +#define WM_TRANSLATEACCEL 0x004b +#define WM_QUERYTRACKINFO 0x004c +#define WM_QUERYBORDERSIZE 0x004d +#define WM_NEXTMENU 0x004e +#define WM_ERASEBACKGROUND 0x004f +#define WM_QUERYFRAMEINFO 0x0050 +/* Note 0x0051/5 are reserved */ +#define WM_QUERYFOCUSCHAIN 0x0051 +#define WM_CALCFRAMERECT 0x0053 +#define WM_WINDOWPOSCHANGED 0x0055 +#define WM_QUERYFRAMECTLCOUNT 0x0059 +#ifndef INCL_SAADEFS +/* Note 0x005A is reserved */ +#define WM_QUERYHELPINFO 0x005B +#define WM_SETHELPINFO 0x005C +#define WM_ERROR 0x005D + + +/* WM_QUERYFRAMEINFO constants */ + +#define FI_FRAME 0x00000001L +#define FI_OWNERHIDE 0x00000002L +#define FI_ACTIVATEOK 0x00000004L +#define FI_NOMOVEWITHOWNER 0x00000008L + + +#endif /* !INCL_SAADEFS */ + +/* Frame class name */ + +#define WC_FRAME ((PSZ)0xffff0001L) + +BOOL APIENTRY WinCreateFrameControls(HWND hwndFrame, PFRAMECDATA pfcdata, + PSZ pszTitle); + +BOOL APIENTRY WinCalcFrameRect(HWND hwndFrame, PRECTL prcl, BOOL fClient); + +BOOL APIENTRY WinGetMinPosition(HWND hwnd, PSWP pswp, PPOINTL pptl); +#ifndef INCL_SAADEFS +BOOL APIENTRY WinGetMaxPosition(HWND hwnd, PSWP pswp); +#endif /* !INCL_SAADEFS */ + +/* Frame control IDs */ + +#define FID_SYSMENU 0x8002 +#define FID_TITLEBAR 0x8003 +#define FID_MINMAX 0x8004 +#define FID_MENU 0x8005 +#define FID_VERTSCROLL 0x8006 +#define FID_HORZSCROLL 0x8007 +#define FID_CLIENT 0x8008 +/* Note 0x8009 is reserved */ +#define FID_DBE_APPSTAT 0x8010 +#define FID_DBE_KBDSTAT 0x8011 +#define FID_DBE_PECIC 0x8012 +#define FID_DBE_KKPOPUP 0x8013 + +/* Standard WM_SYSCOMMAND command values */ + +#define SC_SIZE 0x8000 +#define SC_MOVE 0x8001 +#define SC_MINIMIZE 0x8002 +#define SC_MAXIMIZE 0x8003 +#define SC_CLOSE 0x8004 +#define SC_NEXT 0x8005 +#define SC_APPMENU 0x8006 +#define SC_SYSMENU 0x8007 +#define SC_RESTORE 0x8008 +#define SC_NEXTFRAME 0x8009 +#define SC_NEXTWINDOW 0x8010 +#ifndef INCL_SAADEFS +#define SC_TASKMANAGER 0x8011 +#define SC_HELPKEYS 0x8012 +#define SC_HELPINDEX 0x8013 +#define SC_HELPEXTENDED 0x8014 +#define SC_SWITCHPANELIDS 0x8015 +#define SC_DBE_FIRST 0x8018 +#define SC_DBE_LAST 0x801F + +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINFRAMEMGR */ + +/*** Frame controls */ + +#ifdef INCL_WINFRAMECTLS + +/** Title bar controls */ + +/* Title bar control class name */ + +#define WC_TITLEBAR ((PSZ)0xffff0009L) + +/* Title bar control messages */ + +#define TBM_SETHILITE 0x01e3 +#define TBM_QUERYHILITE 0x01e4 +#define TBM_TRACKMOVE 0x01e5 + +#endif /* INCL_WINFRAMECTLS */ + +#ifdef INCL_WINRECTANGLES +/*** Rectangle routines */ + +BOOL APIENTRY WinCopyRect(HAB hab, PRECTL prclDst, PRECTL prclSrc); + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinSetRect(HAB hab, PRECTL prcl, SHORT xLeft, SHORT yBottom, + SHORT xRight, SHORT yTop); +BOOL APIENTRY WinIsRectEmpty(HAB hab, PRECTL prcl); +BOOL APIENTRY WinEqualRect(HAB hab, PRECTL prcl1, PRECTL prcl2); +BOOL APIENTRY WinSetRectEmpty(HAB hab, PRECTL prcl); +BOOL APIENTRY WinOffsetRect(HAB hab, PRECTL prcl, SHORT cx, SHORT cy); +BOOL APIENTRY WinInflateRect(HAB hab, PRECTL prcl, SHORT cx, SHORT cy); +BOOL APIENTRY WinPtInRect(HAB hab, PRECTL prcl, PPOINTL pptl); +BOOL APIENTRY WinIntersectRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, + PRECTL prclSrc2); +BOOL APIENTRY WinUnionRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, + PRECTL prclSrc2); +BOOL APIENTRY WinSubtractRect(HAB hab, PRECTL prclDst, PRECTL prclSrc1, + PRECTL prclSrc2); +BOOL APIENTRY WinMakeRect(HAB hab, PWRECT pwrc); +BOOL APIENTRY WinMakePoints(HAB hab, PWPOINT pwpt, USHORT cwpt); +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINRECTANGLES */ + + +#ifdef INCL_WINSYS + +/*** System values */ + +LONG APIENTRY WinQuerySysValue(HWND hwndDesktop, SHORT iSysValue); +BOOL APIENTRY WinSetSysValue(HWND hwndDesktop, SHORT iSysValue, LONG lValue); + +#define SV_SWAPBUTTON 0 +#define SV_DBLCLKTIME 1 +#define SV_CXDBLCLK 2 +#define SV_CYDBLCLK 3 +#define SV_CXSIZEBORDER 4 +#define SV_CYSIZEBORDER 5 +#define SV_ALARM 6 + +#ifndef INCL_SAADEFS +#define SV_RESERVEDFIRST1 7 +#define SV_RESERVEDLAST1 8 +#endif /* !INCL_SAADEFS */ + +#define SV_CURSORRATE 9 +#define SV_FIRSTSCROLLRATE 10 +#define SV_SCROLLRATE 11 +#define SV_NUMBEREDLISTS 12 +#define SV_WARNINGFREQ 13 +#define SV_NOTEFREQ 14 +#define SV_ERRORFREQ 15 +#define SV_WARNINGDURATION 16 +#define SV_NOTEDURATION 17 +#define SV_ERRORDURATION 18 + +#ifndef INCL_SAADEFS +#define SV_RESERVEDFIRST 19 +#define SV_RESERVEDLAST 19 +#endif /* !INCL_SAADEFS */ + +#define SV_CXSCREEN 20 +#define SV_CYSCREEN 21 +#define SV_CXVSCROLL 22 +#define SV_CYHSCROLL 23 +#define SV_CYVSCROLLARROW 24 +#define SV_CXHSCROLLARROW 25 +#define SV_CXBORDER 26 +#define SV_CYBORDER 27 +#define SV_CXDLGFRAME 28 +#define SV_CYDLGFRAME 29 +#define SV_CYTITLEBAR 30 +#define SV_CYVSLIDER 31 +#define SV_CXHSLIDER 32 +#define SV_CXMINMAXBUTTON 33 +#define SV_CYMINMAXBUTTON 34 +#define SV_CYMENU 35 +#define SV_CXFULLSCREEN 36 +#define SV_CYFULLSCREEN 37 +#define SV_CXICON 38 +#define SV_CYICON 39 +#define SV_CXPOINTER 40 +#define SV_CYPOINTER 41 + +#define SV_DEBUG 42 +#define SV_CMOUSEBUTTONS 43 +#define SV_POINTERLEVEL 44 +#define SV_CURSORLEVEL 45 +#define SV_TRACKRECTLEVEL 46 + +#ifndef INCL_SAADEFS +#define SV_CTIMERS 47 +#endif /* !INCL_SAADEFS */ + +#define SV_MOUSEPRESENT 48 + +#define SV_CXBYTEALIGN 49 +#define SV_CYBYTEALIGN 50 + +/* The following value enables any greater value to be set by WinSetSysVlaue. */ +/* Values of 51-55 are spare for extra non-settable system values */ +/* This is to enable the setting of SV_EXTRAKEYBEEP by applications. */ + +#define SV_NOTRESERVED 56 +#define SV_EXTRAKEYBEEP 57 + +/* The following system value controls whether PM controls the keyboard */ +/* lights for light key keystrokes (else applications will) */ +#define SV_SETLIGHTS 58 +#define SV_INSERTMODE 59 + + +#define SV_MENUROLLDOWNDELAY 64 +#define SV_MENUROLLUPDELAY 65 +#define SV_ALTMNEMONIC 66 +#define SV_TASKLISTMOUSEACCESS 67 +/* The following is the total number of system values */ +#define SV_CSYSVALUES 68 + +#define SV_CPOINTERBUTTONS 69 +#define SV_CXALIGN 70 +#define SV_CYALIGN 71 +#define SV_MNEMONICSENABLED 72 + +/* + * Presentation parameter structures. + */ +typedef struct _PARAM { /* param */ + ULONG id; + ULONG cb; + BYTE ab[1]; +} PARAM; +typedef PARAM NEAR *NPPARAM; +typedef PARAM FAR *PPARAM; + +typedef struct _PRESPARAMS { /* pres */ + ULONG cb; + PARAM aparam[1]; +} PRESPARAMS; +typedef PRESPARAMS NEAR *NPPRESPARAMS; +typedef PRESPARAMS FAR *PPRESPARAMS; + + +/* + * Presentation parameter APIs + */ +BOOL APIENTRY WinSetPresParam(HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam); +ULONG APIENTRY WinQueryPresParam(HWND hwnd, ULONG id1, ULONG id2, PULONG pulId, + ULONG cbBuf, PVOID pbBuf, USHORT fs); +BOOL APIENTRY WinRemovePresParam(HWND hwnd, ULONG id); + +/* + * Presentation parameter types. + */ + +#define PP_FOREGROUNDCOLOR 1L +#define PP_FOREGROUNDCOLORINDEX 2L +#define PP_BACKGROUNDCOLOR 3L +#define PP_BACKGROUNDCOLORINDEX 4L +#define PP_HILITEFOREGROUNDCOLOR 5L +#define PP_HILITEFOREGROUNDCOLORINDEX 6L +#define PP_HILITEBACKGROUNDCOLOR 7L +#define PP_HILITEBACKGROUNDCOLORINDEX 8L +#define PP_DISABLEDFOREGROUNDCOLOR 9L +#define PP_DISABLEDFOREGROUNDCOLORINDEX 10L +#define PP_DISABLEDBACKGROUNDCOLOR 11L +#define PP_DISABLEDBACKGROUNDCOLORINDEX 12L +#define PP_BORDERCOLOR 13L +#define PP_BORDERCOLORINDEX 14L +#define PP_FONTNAMESIZE 15L +#define PP_FONTHANDLE 16L + +/* + * Flags for WinQueryPresParams() + */ +#define QPF_NOINHERIT 0x0001 /* Don't inherit */ +#define QPF_ID1COLORINDEX 0x0002 /* Convert id1 color index into RGB */ +#define QPF_ID2COLORINDEX 0x0004 /* Convert id2 color index into RGB */ +#define QPF_PURERGBCOLOR 0x0008 /* Return pure RGB colors */ +#define QPF_VALIDFLAGS 0x000F /* Valid WinQueryPresParams() flags. */ + +/*** System color functions */ + +LONG APIENTRY WinQuerySysColor(HWND hwndDesktop, LONG clr, LONG lReserved); +BOOL APIENTRY WinSetSysColors(HWND hwndDesktop, ULONG flOptions, + ULONG flFormat, LONG clrFirst, ULONG cclr, + PLONG pclr); +#define SYSCLR_BUTTONLIGHT (-41L) +#define SYSCLR_BUTTONMIDDLE (-40L) +#define SYSCLR_BUTTONDARK (-39L) +#define SYSCLR_BUTTONDEFAULT (-38L) +#define SYSCLR_TITLEBOTTOM (-37L) +#define SYSCLR_SHADOW (-36L) +#define SYSCLR_ICONTEXT (-35L) +#define SYSCLR_DIALOGBACKGROUND (-34L) +#define SYSCLR_HILITEFOREGROUND (-33L) +#define SYSCLR_HILITEBACKGROUND (-32L) +#define SYSCLR_INACTIVETITLETEXTBGND (-31L) +#define SYSCLR_ACTIVETITLETEXTBGND (-30L) +#define SYSCLR_INACTIVETITLETEXT (-29L) +#define SYSCLR_ACTIVETITLETEXT (-28L) +#define SYSCLR_OUTPUTTEXT (-27L) +#define SYSCLR_WINDOWSTATICTEXT (-26L) +#define SYSCLR_SCROLLBAR (-25L) +#define SYSCLR_BACKGROUND (-24L) +#define SYSCLR_ACTIVETITLE (-23L) +#define SYSCLR_INACTIVETITLE (-22L) +#define SYSCLR_MENU (-21L) +#define SYSCLR_WINDOW (-20L) +#define SYSCLR_WINDOWFRAME (-19L) +#define SYSCLR_MENUTEXT (-18L) +#define SYSCLR_WINDOWTEXT (-17L) +#define SYSCLR_TITLETEXT (-16L) +#define SYSCLR_ACTIVEBORDER (-15L) +#define SYSCLR_INACTIVEBORDER (-14L) +#define SYSCLR_APPWORKSPACE (-13L) +#define SYSCLR_HELPBACKGROUND (-12L) +#define SYSCLR_HELPTEXT (-11L) +#define SYSCLR_HELPHILITE (-10L) + +#define SYSCLR_CSYSCOLORS 32L + +#endif /* INCL_WINSYS */ + + +#ifdef INCL_WINTIMER +/**** Timer manager */ + +#ifndef INCL_SAADEFS +USHORT APIENTRY WinStartTimer(HAB hab, HWND hwnd, USHORT idTimer, + USHORT dtTimeout); +BOOL APIENTRY WinStopTimer(HAB hab, HWND hwnd, USHORT idTimer); +ULONG APIENTRY WinGetCurrentTime(HAB hab); + +#define TID_CURSOR 0xffff /* Reserved cursor timer ID */ +#define TID_SCROLL 0xfffe /* Reserved scrolling timer ID */ +#define TID_FLASHWINDOW 0xfffd /* Reserved for window flashing timer ID */ +#define TID_USERMAX 0x7fff /* Maximum user timer ID */ +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINTIMER */ + + +#ifdef INCL_WINACCELERATORS +/**** Accelerator functions */ + +/* ACCEL fs bits + * + * NOTE: the first six AF_ code bits have the same value + * as their KC_ counterparts + */ +#ifndef INCL_SAADEFS +#define AF_CHAR 0x0001 +#define AF_VIRTUALKEY 0x0002 +#define AF_SCANCODE 0x0004 +#define AF_SHIFT 0x0008 +#define AF_CONTROL 0x0010 +#define AF_ALT 0x0020 +#define AF_LONEKEY 0x0040 +#define AF_SYSCOMMAND 0x0100 +#define AF_HELP 0x0200 +#endif /* !INCL_SAADEFS */ + +typedef LHANDLE HACCEL; /* haccel */ + +typedef struct _ACCEL { /* acc */ + USHORT fs; + USHORT key; + USHORT cmd; +} ACCEL; +typedef ACCEL FAR *PACCEL; + +typedef struct _ACCELTABLE { /* acct */ + USHORT cAccel; + USHORT codepage; + ACCEL aaccel[1]; +} ACCELTABLE; +typedef ACCELTABLE FAR *PACCELTABLE; + +HACCEL APIENTRY WinLoadAccelTable(HAB hab, HMODULE hmod, USHORT idAccelTable); +HACCEL APIENTRY WinCreateAccelTable(HAB hab, PACCELTABLE pAccelTable); +BOOL APIENTRY WinDestroyAccelTable(HACCEL haccel); +USHORT APIENTRY WinCopyAccelTable(HACCEL haccel, PACCELTABLE pAccelTable, + USHORT cbCopyMax); +BOOL APIENTRY WinTranslateAccel(HAB hab, HWND hwnd, HACCEL haccel, + PQMSG pqmsg); +BOOL APIENTRY WinSetAccelTable(HAB hab, HACCEL haccel, HWND hwndFrame); +HACCEL APIENTRY WinQueryAccelTable(HAB hab, HWND hwndFrame); + +#endif /* INCL_WINACCELERATORS */ + +/**** Extended Attribute Flags (Association Table) */ + +#define EAF_DEFAULTOWNER 0x0001 +#define EAF_UNCHANGEABLE 0x0002 +#define EAF_REUSEICON 0x0004 + +/*** WinTrackRect() information */ + +#ifdef INCL_WINTRACKRECT + +/* WinTrackRect() tracking information structure */ + +typedef struct _TRACKINFO { /* ti */ + SHORT cxBorder; + SHORT cyBorder; + SHORT cxGrid; + SHORT cyGrid; + SHORT cxKeyboard; + SHORT cyKeyboard; + RECTL rclTrack; + RECTL rclBoundary; + POINTL ptlMinTrackSize; + POINTL ptlMaxTrackSize; + USHORT fs; +} TRACKINFO; +typedef TRACKINFO FAR *PTRACKINFO; + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinTrackRect(HWND hwnd, HPS hps, PTRACKINFO pti); +BOOL APIENTRY WinShowTrackRect(HWND hwnd, BOOL fShow); + +/* WinTrackRect() flags */ + +#define TF_LEFT 0x0001 +#define TF_TOP 0x0002 +#define TF_RIGHT 0x0004 +#define TF_BOTTOM 0x0008 +/* TF_MOVE = TF_LEFT | TF_TOP | TF_RIGHT | TF_BOTTOM */ +#define TF_MOVE 0x000F + +#define TF_SETPOINTERPOS 0x0010 +#define TF_GRID 0x0020 +#define TF_STANDARD 0x0040 +#define TF_ALLINBOUNDARY 0x0080 +#define TF_VALIDATETRACKRECT 0x0100 +#define TF_PARTINBOUNDARY 0x0200 + +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINTRACKRECT */ + + +/**** Clipboard Manager */ + +#ifdef INCL_WINCLIPBOARD + +/* Clipboard messages */ + +#ifndef INCL_SAADEFS +#define WM_RENDERFMT 0x0060 +#define WM_RENDERALLFMTS 0x0061 +#define WM_DESTROYCLIPBOARD 0x0062 +#define WM_PAINTCLIPBOARD 0x0063 +#define WM_SIZECLIPBOARD 0x0064 +#define WM_HSCROLLCLIPBOARD 0x0065 +#define WM_VSCROLLCLIPBOARD 0x0066 +#define WM_DRAWCLIPBOARD 0x0067 + +/* Standard Clipboard formats */ + +#define CF_TEXT 1 +#define CF_BITMAP 2 +#define CF_DSPTEXT 3 +#define CF_DSPBITMAP 4 +#define CF_METAFILE 5 +#define CF_DSPMETAFILE 6 + +BOOL APIENTRY WinSetClipbrdOwner(HAB hab, HWND hwnd); +BOOL APIENTRY WinSetClipbrdData(HAB hab, ULONG ulData, USHORT fmt, USHORT rgfFmtInfo); +ULONG APIENTRY WinQueryClipbrdData(HAB hab, USHORT fmt); +BOOL APIENTRY WinQueryClipbrdFmtInfo(HAB hab, USHORT fmt, + PUSHORT prgfFmtInfo); +BOOL APIENTRY WinSetClipbrdViewer(HAB hab, HWND hwndNewClipViewer); + +/* WinSetClipbrdData() flags */ + +#define CFI_OWNERFREE 0x0001 +#define CFI_OWNERDISPLAY 0x0002 +#define CFI_SELECTOR 0x0100 +#define CFI_HANDLE 0x0200 + +#endif /* !INCL_SAADEFS */ + +USHORT APIENTRY WinEnumClipbrdFmts(HAB hab, USHORT fmt); +BOOL APIENTRY WinEmptyClipbrd(HAB hab); +BOOL APIENTRY WinOpenClipbrd(HAB hab); +BOOL APIENTRY WinCloseClipbrd(HAB hab); +HWND APIENTRY WinQueryClipbrdOwner(HAB hab, BOOL fLock); +HWND APIENTRY WinQueryClipbrdViewer(HAB hab, BOOL fLock); + +#endif /* INCL_WINCLIPBOARD */ + + +#if (defined(INCL_WINCURSORS) || !defined(INCL_NOCOMMON)) +/**** Cursor manager common subsection */ + +BOOL APIENTRY WinDestroyCursor(HWND hwnd); +BOOL APIENTRY WinShowCursor(HWND hwnd, BOOL fShow); +BOOL APIENTRY WinCreateCursor(HWND hwnd, SHORT x, SHORT y, SHORT cx, SHORT cy, + USHORT fs, PRECTL prclClip); + +/* WinCreateCursor() flags */ + +#define CURSOR_SOLID 0x0000 +#define CURSOR_HALFTONE 0x0001 +#define CURSOR_FRAME 0x0002 +#define CURSOR_FLASH 0x0004 +#define CURSOR_SETPOS 0x8000 + + +#endif /* Cursor manager common subsection */ + +#ifdef INCL_WINCURSORS + +typedef struct _CURSORINFO { /* csri */ + HWND hwnd; + SHORT x; + SHORT y; + SHORT cx; + SHORT cy; + USHORT fs; + RECTL rclClip; +} CURSORINFO; +typedef CURSORINFO FAR *PCURSORINFO; + +BOOL APIENTRY WinQueryCursorInfo(HWND hwndDesktop, PCURSORINFO pCursorInfo); + +#endif /* INCL_WINCURSORS */ + +typedef LHANDLE HPOINTER; /* hptr */ + +#ifdef INCL_WINPOINTERS +/**** Pointer manager */ + +BOOL APIENTRY WinSetPointer(HWND hwndDesktop, HPOINTER hptrNew); +BOOL APIENTRY WinShowPointer(HWND hwndDesktop, BOOL fShow); +HPOINTER APIENTRY WinQuerySysPointer(HWND hwndDesktop, SHORT iptr, BOOL fLoad); + + +/* System pointers (NOTE: these are 1-based) */ + +#ifdef LATER + +#define SPTR_ARROW 1 +#define SPTR_TEXT 2 +#define SPTR_WAIT 3 +#define SPTR_MOVE 4 +#define SPTR_SIZENWSE 5 +#define SPTR_SIZENESW 6 +#define SPTR_SIZEWE 7 +#define SPTR_SIZENS 8 +#define SPTR_APPICON 9 + +#define SPTR_ICONINFORMATION 10 +#define SPTR_ICONQUESTION 11 +#define SPTR_ICONERROR 12 +#define SPTR_ICONWARNING 13 + +#define SPTR_CPTR 13 /* Count of pointers loaded by PMWIN */ + +#define SPTR_ILLEGAL 14 +#define SPTR_FILE 15 +#define SPTR_FOLDER 16 +#define SPTR_MULTFILE 17 +#define SPTR_PROGRAM 18 + +#else + +#define SPTR_ARROW 1 +#define SPTR_TEXT 2 +#define SPTR_WAIT 3 +#define SPTR_SIZE 4 +#define SPTR_MOVE 5 +#define SPTR_SIZENWSE 6 +#define SPTR_SIZENESW 7 +#define SPTR_SIZEWE 8 +#define SPTR_SIZENS 9 +#define SPTR_APPICON 10 +#define SPTR_ICONINFORMATION 11 +#define SPTR_ICONQUESTION 12 +#define SPTR_ICONERROR 13 +#define SPTR_ICONWARNING 14 +#define SPTR_CPTR 14 /* count loaded by pmwin */ + +#define SPTR_ILLEGAL 18 +#define SPTR_FILE 19 +#define SPTR_FOLDER 20 +#define SPTR_MULTFILE 21 +#define SPTR_PROGRAM 22 + +/* backward compatibility */ +#define SPTR_HANDICON SPTR_ICONERROR +#define SPTR_QUESICON SPTR_ICONQUESTION +#define SPTR_BANGICON SPTR_ICONWARNING +#define SPTR_NOTEICON SPTR_ICONINFORMATION + +#endif /* LATER */ + + + +HPOINTER APIENTRY WinLoadPointer(HWND hwndDesktop, HMODULE hmod, USHORT idres); +BOOL APIENTRY WinDestroyPointer(HPOINTER hptr); +HPOINTER APIENTRY WinCreatePointer(HWND hwndDesktop, HBITMAP hbmPointer, + BOOL fPointer, SHORT xHotspot, + SHORT yHotspot); + +HPOINTER APIENTRY WinQueryPointer(HWND hwndDesktop); +BOOL APIENTRY WinSetPointerPos(HWND hwndDesktop, SHORT x, SHORT y); +BOOL APIENTRY WinQueryPointerPos(HWND hwndDesktop, PPOINTL pptl); + +typedef struct _POINTERINFO { /* ptri */ + BOOL fPointer; + SHORT xHotspot; + SHORT yHotspot; + HBITMAP hbmPointer; + HBITMAP hbmColor; +} POINTERINFO; +typedef POINTERINFO FAR *PPOINTERINFO; + +HPOINTER APIENTRY WinCreatePointerIndirect(HWND hwndDesktop, PPOINTERINFO pptri); +BOOL APIENTRY WinQueryPointerInfo(HPOINTER hptr, + PPOINTERINFO pPointerInfo); +BOOL APIENTRY WinDrawPointer(HPS hps, SHORT x, SHORT y, HPOINTER hptr, + USHORT fs); + + + +/* WinDrawPointer() constants */ + +#define DP_NORMAL 0x0000 +#define DP_HALFTONED 0x0001 +#define DP_INVERTED 0x0002 + + +HBITMAP APIENTRY WinGetSysBitmap(HWND hwndDesktop, USHORT ibm); + +/* System bitmaps (NOTE: these are 1-based) */ + +#define SBMP_OLD_SYSMENU 1 +#define SBMP_OLD_SBUPARROW 2 +#define SBMP_OLD_SBDNARROW 3 +#define SBMP_OLD_SBRGARROW 4 +#define SBMP_OLD_SBLFARROW 5 +#define SBMP_MENUCHECK 6 +#define SBMP_CHECKBOXES 7 +#define SBMP_BTNCORNERS 8 +#define SBMP_OLD_MINBUTTON 9 +#define SBMP_OLD_MAXBUTTON 10 +#define SBMP_OLD_RESTOREBUTTON 11 +#define SBMP_OLD_CHILDSYSMENU 12 +#define SBMP_DRIVE 15 +#define SBMP_FILE 16 +#define SBMP_FOLDER 17 +#define SBMP_TREEPLUS 18 +#define SBMP_TREEMINUS 19 +#define SBMP_PROGRAM 22 +#define SBMP_MENUATTACHED 23 +#define SBMP_SIZEBOX 24 + +#define SBMP_SYSMENU 25 +#define SBMP_MINBUTTON 26 +#define SBMP_MAXBUTTON 27 +#define SBMP_RESTOREBUTTON 28 +#define SBMP_CHILDSYSMENU 29 +#define SBMP_SYSMENUDEP 30 +#define SBMP_MINBUTTONDEP 31 +#define SBMP_MAXBUTTONDEP 32 +#define SBMP_RESTOREBUTTONDEP 33 +#define SBMP_CHILDSYSMENUDEP 34 +#define SBMP_SBUPARROW 35 +#define SBMP_SBDNARROW 36 +#define SBMP_SBLFARROW 37 +#define SBMP_SBRGARROW 38 +#define SBMP_SBUPARROWDEP 39 +#define SBMP_SBDNARROWDEP 40 +#define SBMP_SBLFARROWDEP 41 +#define SBMP_SBRGARROWDEP 42 +#define SBMP_SBUPARROWDIS 43 +#define SBMP_SBDNARROWDIS 44 +#define SBMP_SBLFARROWDIS 45 +#define SBMP_SBRGARROWDIS 46 +#define SBMP_COMBODOWN 47 + +#endif /* INCL_WINPOINTERS */ + + +/**** Hook manager */ + +#ifdef INCL_WINHOOKS + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinSetHook(HAB hab, HMQ hmq, SHORT iHook, PFN pfnHook, + HMODULE hmod); +BOOL APIENTRY WinReleaseHook(HAB hab, HMQ hmq, SHORT iHook, PFN pfnHook, + HMODULE hmod); +BOOL APIENTRY WinCallMsgFilter(HAB hab, PQMSG pqmsg, USHORT msgf); + + +/* Hook codes */ + +#define HK_SENDMSG 0 + /* VOID EXPENTRY SendMsgHook(HAB hab, ** installer's hab ** + PSMHSTRUCT psmh, ** p send msg struct ** + BOOL fInterTask); ** between threads */ +#define HK_INPUT 1 + /* BOOL EXPENTRY InputHook(HAB hab, ** installer's hab ** + PQMSG pQmsg, ** p qmsg ** + USHORT fs); ** remove/noremove */ +#define HK_MSGFILTER 2 + /* BOOL EXPENTRY MsgFilterHook(HAB hab, ** installer's hab ** + PQMSG pQmsg, ** p qmsg ** + USHORT msgf); ** filter flag */ +#define HK_JOURNALRECORD 3 + /* VOID EXPENTRY JournalRecordHook(HAB hab, ** installer's hab ** + PQMSG pQmsg); ** p qmsg */ +#define HK_JOURNALPLAYBACK 4 + /* ULONG EXPENTRY JournalPlaybackHook(HAB hab, **installer's hab ** + BOOL fSkip, ** skip messages ** + PQMSG pQmsg); ** p qmsg */ +#define HK_HELP 5 + /* BOOL EXPENTRY HelpHook(HAB hab, ** installer's hab ** + USHORT usMode, ** mode ** + USHORT idTopic, ** main topic ** + USHORT idSubTopic, ** sub topic ** + PRECTL prcPosition); ** associated position */ + +#define HK_LOADER 6 + /* BOOL EXPENTRY LoaderHook(HAB hab, ** installer's hab ** + SHORT idContext, ** who called hook ** + PSZ pszLibname, ** lib name string ** + PHLIB hlib, ** p to lib handle ** + PSZ pszProcname, ** procedure name ** + PFNWP wndProc); ** window procedure */ +#define HK_REGISTERUSERMSG 7 + /* BOOL EXPENTRY RegisterUserHook(HAB hab, ** installer's hab ** + ULONG cUshort, ** entries in arRMP ** + PUSHORT arRMP, ** RMP array ** + PBOOL fRegistered); ** msg parms already reg*/ +#define HK_MSGCONTROL 8 + /* BOOL EXPENTRY MsgControlHook(HAB hab, ** installer's hab ** + SHORT idContext, ** who called hook ** + HWND hwnd, ** SEI window handle ** + PSZ pszClassname, ** window class name ** + USHORT usMsgclass, ** interested msg class ** + SHORT idControl, ** SMI_* ** + PBOOL fSuccess); ** mode already set */ +#define HK_PLIST_ENTRY 9 + /* BOOL EXPENTRY ProgramListEntryHook(HAB hab, ** installer's hab ** + PPRFHOOKPARMS pProfileHookParams,** data ** + PBOOL fNoExecute); ** cease hook processing*/ +#define HK_PLIST_EXIT 10 + /* BOOL EXPENTRY ProgramListExitHook(HAB hab, ** installer's hab ** + PPRFHOOKPARMS pProfileHookParams); ** data */ +#define HK_FINDWORD 11 + /* BOOL EXPENTRY FindWordHook(usCodepage, ** code page to use ** + PSZ pszText, ** text to break ** + ULONG cb, ** maximum text size ** + ULONG ich, ** break 'near' here ** + PULONG pichStart, ** where break began ** + PULONG pichEnd, ** where break ended ** + PULONG pichNext); ** where next word begin*/ +#define HK_CODEPAGECHANGED 12 + /* VOID EXPENTRY CodePageChangedHook(HMQ hmq, ** msg q handle ** + USHORT usOldCodepage, ** old code page ** + USHORT usNewCodepage);** new code page */ +#define HK_WINDOWDC 15 + /* BOOL EXPENTRY WindowDCHook(HAB hab, ** installer's hab ** + HDC hdc, ** current hdc ** + HWND hwnd, ** current hwnd ** + BOOL); ** association flag */ + +#define HMQ_CURRENT ((HMQ)1) + +/* WH_MSGFILTER context codes */ + +#define MSGF_DIALOGBOX 1 +#define MSGF_MESSAGEBOX 2 +#define MSGF_TRACK 8 + +/* HK_HELP Help modes */ + +#define HLPM_FRAME (-1) +#define HLPM_WINDOW (-2) +#define HLPM_MENU (-3) + +/* HK_SENDMSG structure */ + +typedef struct _SMHSTRUCT { /* smhs */ + MPARAM mp2; + MPARAM mp1; + USHORT msg; + HWND hwnd; +} SMHSTRUCT; +typedef SMHSTRUCT FAR *PSMHSTRUCT; + +/*HK_LOADER context codes */ + +#define LHK_DELETEPROC 1 +#define LHK_DELETELIB 2 +#define LHK_LOADPROC 3 +#define LHK_LOADLIB 4 + +/*HK_MSGCONTROL context codes */ + +#define MCHK_MSGINTEREST 1 +#define MCHK_CLASSMSGINTEREST 2 +#define MCHK_SYNCHRONISATION 3 +#define MCHK_MSGMODE 4 + +/*HK_REGISTERUSERMSG conext codes */ + +#define RUMHK_DATATYPE 1 +#define RUMHK_MSG 2 + +#endif /* INCL_SAADEFS */ + +#endif /* INCL_WINHOOKS */ + +/* + * Include Shell API + */ +#ifndef INCL_SAADEFS +#include <pmshl.h> /* OS/2 Shell definitions */ +#endif /* !INCL_SAADEFS */ + +#ifdef INCL_WINCOUNTRY + +USHORT APIENTRY WinQueryCp(HMQ hmq); + +#ifndef INCL_SAADEFS +BOOL APIENTRY WinSetCp(HMQ hmq, USHORT idCodePage); +USHORT APIENTRY WinQueryCpList(HAB hab, USHORT ccpMax, PUSHORT prgcp); +BOOL APIENTRY WinCpTranslateString(HAB hab, USHORT cpSrc, PSZ pszSrc, + USHORT cpDst, USHORT cchDestMax, + PSZ pchDest); +UCHAR APIENTRY WinCpTranslateChar(HAB hab, USHORT cpSrc, UCHAR chSrc, + USHORT cpDst); + +USHORT APIENTRY WinUpper(HAB hab, USHORT idcp, USHORT idcc, PSZ psz); +USHORT APIENTRY WinUpperChar(HAB hab, USHORT idcp, USHORT idcc, USHORT c); +PSZ APIENTRY WinNextChar(HAB hab, USHORT idcp, USHORT idcc, PSZ psz); +PSZ APIENTRY WinPrevChar(HAB hab, USHORT idcp, USHORT idcc, PSZ pszStart, + PSZ psz); +USHORT APIENTRY WinCompareStrings(HAB hab, USHORT idcp, USHORT idcc, PSZ psz1, + PSZ psz2, USHORT reserved); +#define WCS_ERROR 0 +#define WCS_EQ 1 +#define WCS_LT 2 +#define WCS_GT 3 + +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINCOUNTRY */ + + + +/* Heap Manager Interface declarations */ + +#ifdef INCL_WINHEAP + +#ifndef INCL_SAADEFS +typedef LHANDLE HHEAP; + +HHEAP APIENTRY WinCreateHeap(USHORT selHeapBase, USHORT cbHeap, + USHORT cbGrow, USHORT chMinDed, + USHORT cbMaxDed, USHORT fOptions); +HHEAP APIENTRY WinDestroyHeap(HHEAP hHeap); +USHORT APIENTRY WinAvailMem(HHEAP hHeap, BOOL fCompact, USHORT cbMinFree); +NPBYTE APIENTRY WinAllocMem(HHEAP hHeap, USHORT cb); +NPBYTE APIENTRY WinReallocMem(HHEAP hHeap, NPBYTE npMem, + USHORT cbOld, USHORT cbNew); +NPBYTE APIENTRY WinFreeMem(HHEAP hHeap, NPBYTE npMem, USHORT cbMem); +PVOID APIENTRY WinLockHeap(HHEAP hHeap); + +#define HM_MOVEABLE 0x0001 /* Parameters to WinCreateHeap */ +#define HM_VALIDSIZE 0x0002 +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINHEAP */ + + +/*** Atom Manager Interface declarations */ + +#ifdef INCL_WINATOM + +#ifndef INCL_SAADEFS +typedef LHANDLE HATOMTBL; +typedef USHORT ATOM; + +HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID); +HATOMTBL APIENTRY WinCreateAtomTable(USHORT cbInitial, USHORT cBuckets); +HATOMTBL APIENTRY WinDestroyAtomTable(HATOMTBL hAtomTbl); +ATOM APIENTRY WinAddAtom(HATOMTBL hAtomTbl, PSZ pszAtomName); +ATOM APIENTRY WinFindAtom(HATOMTBL hAtomTbl, PSZ pszAtomName); +ATOM APIENTRY WinDeleteAtom(HATOMTBL hAtomTbl, ATOM atom); +USHORT APIENTRY WinQueryAtomUsage(HATOMTBL hAtomTbl, ATOM atom); +USHORT APIENTRY WinQueryAtomLength(HATOMTBL hAtomTbl, ATOM atom); +USHORT APIENTRY WinQueryAtomName(HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer, + USHORT cchBufferMax); + +#define MAKEINTATOM(a) ((PCH)MAKEULONG(a, 0xffff)) +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINATOM */ + + +/*** Catch/Throw Interface declarations */ + +#ifdef INCL_WINCATCHTHROW + +#ifndef INCL_SAADEFS +typedef struct _CATCHBUF { /* ctchbf */ + ULONG reserved[ 4 ]; +} CATCHBUF; +typedef CATCHBUF FAR *PCATCHBUF; + +SHORT APIENTRY WinCatch(PCATCHBUF pcatchbuf); +VOID APIENTRY WinThrow(PCATCHBUF pcatchbuf, SHORT nThrowBack); +#endif /* !INCL_SAADEFS */ + +#endif /* INCL_WINCATCHTHROW */ + + + +#ifdef INCL_WINERRORS + +#include <pmerr.h> + +/* Error codes for debugging support */ +/* 0x1001 - 0x1021, 0x1034, 0x1036 - 0x1060 are reserved */ + +#define WINDBG_HWND_NOT_DESTROYED 0x1022 +#define WINDBG_HPTR_NOT_DESTROYED 0x1023 +#define WINDBG_HACCEL_NOT_DESTROYED 0x1024 +#define WINDBG_HENUM_NOT_DESTROYED 0x1025 +#define WINDBG_VISRGN_SEM_BUSY 0x1026 +#define WINDBG_USER_SEM_BUSY 0x1027 +#define WINDBG_DC_CACHE_BUSY 0x1028 +#define WINDBG_HOOK_STILL_INSTALLED 0x1029 +#define WINDBG_WINDOW_STILL_LOCKED 0x102a +#define WINDBG_UPDATEPS_ASSERTION_FAIL 0x102b +#define WINDBG_SENDMSG_WITHIN_USER_SEM 0x102c +#define WINDBG_USER_SEM_NOT_ENTERED 0x102d +#define WINDBG_PROC_NOT_EXPORTED 0x102e +#define WINDBG_BAD_SENDMSG_HWND 0x102f +#define WINDBG_ABNORMAL_EXIT 0x1030 +#define WINDBG_INTERNAL_REVISION 0x1031 +#define WINDBG_INITSYSTEM_FAILED 0x1032 +#define WINDBG_HATOMTBL_NOT_DESTROYED 0x1033 +#define WINDBG_WINDOW_UNLOCK_WAIT 0x1035 + +/* Get/Set Error Information Interface declarations */ + +typedef struct _ERRINFO { /* erri */ + USHORT cbFixedErrInfo; + ERRORID idError; + USHORT cDetailLevel; + USHORT offaoffszMsg; + USHORT offBinaryData; +} ERRINFO; +typedef ERRINFO FAR *PERRINFO; + +ERRORID APIENTRY WinGetLastError(HAB hab); +PERRINFO APIENTRY WinGetErrorInfo(HAB hab); +BOOL APIENTRY WinFreeErrorInfo(PERRINFO perrinfo); + +#endif /* INCL_WINERRORS */ + +#ifndef INCL_SAADEFS +/* include SetErrorInfo */ +#ifdef INCL_WINSEI + #ifndef SEI_PMWINP + #define SEI_PMWIN + #include <pmsei.h> + #endif /* SEI_PMWINP */ +#endif /* INCL_WINSEI */ +#endif /* INCL_SAADEFS */ + +#ifndef INCL_SAADEFS +#ifdef INCL_WINDDE + +/* Dynamic Data Exchange (DDE) Structure Declaration */ + +typedef struct _DDEINIT { /* ddei */ + USHORT cb; + PSZ pszAppName; + PSZ pszTopic; +} DDEINIT; +typedef DDEINIT FAR *PDDEINIT; + +typedef struct _DDESTRUCT { /* dde */ + ULONG cbData; + USHORT fsStatus; + USHORT usFormat; + USHORT offszItemName; + USHORT offabData; +} DDESTRUCT; +typedef DDESTRUCT FAR *PDDESTRUCT; + +/* DDE constants for wStatus field */ +#define DDE_FACK 0x0001 +#define DDE_FBUSY 0x0002 +#define DDE_FNODATA 0x0004 +#define DDE_FACKREQ 0x0008 +#define DDE_FRESPONSE 0x0010 +#define DDE_NOTPROCESSED 0x0020 +#define DDE_FRESERVED 0x00C0 +#define DDE_FAPPSTATUS 0xFF00 + +/* DDE public formats */ + +#define DDEFMT_TEXT 0x0001 + +/* Dynamic Data Exchange (DDE) Routines */ + +BOOL APIENTRY WinDdeInitiate(HWND hwndClient, PSZ pszAppName, + PSZ pszTopicName); +MRESULT APIENTRY WinDdeRespond(HWND hwndClient, HWND hwndServer, + PSZ pszAppName, PSZ pszTopicName); +BOOL APIENTRY WinDdePostMsg(HWND hwndTo, HWND hwndFrom, USHORT wm, + PDDESTRUCT pddeSt, BOOL fRetry); + +/* Dynamic Data Exchange (DDE) Messages */ + +#define WM_DDE_FIRST 0x00A0 +#define WM_DDE_INITIATE 0x00A0 +#define WM_DDE_REQUEST 0x00A1 +#define WM_DDE_ACK 0x00A2 +#define WM_DDE_DATA 0x00A3 +#define WM_DDE_ADVISE 0x00A4 +#define WM_DDE_UNADVISE 0x00A5 +#define WM_DDE_POKE 0x00A6 +#define WM_DDE_EXECUTE 0x00A7 +#define WM_DDE_TERMINATE 0x00A8 +#define WM_DDE_INITIATEACK 0x00A9 +#define WM_DDE_LAST 0x00AF + +/* DDE helper macros */ + +#define DDES_PSZITEMNAME(pddes) \ + (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName) + +#define DDES_PABDATA(pddes) \ + (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData) + +#define SELTOPDDES(sel) ((PDDESTRUCT)MAKEP(sel, 0)) +#define PDDESTOSEL(pddes) (SELECTOROF(pddes)) +#define PDDEITOSEL(pddei) (SELECTOROF(pddei)) + +#endif /* INCL_WINDDE */ +#endif /* !INCL_SAADEFS */ + +#ifdef INCL_WINWINDOWMGR +#define WM_QUERYCONVERTPOS 0x00b0 + +/* Return values for WM_QUERYCONVERTPOS */ +#define QCP_CONVERT 0x0001 +#define QCP_NOCONVERT 0x0000 + +#endif /* INCL_WINWINDOWMGR */ + + +#ifdef INCL_WINHELP + #include <pmhelp.h> +#endif /* INCL_WINHELP */ + +/*Load/Delete Library/Procedure */ + +typedef HMODULE HLIB; +typedef PHMODULE PHLIB; + +#ifdef INCL_WINLOAD +BOOL APIENTRY WinDeleteProcedure(HAB hab, PFNWP wndproc); +BOOL APIENTRY WinDeleteLibrary(HAB hab, HLIB libhandle); +PFNWP APIENTRY WinLoadProcedure(HAB hab, HLIB libhandle, PSZ procname); +HLIB APIENTRY WinLoadLibrary(HAB hab, PSZ libname); +#endif /* INCL_WINLOAD */ + + +#ifdef INCL_REMAPDLL +#define STR_DLLNAME "keyremap" +#endif /*INCL_REMAPDLL*/ + +#ifdef INCL_NLS + +#define WM_DBCSFIRST 0x00b0 +#define WM_DBCSLAST 0x00cf +#define WC_APPSTAT ((PSZ)0xffff0010L) +#define WC_KBDSTAT ((PSZ)0xffff0011L) +#define WC_PECIC ((PSZ)0xffff0012L) +#define WC_DBE_KKPOPUP ((PSZ)0xffff0013L) + +#endif /* INCL_NLS */ diff --git a/private/oleauto/tools/win16/os2/inc/process.h b/private/oleauto/tools/win16/os2/inc/process.h new file mode 100644 index 000000000..462946ef2 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/process.h @@ -0,0 +1,133 @@ +/*** +*process.h - definition and declarations for process control functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations and definitions for the +* spawnxx, execxx, and various other process control routines. +* +****/ + +#ifndef _INC_PROCESS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* mode values for spawnxx routines + * (only P_WAIT and P_OVERLAY are supported on MS-DOS) + */ + +extern int __near __cdecl _p_overlay; + +#define _P_WAIT 0 +#define _P_NOWAIT 1 +#define _P_OVERLAY _p_overlay +#define _OLD_P_OVERLAY 2 +#define _P_NOWAITO 3 +#define _P_DETACH 4 + + +/* function prototypes */ + +void __cdecl abort(void); +void __cdecl _cexit(void); +void __cdecl _c_exit(void); +#ifndef _WINDOWS +int __cdecl _execl(const char *, const char *, ...); +int __cdecl _execle(const char *, const char *, ...); +int __cdecl _execlp(const char *, const char *, ...); +int __cdecl _execlpe(const char *, const char *, ...); +int __cdecl _execv(const char *, + const char * const *); +int __cdecl _execve(const char *, + const char * const *, const char * const *); +int __cdecl _execvp(const char *, + const char * const *); +int __cdecl _execvpe(const char *, + const char * const *, const char * const *); +#endif +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __cdecl _getpid(void); +#ifndef _WINDOWS +int __cdecl _spawnl(int, const char *, const char *, + ...); +int __cdecl _spawnle(int, const char *, const char *, + ...); +int __cdecl _spawnlp(int, const char *, const char *, + ...); +int __cdecl _spawnlpe(int, const char *, const char *, + ...); +int __cdecl _spawnv(int, const char *, + const char * const *); +int __cdecl _spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl _spawnvp(int, const char *, + const char * const *); +int __cdecl _spawnvpe(int, const char *, + const char * const *, const char * const *); +int __cdecl system(const char *); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_WAIT _P_WAIT +#define P_NOWAIT _P_NOWAIT +#define P_OVERLAY _P_OVERLAY +#define OLD_P_OVERLAY _OLD_P_OVERLAY +#define P_NOWAITO _P_NOWAITO +#define P_DETACH _P_DETACH + +#ifndef _WINDOWS +int __cdecl execl(const char *, const char *, ...); +int __cdecl execle(const char *, const char *, ...); +int __cdecl execlp(const char *, const char *, ...); +int __cdecl execlpe(const char *, const char *, ...); +int __cdecl execv(const char *, + const char * const *); +int __cdecl execve(const char *, + const char * const *, const char * const *); +int __cdecl execvp(const char *, + const char * const *); +int __cdecl execvpe(const char *, + const char * const *, const char * const *); +#endif +int __cdecl getpid(void); +#ifndef _WINDOWS +int __cdecl spawnl(int, const char *, const char *, + ...); +int __cdecl spawnle(int, const char *, const char *, + ...); +int __cdecl spawnlp(int, const char *, const char *, + ...); +int __cdecl spawnlpe(int, const char *, const char *, + ...); +int __cdecl spawnv(int, const char *, + const char * const *); +int __cdecl spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl spawnvp(int, const char *, + const char * const *); +int __cdecl spawnvpe(int, const char *, + const char * const *, const char * const *); +#endif + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_PROCESS +#endif /* _INC_PROCESS */ diff --git a/private/oleauto/tools/win16/os2/inc/search.h b/private/oleauto/tools/win16/os2/inc/search.h new file mode 100644 index 000000000..ddf2d90f5 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/search.h @@ -0,0 +1,59 @@ +/*** +*search.h - declarations for searcing/sorting routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations for the sorting and +* searching routines. +* [System V] +* +****/ + +#ifndef _INC_SEARCH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl _lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl _lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_SEARCH +#endif /* _INC_SEARCH */ diff --git a/private/oleauto/tools/win16/os2/inc/setjmp.h b/private/oleauto/tools/win16/os2/inc/setjmp.h new file mode 100644 index 000000000..afb2950c5 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/setjmp.h @@ -0,0 +1,41 @@ +/*** +*setjmp.h - definitions/declarations for setjmp/longjmp routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the machine-dependent buffer used by +* setjmp/longjmp to save and restore the program state, and +* declarations for those routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SETJMP + +#ifndef __cplusplus + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define the buffer type for holding the state information */ + +#define _JBLEN 9 /* bp, di, si, sp, ret addr, ds */ + +#ifndef _JMP_BUF_DEFINED +typedef int jmp_buf[_JBLEN]; +#define _JMP_BUF_DEFINED +#endif + + +/* function prototypes */ + +int __cdecl setjmp(jmp_buf); +void __cdecl longjmp(jmp_buf, int); + +#endif /* _cplusplus */ + +#define _INC_SETJMP +#endif /* _INC_SETJMP */ diff --git a/private/oleauto/tools/win16/os2/inc/share.h b/private/oleauto/tools/win16/os2/inc/share.h new file mode 100644 index 000000000..e3f8607fb --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/share.h @@ -0,0 +1,29 @@ +/*** +*share.h - defines file sharing modes for sopen +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the file sharing modes for sopen(). +* +****/ + +#ifndef _INC_SHARE + +#define _SH_COMPAT 0x00 /* compatibility mode */ +#define _SH_DENYRW 0x10 /* deny read/write mode */ +#define _SH_DENYWR 0x20 /* deny write mode */ +#define _SH_DENYRD 0x30 /* deny read mode */ +#define _SH_DENYNO 0x40 /* deny none mode */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define SH_COMPAT _SH_COMPAT +#define SH_DENYRW _SH_DENYRW +#define SH_DENYWR _SH_DENYWR +#define SH_DENYRD _SH_DENYRD +#define SH_DENYNO _SH_DENYNO +#endif + +#define _INC_SHARE +#endif /* _INC_SHARE */ diff --git a/private/oleauto/tools/win16/os2/inc/shellapi.h b/private/oleauto/tools/win16/os2/inc/shellapi.h new file mode 100644 index 000000000..8c7016e85 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/shellapi.h @@ -0,0 +1,67 @@ +/* + * shell.h + * + * Header file for shell association database management functions + */ + + +//**************************************************************************** +// THIS INFORMATION IS PUBLIC + +/* return codes from Registration functions + */ + +#define ERROR_SUCCESS 0 +#define ERROR_BADDB 1 +#define ERROR_BADKEY 2 +#define ERROR_CANTOPEN 3 +#define ERROR_CANTREAD 4 +#define ERROR_CANTWRITE 5 +#define ERROR_OUTOFMEMORY 6 +#define ERROR_INVALID_PARAMETER 7 + +#define REG_SZ 1 // string type + +#define HKEY_CLASSES_ROOT 1 + +/* necessary typedef's. Everything in this API is 32-bit. + */ + +typedef DWORD HKEY; +typedef HKEY FAR * PHKEY; + +/* API exports from the library + */ + +LONG FAR PASCAL RegOpenKey(HKEY,LPSTR,PHKEY); +LONG FAR PASCAL RegCreateKey(HKEY,LPSTR,PHKEY); +LONG FAR PASCAL RegCloseKey(HKEY); +LONG FAR PASCAL RegDeleteKey(HKEY,LPSTR); +LONG FAR PASCAL RegSetValue(HKEY,LPSTR,DWORD,LPSTR,DWORD); +LONG FAR PASCAL RegQueryValue(HKEY,LPSTR,LPSTR,LONG FAR *); +LONG FAR PASCAL RegEnumKey(HKEY,DWORD,LPSTR,DWORD); + +WORD FAR PASCAL DragQueryFile(HANDLE,WORD,LPSTR,WORD); +BOOL FAR PASCAL DragQueryPoint(HANDLE,LPPOINT); +void FAR PASCAL DragFinish(HANDLE); +void FAR PASCAL DragAcceptFiles(HWND,BOOL); + +HANDLE FAR PASCAL ShellExecute( /* ;Internal */ + LPSTR lpOperation, /* ;Internal */ + LPSTR lpFile, /* ;Internal */ + LPSTR lpParameters, /* ;Internal */ + LPSTR lpDirectory, /* ;Internal */ + BOOL fMinimize); /* ;Internal */ + /* ;Internal */ +HANDLE FAR PASCAL FindExecutable( /* ;Internal */ + LPSTR lpFile, /* ;Internal */ + LPSTR lpDirectory, /* ;Internal */ + LPSTR lpResult); /* ;Internal */ + /* ;Internal */ + /* ;Internal */ +int FAR PASCAL ShellAbout(HWND hWnd, LPSTR szApp, LPSTR szOtherStuff, HICON hIcon); /* ;Internal */ + +HICON FAR PASCAL DuplicateIcon(HANDLE hInst, HICON hIcon); /* ;Internal */ +HICON FAR PASCAL ExtractAssociatedIcon(HANDLE hInst, LPSTR lpIconPath, LPWORD lpiIcon); /* ;Internal */ +HICON FAR PASCAL ExtractIcon(HANDLE hInst, LPSTR lpszExeFileName, WORD nIconIndex); /* ;Internal */ + diff --git a/private/oleauto/tools/win16/os2/inc/signal.h b/private/oleauto/tools/win16/os2/inc/signal.h new file mode 100644 index 000000000..609f9d9f8 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/signal.h @@ -0,0 +1,68 @@ +/*** +*signal.h - defines signal values and routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the signal values and declares the signal functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SIGNAL + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIG_ATOMIC_T_DEFINED +typedef int sig_atomic_t; +#define _SIG_ATOMIC_T_DEFINED +#endif + +#define NSIG 23 /* maximum signal number + 1 */ + + +/* signal types */ + +#ifndef _WINDOWS +#define SIGINT 2 /* Ctrl-C sequence */ +#define SIGILL 4 /* illegal instruction - invalid function image */ +#endif +#define SIGFPE 8 /* floating point exception */ +#ifndef _WINDOWS +#define SIGSEGV 11 /* segment violation */ +#define SIGTERM 15 /* Software termination signal from kill */ +#define SIGABRT 22 /* abnormal termination triggered by abort call */ +#endif + + +/* signal action codes */ + +/* default signal action */ +#define SIG_DFL (void (__cdecl *)(int))0 + +/* ignore */ +#define SIG_IGN (void (__cdecl *)(int))1 + +/* signal error value (returned by signal call on error) */ +#define SIG_ERR (void (__cdecl *)(int))-1 + + +/* function prototypes */ + +void (__cdecl * __cdecl signal(int, + void (__cdecl *)(int)))(int); +int __cdecl raise(int); + +#ifdef __cplusplus +} +#endif + +#define _INC_SIGNAL +#endif /* _INC_SIGNAL */ diff --git a/private/oleauto/tools/win16/os2/inc/stdarg.h b/private/oleauto/tools/win16/os2/inc/stdarg.h new file mode 100644 index 000000000..7a06e7dca --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stdarg.h @@ -0,0 +1,52 @@ +/*** +*stdarg.h - defines ANSI-style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines ANSI-style macros for accessing arguments +* of functions which take a variable number of arguments. +* [ANSI] +* +****/ + +#ifndef _INC_STDARG + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_start(ap,v) ap = (va_list)&v + _INTSIZEOF(v) +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif + +#define _INC_STDARG +#endif /* _INC_STDARG */ diff --git a/private/oleauto/tools/win16/os2/inc/stddef.h b/private/oleauto/tools/win16/os2/inc/stddef.h new file mode 100644 index 000000000..19f5089ba --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stddef.h @@ -0,0 +1,70 @@ +/*** +*stddef.h - definitions/declarations for common constants, types, variables +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains definitions and declarations for some commonly +* used constants, types, and variables. +* [ANSI] +* +****/ + +#ifndef _INC_STDDEF + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* define the NULL pointer value and the offsetof() macro */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* offset of field m in a struct s */ + +#define offsetof(s,m) (size_t)(unsigned long)&(((s *)0)->m) + + +/* errno declaration */ + +extern int __near __cdecl volatile errno; + + +/* define the implementation dependent size types */ + +#ifndef _PTRDIFF_T_DEFINED +typedef int ptrdiff_t; +#define _PTRDIFF_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + + +#ifdef __cplusplus +} +#endif + +#define _INC_STDDEF +#endif /* _INC_STDDEF */ diff --git a/private/oleauto/tools/win16/os2/inc/stdio.h b/private/oleauto/tools/win16/os2/inc/stdio.h new file mode 100644 index 000000000..aa0ebc166 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stdio.h @@ -0,0 +1,338 @@ +/*** +*stdio.h - definitions/declarations for standard I/O routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the level 2 I/O ("standard I/O") routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STDIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _VA_LIST_DEFINED +typedef char *va_list; +#define _VA_LIST_DEFINED +#endif + +/* buffered I/O macros */ + +#define BUFSIZ 512 +#define _NFILE 20 +#define EOF (-1) + +#ifndef _FILE_DEFINED +#pragma pack(2) +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + char _flag; + char _file; + }; +typedef struct _iobuf FILE; +#pragma pack() +#define _FILE_DEFINED +#endif + + +/* _P_tmpnam: Directory where temporary files may be created. + * L_tmpnam size = size of _P_tmpdir + * + 1 (in case _P_tmpdir does not end in "\\") + * + 6 (for the temp number string) + * + 1 (for the null terminator) + */ + +#define _P_tmpdir "\\" +#define L_tmpnam sizeof(_P_tmpdir)+8 + + +/* fseek constants */ + +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + + +/* minimum guaranteed filename length, open file count, and unique + * tmpnam filenames. + */ + +#define FILENAME_MAX 63 +#define FOPEN_MAX 18 +#define TMP_MAX 32767 +#define _SYS_OPEN 20 + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* declare _iob[] array */ + +#ifndef _STDIO_DEFINED +extern FILE __near __cdecl _iob[]; +#endif + + +/* define file position type */ + +#ifndef _FPOS_T_DEFINED +typedef long fpos_t; +#define _FPOS_T_DEFINED +#endif + + +/* standard file pointers */ + +#ifndef _WINDLL +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define stderr (&_iob[2]) +#endif +#ifndef _WINDOWS +#define _stdaux (&_iob[3]) +#define _stdprn (&_iob[4]) +#endif + + +#define _IOREAD 0x01 +#define _IOWRT 0x02 + +#define _IOFBF 0x0 +#define _IOLBF 0x40 +#define _IONBF 0x04 + +#define _IOMYBUF 0x08 +#define _IOEOF 0x10 +#define _IOERR 0x20 +#define _IOSTRG 0x40 +#define _IORW 0x80 + + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _WINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +#ifndef _STDIO_DEFINED +int __cdecl _filbuf(FILE *); +int __cdecl _flsbuf(int, FILE *); +FILE * __cdecl _fsopen(const char *, + const char *, int); +void __cdecl clearerr(FILE *); +int __cdecl fclose(FILE *); +int __cdecl _fcloseall(void); +FILE * __cdecl _fdopen(int, const char *); +int __cdecl feof(FILE *); +int __cdecl ferror(FILE *); +int __cdecl fflush(FILE *); +int __cdecl fgetc(FILE *); +#ifndef _WINDLL +int __cdecl _fgetchar(void); +#endif +int __cdecl fgetpos(FILE *, fpos_t *); +char * __cdecl fgets(char *, int, FILE *); +int __cdecl _fileno(FILE *); +int __cdecl _flushall(void); +FILE * __cdecl fopen(const char *, + const char *); +int __cdecl fprintf(FILE *, const char *, ...); +int __cdecl fputc(int, FILE *); +#ifndef _WINDLL +int __cdecl _fputchar(int); +#endif +int __cdecl fputs(const char *, FILE *); +size_t __cdecl fread(void *, size_t, size_t, FILE *); +FILE * __cdecl freopen(const char *, + const char *, FILE *); +#ifndef _WINDLL +int __cdecl fscanf(FILE *, const char *, ...); +#endif +int __cdecl fsetpos(FILE *, const fpos_t *); +int __cdecl fseek(FILE *, long, int); +long __cdecl ftell(FILE *); +#ifdef _WINDOWS +#ifndef _WINDLL +FILE * __cdecl _fwopen(struct _wopeninfo *, struct _wsizeinfo *, const char *); +#endif +#endif +size_t __cdecl fwrite(const void *, size_t, size_t, + FILE *); +int __cdecl getc(FILE *); +#ifndef _WINDLL +int __cdecl getchar(void); +char * __cdecl gets(char *); +#endif +int __cdecl _getw(FILE *); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +int __cdecl printf(const char *, ...); +int __cdecl putc(int, FILE *); +#ifndef _WINDLL +int __cdecl putchar(int); +int __cdecl puts(const char *); +#endif +int __cdecl _putw(int, FILE *); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +void __cdecl rewind(FILE *); +int __cdecl _rmtmp(void); +#ifndef _WINDLL +int __cdecl scanf(const char *, ...); +#endif +void __cdecl setbuf(FILE *, char *); +int __cdecl setvbuf(FILE *, char *, int, size_t); +int __cdecl _snprintf(char *, size_t, const char *, ...); +int __cdecl sprintf(char *, const char *, ...); +#ifndef _WINDLL +int __cdecl sscanf(const char *, const char *, ...); +#endif +char * __cdecl _tempnam(char *, char *); +FILE * __cdecl tmpfile(void); +char * __cdecl tmpnam(char *); +int __cdecl ungetc(int, FILE *); +int __cdecl _unlink(const char *); +int __cdecl vfprintf(FILE *, const char *, va_list); +int __cdecl vprintf(const char *, va_list); +int __cdecl _vsnprintf(char *, size_t, const char *, va_list); +int __cdecl vsprintf(char *, const char *, va_list); +#define _STDIO_DEFINED +#endif + +/* macro definitions */ + +#define feof(_stream) ((_stream)->_flag & _IOEOF) +#define ferror(_stream) ((_stream)->_flag & _IOERR) +#define _fileno(_stream) ((int)(unsigned char)(_stream)->_file) +#define getc(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ \ + : _filbuf(_stream)) +#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \ + ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) +#ifndef _WINDLL +#define getchar() getc(stdin) +#define putchar(_c) putc((_c),stdout) +#endif + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_tmpdir _P_tmpdir +#define SYS_OPEN _SYS_OPEN + +#ifndef _WINDOWS +#define stdaux _stdaux +#define stdprn _stdprn +#endif + +int __cdecl fcloseall(void); +FILE * __cdecl fdopen(int, const char *); +#ifndef _WINDLL +int __cdecl fgetchar(void); +#endif +int __cdecl fileno(FILE *); +int __cdecl flushall(void); +#ifndef _WINDLL +int __cdecl fputchar(int); +#endif +int __cdecl getw(FILE *); +int __cdecl putw(int, FILE *); +int __cdecl rmtmp(void); +char * __cdecl tempnam(char *, char *); +int __cdecl unlink(const char *); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_STDIO +#endif /* _INC_STDIO */ diff --git a/private/oleauto/tools/win16/os2/inc/stdiostr.h b/private/oleauto/tools/win16/os2/inc/stdiostr.h new file mode 100644 index 000000000..838735140 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stdiostr.h @@ -0,0 +1,52 @@ +/*** +*stdiostr.h - definitions/declarations for stdiobuf, stdiostream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the stdiostream and stdiobuf classes. +* [AT&T C++] +* +****/ + +#include <iostream.h> +#include <stdio.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#ifndef _INC_STDIOSTREAM +#define _INC_STDIOSTREAM +class stdiobuf : public streambuf { +public: + stdiobuf(FILE* f); +FILE * stdiofile() { return _str; } + +virtual int pbackfail(int c); +virtual int overflow(int c = EOF); +virtual int underflow(); +virtual streampos seekoff( streamoff, ios::seek_dir, int =ios::in|ios::out); +virtual int sync(); + ~stdiobuf(); + int setrwbuf(int _rsize, int _wsize); // CONSIDER: move to ios:: +// protected: +// virtual int doallocate(); +private: + FILE * _str; +}; + +// obsolescent +class stdiostream : public iostream { // note: spec.'d as : public IOS... +public: + stdiostream(FILE *); + ~stdiostream(); + stdiobuf* rdbuf() const { return (stdiobuf*) ostream::rdbuf(); } + +private: +}; + +// Restore default packing +#pragma pack() + +#endif // !_INC_STDIOSTREAM diff --git a/private/oleauto/tools/win16/os2/inc/stdlib.h b/private/oleauto/tools/win16/os2/inc/stdlib.h new file mode 100644 index 000000000..bd65d33bb --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stdlib.h @@ -0,0 +1,263 @@ +/*** +*stdlib.h - declarations/definitions for commonly used library functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* commonly used library functions which either don't fit somewhere +* else, or, like toupper/tolower, can't be declared in the normal +* place for other reasons. +* [ANSI] +* +****/ + +#ifndef _INC_STDLIB + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* definition of the return type for the onexit() function */ + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +#ifndef _ONEXIT_T_DEFINED +typedef int (__cdecl * _onexit_t)(); +typedef int (__far __cdecl * _fonexit_t)(); +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef int (__cdecl * onexit_t)(); +#endif +#define _ONEXIT_T_DEFINED +#endif + + +/* data structure definitions for div and ldiv runtimes. */ + +#ifndef _DIV_T_DEFINED + +typedef struct _div_t { + int quot; + int rem; +} div_t; + +typedef struct _ldiv_t { + long quot; + long rem; +} ldiv_t; + +#define _DIV_T_DEFINED +#endif + +/* maximum value that can be returned by the rand function. */ + +#define RAND_MAX 0x7fff + +extern unsigned short __mb_cur_max; /* mb-len for curr. locale */ +#define MB_CUR_MAX __mb_cur_max + + +/* min and max macros */ + +#define __max(a,b) (((a) > (b)) ? (a) : (b)) +#define __min(a,b) (((a) < (b)) ? (a) : (b)) + + +/* sizes for buffers used by the _makepath() and _splitpath() functions. + * note that the sizes include space for 0-terminator + */ + +#define _MAX_PATH 260 /* max. length of full pathname */ +#define _MAX_DRIVE 3 /* max. length of drive component */ +#define _MAX_DIR 256 /* max. length of path component */ +#define _MAX_FNAME 256 /* max. length of file name component */ +#define _MAX_EXT 256 /* max. length of extension component */ + +/* external variable declarations */ + +extern int __near __cdecl volatile errno; /* error value */ +extern int __near __cdecl _doserrno; /* OS system error value */ + +extern char * __near __cdecl _sys_errlist[]; /* perror error message table */ +extern int __near __cdecl _sys_nerr; /* # of entries in sys_errlist table */ +extern char ** __near __cdecl _environ; /* pointer to environment table */ +extern int __near __cdecl _fmode; /* default file translation mode */ +#ifndef _WINDOWS +extern int __near __cdecl _fileinfo; /* open file info mode (for spawn) */ +#endif + +extern unsigned int __near __cdecl _psp; /* Program Segment Prefix */ + +/* OS major/minor version numbers */ + +extern unsigned char __near __cdecl _osmajor; +extern unsigned char __near __cdecl _osminor; + +/* OS mode */ + +#define _DOS_MODE 0 /* DOS */ +#define _OS2_MODE 1 /* OS/2 */ +#define _WIN_MODE 2 /* Windows */ + +extern unsigned char __near __cdecl _osmode; + +/* CPU mode */ + +#define _REAL_MODE 0 /* real mode */ +#define _PROT_MODE 1 /* protect mode */ + +extern unsigned char __near __cdecl _cpumode; + +/* function prototypes */ + +double __cdecl atof(const char *); +double __cdecl strtod(const char *, char * *); +ldiv_t __cdecl ldiv(long, long); + +void __cdecl abort(void); +int __cdecl abs(int); +int __cdecl atexit(void (__cdecl *)(void)); +int __cdecl atoi(const char *); +long __cdecl atol(const char *); +long double __cdecl _atold(const char *); +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl calloc(size_t, size_t); +div_t __cdecl div(int, int); +char * __cdecl _ecvt(double, int, int *, int *); +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __far __cdecl _fatexit(void (__cdecl __far *)(void)); +char * __cdecl _fcvt(double, int, int *, int *); +_fonexit_t __far __cdecl _fonexit(_fonexit_t); +void __cdecl free(void *); +char * __cdecl _fullpath(char *, const char *, + size_t); +char * __cdecl _gcvt(double, int, char *); +char * __cdecl getenv(const char *); +char * __cdecl _itoa(int, char *, int); +long __cdecl labs(long); +unsigned long __cdecl _lrotl(unsigned long, int); +unsigned long __cdecl _lrotr(unsigned long, int); +char * __cdecl _ltoa(long, char *, int); +void __cdecl _makepath(char *, const char *, + const char *, const char *, const char *); +void * __cdecl malloc(size_t); +_onexit_t __cdecl _onexit(_onexit_t); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +int __cdecl _putenv(const char *); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); +unsigned int __cdecl _rotl(unsigned int, int); +unsigned int __cdecl _rotr(unsigned int, int); +int __cdecl rand(void); +void * __cdecl realloc(void *, size_t); +void __cdecl _searchenv(const char *, const char *, + char *); +void __cdecl _splitpath(const char *, char *, + char *, char *, char *); +void __cdecl srand(unsigned int); +long __cdecl strtol(const char *, char * *, + int); +long double __cdecl _strtold(const char *, + char * *); +unsigned long __cdecl strtoul(const char *, + char * *, int); +void __cdecl _swab(char *, char *, int); +#ifndef _WINDOWS +int __cdecl system(const char *); +#endif +char * __cdecl _ultoa(unsigned long, char *, int); + +int __cdecl mblen(const char *, size_t); +int __cdecl mbtowc(wchar_t *, const char *, size_t); +int __cdecl wctomb(char *, wchar_t); +size_t __cdecl mbstowcs(wchar_t *, const char *, size_t); +size_t __cdecl wcstombs(char *, const wchar_t *, size_t); + +/* model-independent function prototypes */ + +int __far __cdecl _fmblen(const char __far *, size_t); +int __far __cdecl _fmbtowc(wchar_t __far *, const char __far *, + size_t); +int __far __cdecl _fwctomb(char __far *, wchar_t); +size_t __far __cdecl _fmbstowcs(wchar_t __far *, const char __far *, + size_t); +size_t __far __cdecl _fwcstombs(char __far *, const wchar_t __far *, + size_t); + +#ifndef tolower /* tolower has been undefined - use function */ +int __cdecl tolower(int); +#endif /* tolower */ + +#ifndef toupper /* toupper has been undefined - use function */ +int __cdecl toupper(int); +#endif /* toupper */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#ifndef __cplusplus +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +extern char * __near __cdecl sys_errlist[]; +extern int __near __cdecl sys_nerr; +extern char ** __near __cdecl environ; + +#define DOS_MODE _DOS_MODE +#define OS2_MODE _OS2_MODE + +char * __cdecl ecvt(double, int, int *, int *); +char * __cdecl fcvt(double, int, int *, int *); +char * __cdecl gcvt(double, int, char *); +char * __cdecl itoa(int, char *, int); +char * __cdecl ltoa(long, char *, int); +onexit_t __cdecl onexit(onexit_t); +int __cdecl putenv(const char *); +void __cdecl swab(char *, char *, int); +char * __cdecl ultoa(unsigned long, char *, int); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_STDLIB +#endif /* _INC_STDLIB */ diff --git a/private/oleauto/tools/win16/os2/inc/stream.hxx b/private/oleauto/tools/win16/os2/inc/stream.hxx new file mode 100644 index 000000000..a87ec63d7 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/stream.hxx @@ -0,0 +1,61 @@ +#ifndef _STREAM_XXX +#define _STREAM_XXX 1 + +struct Wsp { }; + +char* oct(long n, int l =0); +char* hex(long n, int l =0); +char* dec(long n, int l =0); +char* chr(int n, int l =0); // chr(0) is the empty string "" +char* str(const char* n, int l =0); +char* form(const char* format, ...); + +class ostream { + void* bp; + short state; +public: + int operator!(); + ostream& operator<<(char* n); + ostream& operator<<(int a); + ostream& operator<<(long n); // beware: << 'a' writes 97 + ostream& operator<<(double n); + ostream& operator<<(const Wsp&); // I can't see a use for this + ostream& put(char n); // put('a') writes a + int eof(); + int fail(); + int bad(); + int good(); +}; + +class istream { + void* bp; + ostream* tied_to; + char skipws; // if non-null, automaticly skip whitespace + short state; +public: + int skip(int i); + int operator!(); + + // formatted input: >> skip whitespace + istream& operator>>(char* n); + istream& operator>>(char& n); + istream& operator>>(int& n); + istream& operator>>(long& n); + istream& operator>>(float& n); + istream& operator>>(double& n); + + // raw input: get's do not skip whitespace + istream& get(char& c); // single character + int eof(); + int fail(); + int bad(); + int good(); +}; +extern istream cin; // standard input predefined +extern ostream cout; // standard output +extern ostream cerr; // error output + +extern Wsp WS; // predefined white space +#endif + + diff --git a/private/oleauto/tools/win16/os2/inc/streamb.h b/private/oleauto/tools/win16/os2/inc/streamb.h new file mode 100644 index 000000000..7668fa22f --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/streamb.h @@ -0,0 +1,124 @@ +/*** +*streamb.h - definitions/declarations for the streambuf class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the streambuf class. +* [AT&T C++] +* +****/ + +#ifndef _INC_STREAMB +#define _INC_STREAMB + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +typedef long streampos, streamoff; + +class streambuf { +public: + + inline int in_avail() const; + inline int out_waiting() const; + int sgetc(); + int snextc(); + int sbumpc(); + void stossc(); + + inline int sputbackc(char); + + inline int sputc(int); + int sputn(const char*,int); + int sgetn(char*,int); + + virtual int sync(); + +// enum seek_dir { beg=0, cur=1, end=2 }; // CONSIDER: needed ??? + + virtual streambuf* setbuf(char *, int); + virtual streampos seekoff(streamoff,ios::seek_dir,int =ios::in|ios::out); + virtual streampos seekpos(streampos,int =ios::in|ios::out); + + virtual int xsputn(const char*,int); + virtual int xsgetn(char*,int); + + virtual int overflow(int =EOF) = 0; // pure virtual function + virtual int underflow() = 0; // pure virtual function + + virtual int pbackfail(int); + + void dbp(); + +protected: + streambuf(); + streambuf(char*,int); + virtual ~streambuf(); + + inline char* base() const; + inline char* ebuf() const; + inline char* pbase() const; + inline char* pptr() const; + inline char* epptr() const; + inline char* eback() const; + inline char* gptr() const; + inline char* egptr() const; + inline int blen() const; + inline void setp(char*,char*); + inline void setg(char*,char*,char*); + inline void pbump(int); + inline void gbump(int); + + void setb(char*,char*,int =0); + inline int unbuffered() const; + void unbuffered(int); + int allocate(); + virtual int doallocate(); + +private: + int _fAlloc; + int _fUnbuf; + int x_lastc; + char* _base; + char* _ebuf; + char* _pbase; + char* _pptr; + char* _epptr; + char* _eback; + char* _gptr; + char* _egptr; +}; + +inline int streambuf::in_avail() const { return (gptr()<_egptr) ? (_egptr-gptr()) : 0; } +inline int streambuf::out_waiting() const { return (_pptr>=_pbase) ? (_pptr-_pbase) : 0; } + +inline int streambuf::sputbackc(char _c){ return (_eback<gptr()) ? *(--_gptr)=_c : pbackfail(_c); } + +inline int streambuf::sputc(int _i){ return (_pptr<_epptr) ? (unsigned char)(*(_pptr++)=(char)_i) : overflow(_i); } + +inline char* streambuf::base() const { return _base; } +inline char* streambuf::ebuf() const { return _ebuf; } +inline int streambuf::blen() const {return ((_ebuf > _base) ? (_ebuf-_base) : 0); } +inline char* streambuf::pbase() const { return _pbase; } +inline char* streambuf::pptr() const { return _pptr; } +inline char* streambuf::epptr() const { return _epptr; } +inline char* streambuf::eback() const { return _eback; } +inline char* streambuf::gptr() const { return _gptr; } +inline char* streambuf::egptr() const { return _egptr; } +inline void streambuf::gbump(int n) { if (_egptr) _gptr += n; } +inline void streambuf::pbump(int n) { if (_epptr) _pptr += n; } +inline void streambuf::setg(char * eb, char * g, char * eg) {_eback=eb; _gptr=g; _egptr=eg; x_lastc=EOF; } +inline void streambuf::setp(char * p, char * ep) {_pptr=_pbase=p; _epptr=ep; } +inline int streambuf::unbuffered() const { return _fUnbuf; } +inline void streambuf::unbuffered(int fUnbuf) { _fUnbuf = fUnbuf; } + +// Restore default packing +#pragma pack() + +#endif /* !_INC_STREAMB */ diff --git a/private/oleauto/tools/win16/os2/inc/string.h b/private/oleauto/tools/win16/os2/inc/string.h new file mode 100644 index 000000000..97aafb672 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/string.h @@ -0,0 +1,167 @@ +/*** +*string.h - declarations for string manipulation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the string +* manipulation functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STRING + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memcpy(void *, const void *, + size_t); +void * __cdecl memmove(void *, const void *, + size_t); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +char * __cdecl strcat(char *, const char *); +char * __cdecl strchr(const char *, int); +int __cdecl strcmp(const char *, const char *); +int __cdecl _strcmpi(const char *, const char *); +int __cdecl strcoll(const char *, const char *); +int __cdecl _stricmp(const char *, const char *); +char * __cdecl strcpy(char *, const char *); +size_t __cdecl strcspn(const char *, const char *); +char * __cdecl _strdup(const char *); +char * __cdecl _strerror(const char *); +char * __cdecl strerror(int); +size_t __cdecl strlen(const char *); +char * __cdecl _strlwr(char *); +char * __cdecl strncat(char *, const char *, + size_t); +int __cdecl strncmp(const char *, const char *, + size_t); +int __cdecl _strnicmp(const char *, const char *, + size_t); +char * __cdecl strncpy(char *, const char *, + size_t); +char * __cdecl _strnset(char *, int, size_t); +char * __cdecl strpbrk(const char *, + const char *); +char * __cdecl strrchr(const char *, int); +char * __cdecl _strrev(char *); +char * __cdecl _strset(char *, int); +size_t __cdecl strspn(const char *, const char *); +char * __cdecl strstr(const char *, + const char *); +char * __cdecl strtok(char *, const char *); +char * __cdecl _strupr(char *); +size_t __cdecl strxfrm (char *, const char *, + size_t); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemmove(void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); +char __far * __far __cdecl _fstrcat(char __far *, const char __far *); +char __far * __far __cdecl _fstrchr(const char __far *, int); +int __far __cdecl _fstrcmp(const char __far *, const char __far *); +int __far __cdecl _fstricmp(const char __far *, const char __far *); +char __far * __far __cdecl _fstrcpy(char __far *, const char __far *); +size_t __far __cdecl _fstrcspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrdup(const char __far *); +char __near * __far __cdecl _nstrdup(const char __far *); +size_t __far __cdecl _fstrlen(const char __far *); +char __far * __far __cdecl _fstrlwr(char __far *); +char __far * __far __cdecl _fstrncat(char __far *, const char __far *, + size_t); +int __far __cdecl _fstrncmp(const char __far *, const char __far *, + size_t); +int __far __cdecl _fstrnicmp(const char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrncpy(char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrnset(char __far *, int, size_t); +char __far * __far __cdecl _fstrpbrk(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrrchr(const char __far *, int); +char __far * __far __cdecl _fstrrev(char __far *); +char __far * __far __cdecl _fstrset(char __far *, int); +size_t __far __cdecl _fstrspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrstr(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrtok(char __far *, const char __far *); +char __far * __far __cdecl _fstrupr(char __far *); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +int __cdecl strcmpi(const char *, const char *); +int __cdecl stricmp(const char *, const char *); +char * __cdecl strdup(const char *); +char * __cdecl strlwr(char *); +int __cdecl strnicmp(const char *, const char *, + size_t); +char * __cdecl strnset(char *, int, size_t); +char * __cdecl strrev(char *); +char * __cdecl strset(char *, int); +char * __cdecl strupr(char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STRING +#endif /* _INC_STRING */ diff --git a/private/oleauto/tools/win16/os2/inc/strstrea.h b/private/oleauto/tools/win16/os2/inc/strstrea.h new file mode 100644 index 000000000..f79af25e6 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/strstrea.h @@ -0,0 +1,86 @@ +/*** +*strstream.h - definitions/declarations for strstreambuf, strstream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the strstream and strstreambuf classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_STRSTREAM +#define _INC_STRSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +class strstreambuf : public streambuf { +public: + strstreambuf(); + strstreambuf(int); + strstreambuf(char *, int, char * = 0); + strstreambuf(unsigned char *, int, unsigned char * = 0); + strstreambuf(signed char *, int, signed char * = 0); + strstreambuf(void * (*a)(long), void (*f) (void*)); + ~strstreambuf(); + + void freeze(int =1); + char* str(); + +virtual int overflow(int); +virtual int underflow(); +virtual streambuf* setbuf(char *, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +virtual int sync(); // not in spec. + +protected: +virtual int doallocate(); +private: + int x_dynamic; + int x_bufmin; + int _fAlloc; + int x_static; + void * (* x_alloc)(long); + void (* x_free)(void *); +}; + +class istrstream : public istream { +public: + istrstream(char*); + istrstream(char*, int); + ~istrstream(); + +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char* str() { return rdbuf()->str(); } +}; + +class ostrstream : public ostream { +public: + ostrstream(); + ostrstream(char*, int, int = ios::out); + ~ostrstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char* str() { return rdbuf()->str(); } +}; + +class strstream : public iostream { // strstreambase ??? +public: + strstream(); + strstream(char *, int, int); + ~strstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } // not in spec. +inline strstreambuf* rdbuf() const { return (strstreambuf*) ostream::rdbuf(); } +inline char* str() { return rdbuf()->str(); } +}; + +// Restore default packing +#pragma pack() + +#endif // !_INC_STRSTREAM diff --git a/private/oleauto/tools/win16/os2/inc/sys/locking.h b/private/oleauto/tools/win16/os2/inc/sys/locking.h new file mode 100644 index 000000000..f3c24c2d8 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/sys/locking.h @@ -0,0 +1,30 @@ +/*** +*sys\locking.h - flags for locking() function +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the flags for the locking() function. +* [System V] +* +****/ + +#ifndef _INC_LOCKING + +#define _LK_UNLCK 0 /* unlock the file region */ +#define _LK_LOCK 1 /* lock the file region */ +#define _LK_NBLCK 2 /* non-blocking lock */ +#define _LK_RLCK 3 /* lock for writing */ +#define _LK_NBRLCK 4 /* non-blocking lock for writing */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define LK_UNLCK _LK_UNLCK +#define LK_LOCK _LK_LOCK +#define LK_NBLCK _LK_NBLCK +#define LK_RLCK _LK_RLCK +#define LK_NBRLCK _LK_NBRLCK +#endif + +#define _INC_LOCKING +#endif /* _INC_LOCKING */ diff --git a/private/oleauto/tools/win16/os2/inc/sys/stat.h b/private/oleauto/tools/win16/os2/inc/sys/stat.h new file mode 100644 index 000000000..55c4a72f2 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/sys/stat.h @@ -0,0 +1,104 @@ +/*** +*sys\stat.h - defines structure used by stat() and fstat() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structure used by the stat() and fstat() +* routines. +* [System V] +* +****/ + +#ifndef _INC_STAT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _TIME_T_DEFINED +typedef unsigned long time_t; +#define _TIME_T_DEFINED +#endif + +/* define structure for returning status information */ + +#ifndef _STAT_DEFINED +#pragma pack(2) + +struct _stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; +#endif + +#pragma pack() +#define _STAT_DEFINED +#endif + +#define _S_IFMT 0170000 /* file type mask */ +#define _S_IFDIR 0040000 /* directory */ +#define _S_IFCHR 0020000 /* character special */ +#define _S_IFREG 0100000 /* regular */ +#define _S_IREAD 0000400 /* read permission, owner */ +#define _S_IWRITE 0000200 /* write permission, owner */ +#define _S_IEXEC 0000100 /* execute/search permission, owner */ + + +/* function prototypes */ + +int __cdecl _fstat(int, struct _stat *); +int __cdecl _stat(char *, struct _stat *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define S_IFMT _S_IFMT +#define S_IFDIR _S_IFDIR +#define S_IFCHR _S_IFCHR +#define S_IFREG _S_IFREG +#define S_IREAD _S_IREAD +#define S_IWRITE _S_IWRITE +#define S_IEXEC _S_IEXEC + +int __cdecl fstat(int, struct stat *); +int __cdecl stat(char *, struct stat *); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_STAT +#endif /* _INC_STAT */ diff --git a/private/oleauto/tools/win16/os2/inc/sys/timeb.h b/private/oleauto/tools/win16/os2/inc/sys/timeb.h new file mode 100644 index 000000000..498ee0938 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/sys/timeb.h @@ -0,0 +1,69 @@ +/*** +*sys\timeb.h - definition/declarations for ftime() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file define the ftime() function and the types it uses. +* [System V] +* +****/ + +#ifndef _INC_TIMEB + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _TIME_T_DEFINED +typedef unsigned long time_t; +#define _TIME_T_DEFINED +#endif + +/* structure returned by ftime system call */ + +#ifndef _TIMEB_DEFINED +#pragma pack(2) + +struct _timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; +#endif + +#pragma pack() +#define _TIMEB_DEFINED +#endif + + +/* function prototypes */ + +void __cdecl _ftime(struct _timeb *); + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +void __cdecl ftime(struct timeb *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_TIMEB +#endif /* _INC_TIMEB */ diff --git a/private/oleauto/tools/win16/os2/inc/sys/types.h b/private/oleauto/tools/win16/os2/inc/sys/types.h new file mode 100644 index 000000000..e9d99cf77 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/sys/types.h @@ -0,0 +1,48 @@ +/*** +*sys\types.h - types returned by system level calls for file and time info +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines types used in defining values returned by system +* level calls for file status and time information. +* [System V] +* +****/ + +#ifndef _INC_TYPES + +#ifndef _TIME_T_DEFINED +typedef unsigned long time_t; +#define _TIME_T_DEFINED +#endif + +#ifndef _INO_T_DEFINED +typedef unsigned short _ino_t; /* i-node number (not used on DOS) */ +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef unsigned short ino_t; +#endif +#define _INO_T_DEFINED +#endif + +#ifndef _DEV_T_DEFINED +typedef short _dev_t; /* device code */ +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef short dev_t; +#endif +#define _DEV_T_DEFINED +#endif + +#ifndef _OFF_T_DEFINED +typedef long _off_t; /* file offset value */ +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef long off_t; +#endif +#define _OFF_T_DEFINED +#endif + +#define _INC_TYPES +#endif /* _INC_TYPES */ diff --git a/private/oleauto/tools/win16/os2/inc/sys/utime.h b/private/oleauto/tools/win16/os2/inc/sys/utime.h new file mode 100644 index 000000000..81a7b2c96 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/sys/utime.h @@ -0,0 +1,66 @@ +/*** +*sys\utime.h - definitions/declarations for utime() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structure used by the utime routine to set +* new file access and modification times. NOTE - MS-DOS +* does not recognize access time, so this field will +* always be ignored and the modification time field will be +* used to set the new time. +* +****/ + +#ifndef _INC_UTIME + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _TIME_T_DEFINED +typedef unsigned long time_t; +#define _TIME_T_DEFINED +#endif + +/* define struct used by utime() function */ + +#ifndef _UTIMBUF_DEFINED + +struct _utimbuf { + time_t actime; /* access time */ + time_t modtime; /* modification time */ + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct utimbuf { + time_t actime; /* access time */ + time_t modtime; /* modification time */ + }; +#endif + +#define _UTIMBUF_DEFINED +#endif + + +/* function prototypes */ + +int __cdecl _utime(char *, struct _utimbuf *); + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +int __cdecl utime(char *, struct utimbuf *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_UTIME +#endif /* _INC_UTIME */ diff --git a/private/oleauto/tools/win16/os2/inc/test.h b/private/oleauto/tools/win16/os2/inc/test.h new file mode 100644 index 000000000..232fe6cd1 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/test.h @@ -0,0 +1,248 @@ +/* Test.h -- testing include file. + * + * This include file contains macros and functions for reporting + * test failures. + * + * Required constants: + * + * test -- char array, name of test. + * perfect -- int, test success/failure flag, == 0 -> fail + * + * + * Macros/functions defined are: + * + * check( e ) -- confirm that expression e is zero. + * checke( e1, e2 ) -- confirm that expressions e1 and e2 are equal. + * checkne( e1, e2 ) -- confirm that expressions e1 and e2 are NOT equal. + * fail( n ) -- report failure, test number specified. + * faill( ) -- report failure, no test number specified. + * finish() -- summarize test pass/fail status. + * + * + * Modifications + * M000 22-Mar-89 waltcr + * - added #includes for stdio, and stdlib. removed defines of cdecl and near. + * M001 06-Apr-89 waltcr + * - doscalls doesn't exist anymore. now use os2.h. change DOSSLEEP to DosSleep + * M001 06-Apr-89 waltcr + * - define REGVARS macro to help find more optimization bugs. + * M002 20-May-89 waltcr + * - convert function declerations to new style function declerations. + * M003 06-Jun-89 waltcr + * - define INCL_NOPM so when os2.h is included, pm headers are not included. + * M004 27-Mar-90 mattheww + * - define far etc. to nothing if using c386 compiler + * M005 29-Mar-90 waltcr + * - merge in CXX test.h - change finish() to macro, define TEST_H. + * M006 02-Apr-90 mrw + * - remove MTHREAD if's and put them into seperate THREAD.H + * M007 10-Apr-90 chauv + * - changed most "int" variables to "unsigned long" variables. + * - changed those "%d" associated with "int" variables to "%lu" in printf(). + * M008 12-Apr-90 mattheww + * - move c386 specific defines to a seperate include file c386.h (undo M004) + * - put printf back in check_func (mistakenly deleted before) + * M009 31-May-90 brucemc + * - added CALLCONV as macro for _cdecl vs _stdcall prototypes. + * M010 06-Jun-90 chauv + * - changed all "unsigned long" back to "int" and duplicate these + * - functions for unsigned long adding "32" to function name. + * M011 20-Jun-90 mattheww + * - fixed format spec for printing line number in faill_func() + * M012 28-Dec-90 alans + * - undefined fail() when __IOSTREAM_H is defined due to conflict with + * - ios::fail() member function. + * M013 16-May-91 tomca + * - c7/386 defines _M_I386 only (not M_I386) + * M014 01-Aug-91 bos + * - Modified printf statements for Failure output to confirm with + * - standard C error output. This allows PWB and M to track a test's + * - runtime errors in the build results window. + * M015 01-Aug-91 xiangjun + * - remove "#include <callcon.h>" because of the usage change of "stdcall" + * - and "#define CALLCONV" to make the tests still valid. + * M016 23-Aug-91 georgech + * - remove _threadid duplicated in thread.h as far + * + */ + + +#include <stdio.h> /* M000 */ +#include <stdlib.h> +/* M009 */ +/* M015 +#include <callcon.h> +*/ +#define CALLCONV + + +/* M005*/ +#ifndef TEST_H +#define TEST_H + +/* M005*/ +#if defined( __cplusplus ) +extern "C" { +#endif + +/* M008 */ +#if defined(M_I386) || defined(_M_I386) + #include <c386.h> +#endif + +#define REGVARS register int _r1 = 1; register int _r2 = 2 /* M002 */ + + +#define T(x) x +#define V(x) x +#define PDV(x) x +#define starthread() perfect = 0 +#define startest() perfect = 0 + +extern char Result[ 64 ] ; +extern unsigned Synchronize ; +extern char test[]; +extern int T(perfect); +// extern int * _threadid ; /* M016 */ + +/* the use of "far pascal" was conflicting with use of -Za switch, so */ +/* replaced prototype of DOSSLEEP with following three lines, 7-6-88 */ + +void check_func(int a,int l); +void checke_func(int a,int b,int l); +void checkne_func(int a,int b,int l); +void fail_func(int n,int l); +void faill_func(int l); + +/* M010 */ +void check_func32(unsigned long a,unsigned long l); +void checke_func32(unsigned long a,unsigned long b,unsigned long l); +void checkne_func32(unsigned long a,unsigned long b,unsigned long l); +void fail_func32(unsigned long n,unsigned long l); +void faill_func32(unsigned long l); + + +/* This macro is used to confirm its argument is zero. +*/ +#define check( a ) check_func( (int)(a), __LINE__ ) +#define check32( a ) check_func32( (unsigned long)(a), __LINE__ ) /* M010 */ + +void check_func( int a, int l ) +{ + if( !a ) return; + printf("%s(%d): Failure: --- %d != 0\n",test, l, a ); + V(perfect) = 1; +} + +/* M010 */ +void check_func32( unsigned long a, unsigned long l ) +{ + if( !a ) return; + printf("%s(%lu): Failure: --- %lu != 0\n",test, l, a ); + V(perfect) = 1; +} + + +/* This macro is used to confirm its arguments are equal. +*/ +#define checke( a, b ) checke_func( (int)(a), (int)(b), __LINE__ ) +#define checke32( a, b ) checke_func32( (unsigned long)(a), (unsigned long)(b), __LINE__ ) /* M010 */ + +void checke_func(int a, int b, int l ) +{ + if( a == b ) return; + printf("%s(%d): Failure: --- %d != %d\n",test, l, a, b ); + V(perfect) = 1; +} + +/* M010 */ +void checke_func32(unsigned long a, unsigned long b, unsigned long l ) +{ + if( a == b ) return; + printf("%s(%lu): Failure: --- %lu != %lu\n",test, l, a, b ); + V(perfect) = 1; +} + + +/* This macro is used to confirm its arguments are NOT equal. +*/ +#define checkne( a, b ) checkne_func( (int)(a), (int)(b), __LINE__ ) +#define checkne32( a, b ) checkne_func32( (int)(a), (int)(b), __LINE__ ) /* M010 */ + +void checkne_func( int a, int b, int l ) +{ + if( a != b ) return; + printf("%s(%d): Failure: --- %d == %d\n",test, l, a, b ); + V(perfect) = 1; +} + +/* M010 */ +void checkne_func32( unsigned long a, unsigned long b, unsigned long l ) +{ + if( a != b ) return; + printf("%s(%lu): Failure: --- %lu == %lu\n",test, l, a, b ); + V(perfect) = 1; +} + + +/* This macro is used to report failures of tests that are explicitely + * numbered. +*/ +#define fail( n ) fail_func( (n), __LINE__ ) +#define fail32( n ) fail_func32( (n), __LINE__ ) /* M010 */ + +void fail_func( int n, int l ) +{ + printf("%s(%d): Failure: --- test %d\n",test, l, n ); + V(perfect) = 1; +} + +/* M010 */ +void fail_func32( unsigned long n, unsigned long l ) +{ + printf("%s(%lu): Failure: --- test %lu\n",test, l, n ); + V(perfect) = 1; +} + + +/* This macro is used to report failures of tests that are NOT explicitely + * numbered. +*/ +#define faill( ) faill_func( __LINE__ ) +#define faill32( ) faill_func32( __LINE__ ) /* M010 */ + +void faill_func( int l ) +{ + printf("%s(%d): Failure:\n",test, l); /* M011 */ + V(perfect) = 1; +} + +/* M010 */ +void faill_func32( unsigned long l ) +{ + printf("%s(%lu): Failure:\n",test, l); + V(perfect) = 1; +} + + +/* Report test results +** +*/ + + +#define finish() \ + if( !V(perfect) ) printf("%s: ***** PASSED *****\n",test); \ + else printf("%s: ----- FAILED -----\n",test); \ + return (int)( V(perfect) ? 1 : 0 ) + +/* M012 */ +#if defined(__IOSTREAM_H) + #undef fail +#endif + +#if defined( __cplusplus ) +}; +#endif + + +#endif /* #ifndef TEST_H */ diff --git a/private/oleauto/tools/win16/os2/inc/time.h b/private/oleauto/tools/win16/os2/inc/time.h new file mode 100644 index 000000000..934df5a3c --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/time.h @@ -0,0 +1,125 @@ +/*** +*time.h - definitions/declarations for time routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the various declarations and definitions +* for the time routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_TIME + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* implementation defined time types */ + +#ifndef _TIME_T_DEFINED +typedef unsigned long time_t; +#define _TIME_T_DEFINED +#endif + +#ifndef _CLOCK_T_DEFINED +typedef long clock_t; +#define _CLOCK_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* structure for use with localtime(), gmtime(), etc. */ + +#ifndef _TM_DEFINED +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; +#define _TM_DEFINED +#endif + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* clock ticks macro - ANSI version */ + +#define CLOCKS_PER_SEC 1000 + + +/* extern declarations for the global variables used by the ctime family of + * routines. + */ + +extern int __near __cdecl _daylight; /* non-zero if daylight savings time is used */ +extern long __near __cdecl _timezone; /* difference in seconds between GMT and local time */ +extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */ + + +/* function prototypes */ + +double __cdecl difftime(time_t, time_t); + +char * __cdecl asctime(const struct tm *); +char * __cdecl ctime(const time_t *); +#ifndef _WINDLL +clock_t __cdecl clock(void); +#endif +struct tm * __cdecl gmtime(const time_t *); +struct tm * __cdecl localtime(const time_t *); +time_t __cdecl mktime(struct tm *); +#ifndef _WINDLL +size_t __cdecl strftime(char *, size_t, const char *, + const struct tm *); +#endif +char * __cdecl _strdate(char *); +char * __cdecl _strtime(char *); +time_t __cdecl time(time_t *); +void __cdecl _tzset(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define CLK_TCK CLOCKS_PER_SEC + +extern int __near __cdecl daylight; +extern long __near __cdecl timezone; +extern char * __near __cdecl tzname[2]; + +void __cdecl tzset(void); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#define _INC_TIME +#endif /* _INC_TIME */ diff --git a/private/oleauto/tools/win16/os2/inc/toolhelp.h b/private/oleauto/tools/win16/os2/inc/toolhelp.h new file mode 100644 index 000000000..42cc6e1df --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/toolhelp.h @@ -0,0 +1,505 @@ +/************************************************************************** + * TOOLHELP.H + * + * Header file for applications using the TOOLHELP.DLL + * + **************************************************************************/ + +#ifndef TOOLHELP_H +#define TOOLHELP_H + +/* ----- General symbols ----- */ +#define MAX_DATA 11 +#define MAX_PATH 255 +#define MAX_MODULE_NAME 8 + 1 +#define MAX_CLASSNAME 255 + +/* ----- Global heap walking ----- */ + +typedef struct tagGLOBALINFO +{ + DWORD dwSize; + WORD wcItems; + WORD wcItemsFree; + WORD wcItemsLRU; +} GLOBALINFO; + +typedef struct tagGLOBALENTRY +{ + DWORD dwSize; + DWORD dwAddress; + DWORD dwBlockSize; + HANDLE hBlock; + WORD wcLock; + WORD wcPageLock; + WORD wFlags; + BOOL wHeapPresent; + HANDLE hOwner; + WORD wType; + WORD wData; + DWORD dwNext; + DWORD dwNextAlt; +} GLOBALENTRY; + + BOOL FAR PASCAL GlobalInfo( + GLOBALINFO FAR *lpGlobalInfo); + + BOOL FAR PASCAL GlobalFirst( + GLOBALENTRY FAR *lpGlobal, + WORD wFlags); + + BOOL FAR PASCAL GlobalNext( + GLOBALENTRY FAR *lpGlobal, + WORD wFlags); + + BOOL FAR PASCAL GlobalEntryHandle( + GLOBALENTRY FAR *lpGlobal, + HANDLE hItem); + + BOOL FAR PASCAL GlobalEntryModule( + GLOBALENTRY FAR *lpGlobal, + HANDLE hModule, + WORD wSeg); + +/* GlobalFirst()/GlobalNext() flags */ +#define GLOBAL_ALL 0 +#define GLOBAL_LRU 1 +#define GLOBAL_FREE 2 + +/* GLOBALENTRY.wType entries */ +#define GT_UNKNOWN 0 +#define GT_DGROUP 1 +#define GT_DATA 2 +#define GT_CODE 3 +#define GT_TASK 4 +#define GT_RESOURCE 5 +#define GT_MODULE 6 +#define GT_FREE 7 +#define GT_INTERNAL 8 +#define GT_SENTINEL 9 +#define GT_BURGERMASTER 10 + +/* If GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: */ +#define GD_USERDEFINED 0 +#define GD_CURSORCOMPONENT 1 +#define GD_BITMAP 2 +#define GD_ICONCOMPONENT 3 +#define GD_MENU 4 +#define GD_DIALOG 5 +#define GD_STRING 6 +#define GD_FONTDIR 7 +#define GD_FONT 8 +#define GD_ACCELERATORS 9 +#define GD_RCDATA 10 +#define GD_ERRTABLE 11 +#define GD_CURSOR 12 +#define GD_ICON 14 +#define GD_NAMETABLE 15 +#define GD_MAX_RESOURCE 15 + +/* GLOBALENTRY.wFlags */ +#define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */ + +/* ----- Local heap walking ----- */ + +typedef struct tagLOCALINFO +{ + DWORD dwSize; + WORD wcItems; +} LOCALINFO; + +typedef struct tagLOCALENTRY +{ + DWORD dwSize; + HANDLE hHandle; + WORD wAddress; + WORD wSize; + WORD wFlags; + WORD wcLock; + WORD wType; + WORD hHeap; + WORD wHeapType; + WORD wNext; +} LOCALENTRY; + + BOOL FAR PASCAL LocalInfo( + LOCALINFO FAR *lpLocal, + HANDLE hHeap); + + BOOL FAR PASCAL LocalFirst( + LOCALENTRY FAR *lpLocal, + HANDLE hHeap); + + BOOL FAR PASCAL LocalNext( + LOCALENTRY FAR *lpLocal); + +/* LOCALENTRY.wHeapType flags */ +#define NORMAL_HEAP 0 +#define USER_HEAP 1 +#define GDI_HEAP 2 + +/* LOCALENTRY.wFlags */ +#define LF_FIXED 1 +#define LF_FREE 2 +#define LF_MOVEABLE 4 + +/* LOCALENTRY.wType */ +#define LT_NORMAL 0 +#define LT_FREE 0xff +#define LT_GDI_PEN 1 /* LT_GDI_* is for GDI's heap */ +#define LT_GDI_BRUSH 2 +#define LT_GDI_FONT 3 +#define LT_GDI_PALETTE 4 +#define LT_GDI_BITMAP 5 +#define LT_GDI_RGN 6 +#define LT_GDI_DC 7 +#define LT_GDI_DISABLED_DC 8 +#define LT_GDI_METADC 9 +#define LT_GDI_METAFILE 10 +#define LT_GDI_MAX LT_GDI_METAFILE +#define LT_USER_CLASS 1 /* LT_USER_* is for USER's heap */ +#define LT_USER_WND 2 +#define LT_USER_STRING 3 +#define LT_USER_MENU 4 +#define LT_USER_CLIP 5 +#define LT_USER_CBOX 6 +#define LT_USER_PALETTE 7 +#define LT_USER_ED 8 +#define LT_USER_BWL 9 +#define LT_USER_OWNERDRAW 10 +#define LT_USER_SPB 11 +#define LT_USER_CHECKPOINT 12 +#define LT_USER_DCE 13 +#define LT_USER_MWP 14 +#define LT_USER_PROP 15 +#define LT_USER_LBIV 16 +#define LT_USER_MISC 17 +#define LT_USER_ATOMS 18 +#define LT_USER_LOCKINPUTSTATE 19 +#define LT_USER_HOOKLIST 20 +#define LT_USER_USERSEEUSERDOALLOC 21 +#define LT_USER_HOTKEYLIST 22 +#define LT_USER_POPUPMENU 23 +#define LT_USER_HANDLETABLE 32 +#define LT_USER_MAX LT_USER_HANDLETABLE + +/* ----- Stack Tracing ----- */ + +typedef struct tagSTACKTRACEENTRY +{ + DWORD dwSize; + HANDLE hTask; + WORD wSS; + WORD wBP; + WORD wCS; + WORD wIP; + HANDLE hModule; + WORD wSegment; + WORD wFlags; +} STACKTRACEENTRY; + + BOOL FAR PASCAL StackTraceFirst( + STACKTRACEENTRY FAR *lpStackTrace, + HANDLE hTask); + + BOOL FAR PASCAL StackTraceCSIPFirst( + STACKTRACEENTRY FAR *lpStackTrace, + WORD wSS, + WORD wCS, + WORD wIP, + WORD wBP); + + BOOL FAR PASCAL StackTraceNext( + STACKTRACEENTRY FAR *lpStackTrace); + +/* STACKTRACEENTRY.wFlags values */ +#define FRAME_FAR 0 +#define FRAME_NEAR 1 + +/* ----- Module list walking ----- */ + +typedef struct tagMODULEENTRY +{ + DWORD dwSize; + char szModule[MAX_MODULE_NAME + 1]; + HANDLE hModule; + WORD wUsageFlags; + char szExePath[MAX_PATH + 1]; + WORD wNext; +} MODULEENTRY; + + BOOL FAR PASCAL ModuleFirst( + MODULEENTRY FAR *lpModule); + + BOOL FAR PASCAL ModuleNext( + MODULEENTRY FAR *lpModule); + + HANDLE FAR PASCAL ModuleFindName( + MODULEENTRY FAR *lpModule, + LPSTR lpstrName); + + HANDLE FAR PASCAL ModuleFindHandle( + MODULEENTRY FAR *lpModule, + HANDLE hModule); + +/* ----- Task list walking ----- */ + +typedef struct tagTASKENTRY +{ + DWORD dwSize; + HANDLE hTask; + HANDLE hTaskParent; + HANDLE hInst; + HANDLE hModule; + WORD wSS; + WORD wSP; + WORD wStackTop; + WORD wStackMinimum; + WORD wStackBottom; + WORD wcEvents; + HANDLE hQueue; + char szModule[MAX_MODULE_NAME + 1]; + WORD wPSPOffset; + HANDLE hNext; +} TASKENTRY; + + BOOL FAR PASCAL TaskFirst( + TASKENTRY FAR *lpTask); + + BOOL FAR PASCAL TaskNext( + TASKENTRY FAR *lpTask); + + BOOL FAR PASCAL TaskFindHandle( + TASKENTRY FAR *lpTask, + HANDLE hTask); + + DWORD FAR PASCAL TaskSetCSIP( + HANDLE hTask, + WORD wCS, + WORD wIP); + + DWORD FAR PASCAL TaskGetCSIP( + HANDLE hTask, + WORD wCS, + WORD wIP); + + BOOL FAR PASCAL TaskSwitch( + HANDLE hTask, + DWORD dwNewCSIP); + +/* ----- Window Class enumeration ----- */ + +typedef struct tagCLASSENTRY +{ + DWORD dwSize; + HANDLE hInst; + char szClassName[MAX_CLASSNAME + 1]; + WORD wNext; +} CLASSENTRY; + + BOOL FAR PASCAL ClassFirst( + CLASSENTRY FAR *lpClass); + + BOOL FAR PASCAL ClassNext( + CLASSENTRY FAR *lpClass); + +/* ----- Information functions ----- */ + +typedef struct tagMEMMANINFO +{ + DWORD dwSize; + DWORD dwLargestFreeBlock; + DWORD dwMaxPagesAvailable; + DWORD dwMaxPagesLockable; + DWORD dwTotalLinearSpace; + DWORD dwTotalUnlockedPages; + DWORD dwFreePages; + DWORD dwTotalPages; + DWORD dwFreeLinearSpace; + DWORD dwSwapFilePages; + WORD wPageSize; +} MEMMANINFO; + + BOOL FAR PASCAL MemManInfo( + MEMMANINFO FAR *lpEnhMode); + +typedef struct tagUSERHEAPINFO +{ + DWORD dwSize; + WORD wHeapFree; + WORD wMaxHeapSize; + WORD wPercentFree; + HANDLE hSegment; +} USERHEAPINFO; + + BOOL FAR PASCAL UserHeapInfo( + USERHEAPINFO FAR *lpUser); + +typedef struct tagGDIHEAPINFO +{ + DWORD dwSize; + WORD wHeapFree; + WORD wMaxHeapSize; + WORD wPercentFree; + HANDLE hSegment; +} GDIHEAPINFO; + + BOOL FAR PASCAL GDIHeapInfo( + GDIHEAPINFO FAR *lpGDI); + +/* ----- Interrupt Handling ----- */ + +typedef void (FAR PASCAL *LPFNINTCALLBACK)(void); + + BOOL FAR PASCAL InterruptRegister( + HANDLE hTask, + LPFNINTCALLBACK lpfnIntCallback); + + BOOL FAR PASCAL InterruptUnRegister( + HANDLE hTask); + +/* Hooked interrupts */ +#define INT_DIV0 0 +#define INT_1 1 +#define INT_2 2 +#define INT_3 3 +#define INT_UDINSTR 6 +#define INT_GPFAULT 13 +#define INT_CTLALTSYSRQ 256 + +/* Notifications: + * When a notification callback is called, two parameters are passed + * in: a WORD, wID, and another DWORD, dwData. wID is one of + * the values NFY_* below. Callback routines should ignore unrecog- + * nized values to preserve future compatibility. Callback routines + * are also passed a dwData value. This may contain data or may be + * a FAR pointer to a structure, or may not be used depending on + * which notification is being received. + * + * In all cases, if the return value of the callback is TRUE, the + * notification will NOT be passed on to other callbacks. It has + * been handled. This should be used sparingly and only with certain + * notifications. Callbacks almost always return FALSE. + */ + +/* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps + * should ignore these. + */ +#define NFY_UNKNOWN 0 + +/* NFY_LOADSEG: dwData points to a NFYLOADSEG structure */ +#define NFY_LOADSEG 1 +typedef struct tagNFYLOADSEG +{ + DWORD dwSize; + WORD wSelector; + WORD wSegNum; + WORD wType; + HANDLE hInstance; + LPSTR lpstrModuleName; +} NFYLOADSEG; + +/* NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed */ +#define NFY_FREESEG 2 + +/* NFY_STARTTASK: dwData points to a NFYSTARTTASK structure */ +#define NFY_STARTTASK 3 +typedef struct tagNFYSTARTTASK +{ + DWORD dwSize; + HANDLE hInstance; + WORD wCS; + WORD wIP; +} NFYSTARTTASK; + +/* NFY_EXITTASK: The low byte of dwData contains the program exit code */ +#define NFY_EXITTASK 4 + +/* NFY_LOADDLL: dwData points to a NFYLOADDLL structure */ +#define NFY_LOADDLL 5 +typedef struct tagNFYLOADDLL +{ + DWORD dwSize; + HANDLE hModule; + WORD wCS; + WORD wIP; +} NFYLOADDLL; + +/* NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed */ +#define NFY_DELMODULE 6 + +/* NFY_DEBUGSTR: dwData points to the string to be output */ +#define NFY_DEBUGSTR 7 + +/* NFY_RIP: dwData points to a NFYRIP structure */ +#define NFY_RIP 8 +typedef struct tagNFYRIP +{ + WORD wExitCode; + WORD wCS; + WORD wIP; +} NFYRIP; + +/* NFY_TASKIN: LOWORD(dwData) is the hTask for the entering task */ +#define NFY_TASKIN 9 + +/* NFY_TASKOUT: LOWORD(dwData) is the hTask for the task being left */ +#define NFY_TASKOUT 10 + +/* NFY_INCHAR: Return value from callback is used. If NULL, mapped to 'i' */ +#define NFY_INCHAR 11 + +/* NFY_OUTSTR: dwData points to the string to be displayed */ +#define NFY_OUTSTR 12 + +typedef BOOL (FAR PASCAL *LPFNNOTIFYCALLBACK)( + WORD wID, + DWORD dwData); + + BOOL FAR PASCAL NotifyRegister( + HANDLE hTask, + LPFNNOTIFYCALLBACK lpfn, + WORD wFlags); + + BOOL FAR PASCAL NotifyUnRegister( + HANDLE hTask); + +/* NotifyRegister() flags */ +#define NF_NORMAL 0 +#define NF_TASKSWITCH 1 +#define NF_RIP 2 +#define NF_DEBUGSTR 4 + +/* ----- Miscellaneous ----- */ + + void FAR PASCAL TerminateApp( + HANDLE hTask, + WORD wFlags); + +/* TerminateApp() flag values */ +#define UAE_BOX 0 +#define NO_UAE_BOX 1 + + DWORD FAR PASCAL MemoryRead( + WORD wSel, + DWORD dwOffset, + LPSTR lpBuffer, + DWORD dwcb); + + DWORD FAR PASCAL MemoryWrite( + WORD wSel, + DWORD dwOffset, + LPSTR lpBuffer, + DWORD dwcb); + +typedef struct tagTIMERINFO +{ + DWORD dwSize; + DWORD dwmsSinceStart; + DWORD dwmsThisVM; +} TIMERINFO; + + BOOL FAR PASCAL TimerCount( + TIMERINFO FAR *lpTimer); + +#endif /* ifndef TOOLHELP_H */ diff --git a/private/oleauto/tools/win16/os2/inc/varargs.h b/private/oleauto/tools/win16/os2/inc/varargs.h new file mode 100644 index 000000000..4d15cec14 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/varargs.h @@ -0,0 +1,52 @@ +/*** +*varargs.h - XENIX style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines XENIX style macros for accessing arguments of a +* function which takes a variable number of arguments. +* [System V] +* +****/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifdef __STDC__ +#error varargs.h incompatible with ANSI (use stdarg.h) +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/os2/inc/ver.h b/private/oleauto/tools/win16/os2/inc/ver.h new file mode 100644 index 000000000..cc8f0501e --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/ver.h @@ -0,0 +1,255 @@ +/*****************************************************************************\ +* * +* ver.h - Version management functions, types, and definitions * +* * +* Include file for VER.DLL and VER.LIB. These libraries are * +* designed to allow version stamping of Windows executable files* +* and of special .VER files for DOS executable files. * +* * +* The API is unchanged for LIB and DLL versions. * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +******************************************************************************* +* +* #define LIB - To be used with VER.LIB (default is for VER.DLL) +* +\*****************************************************************************/ + +#ifndef _INC_VER +#define _INC_VER + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * If .lib version is being used, declare types used in this file. + */ +#ifdef LIB + +#ifndef WINAPI /* don't declare if they're already declared */ +#define WINAPI _far _pascal +#define NEAR _near +#define FAR _far +#define PASCAL _pascal +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef signed long LONG; +typedef unsigned long DWORD; +typedef char far* LPSTR; +typedef const char far* LPCSTR; +typedef int HFILE; +#define OFSTRUCT void /* Not used by the .lib version */ +#define LOWORD(l) ((WORD)(l)) +#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF)) +#define MAKEINTRESOURCE(i) (LPSTR)((DWORD)((WORD)(i))) +#endif /* WINAPI */ + +#else /* LIB */ + +/* If .dll version is being used and we're being included with + * the 3.0 windows.h, #define compatible type aliases. + * If included with the 3.0 windows.h, #define compatible aliases + */ +#ifndef _INC_WINDOWS +#define UINT WORD +#define LPCSTR LPSTR +#define HFILE int +#endif /* !_INC_WINDOWS */ + +#endif /* !LIB */ + +/* ----- RC defines ----- */ +#ifdef RC_INVOKED +#define ID(id) id +#else +#define ID(id) MAKEINTRESOURCE(id) +#endif + +/* ----- Symbols ----- */ +#define VS_FILE_INFO ID(16) /* Version stamp res type */ +#define VS_VERSION_INFO ID(1) /* Version stamp res ID */ +#define VS_USER_DEFINED ID(100) /* User-defined res IDs */ + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FFI_SIGNATURE 0xFEEF04BDL +#define VS_FFI_STRUCVERSION 0x00010000L +#define VS_FFI_FILEFLAGSMASK 0x0000003FL + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FF_DEBUG 0x00000001L +#define VS_FF_PRERELEASE 0x00000002L +#define VS_FF_PATCHED 0x00000004L +#define VS_FF_PRIVATEBUILD 0x00000008L +#define VS_FF_INFOINFERRED 0x00000010L +#define VS_FF_SPECIALBUILD 0x00000020L + +/* ----- VS_VERSION.dwFileOS ----- */ +#define VOS_UNKNOWN 0x00000000L +#define VOS_DOS 0x00010000L +#define VOS_OS216 0x00020000L +#define VOS_OS232 0x00030000L +#define VOS_NT 0x00040000L + +#define VOS__BASE 0x00000000L +#define VOS__WINDOWS16 0x00000001L +#define VOS__PM16 0x00000002L +#define VOS__PM32 0x00000003L +#define VOS__WINDOWS32 0x00000004L + +#define VOS_DOS_WINDOWS16 0x00010001L +#define VOS_DOS_WINDOWS32 0x00010004L +#define VOS_OS216_PM16 0x00020002L +#define VOS_OS232_PM32 0x00030003L +#define VOS_NT_WINDOWS32 0x00040004L + +/* ----- VS_VERSION.dwFileType ----- */ +#define VFT_UNKNOWN 0x00000000L +#define VFT_APP 0x00000001L +#define VFT_DLL 0x00000002L +#define VFT_DRV 0x00000003L +#define VFT_FONT 0x00000004L +#define VFT_VXD 0x00000005L +#define VFT_STATIC_LIB 0x00000007L + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */ +#define VFT2_UNKNOWN 0x00000000L +#define VFT2_DRV_PRINTER 0x00000001L +#define VFT2_DRV_KEYBOARD 0x00000002L +#define VFT2_DRV_LANGUAGE 0x00000003L +#define VFT2_DRV_DISPLAY 0x00000004L +#define VFT2_DRV_MOUSE 0x00000005L +#define VFT2_DRV_NETWORK 0x00000006L +#define VFT2_DRV_SYSTEM 0x00000007L +#define VFT2_DRV_INSTALLABLE 0x00000008L +#define VFT2_DRV_SOUND 0x00000009L +#define VFT2_DRV_COMM 0x0000000AL + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */ +#define VFT2_FONT_RASTER 0x00000001L +#define VFT2_FONT_VECTOR 0x00000002L +#define VFT2_FONT_TRUETYPE 0x00000003L + +/* ----- VerFindFile() flags ----- */ +#define VFFF_ISSHAREDFILE 0x0001 + +#define VFF_CURNEDEST 0x0001 +#define VFF_FILEINUSE 0x0002 +#define VFF_BUFFTOOSMALL 0x0004 + +/* ----- VerInstallFile() flags ----- */ +#define VIFF_FORCEINSTALL 0x0001 +#define VIFF_DONTDELETEOLD 0x0002 + +#define VIF_TEMPFILE 0x00000001L +#define VIF_MISMATCH 0x00000002L +#define VIF_SRCOLD 0x00000004L + +#define VIF_DIFFLANG 0x00000008L +#define VIF_DIFFCODEPG 0x00000010L +#define VIF_DIFFTYPE 0x00000020L + +#define VIF_WRITEPROT 0x00000040L +#define VIF_FILEINUSE 0x00000080L +#define VIF_OUTOFSPACE 0x00000100L +#define VIF_ACCESSVIOLATION 0x00000200L +#define VIF_SHARINGVIOLATION 0x00000400L +#define VIF_CANNOTCREATE 0x00000800L +#define VIF_CANNOTDELETE 0x00001000L +#define VIF_CANNOTRENAME 0x00002000L +#define VIF_CANNOTDELETECUR 0x00004000L +#define VIF_OUTOFMEMORY 0x00008000L + +#define VIF_CANNOTREADSRC 0x00010000L +#define VIF_CANNOTREADDST 0x00020000L + +#define VIF_BUFFTOOSMALL 0x00040000L + +#ifndef RC_INVOKED /* RC doesn't need to see the rest of this */ + +/* ----- Types and structures ----- */ + +typedef signed short int SHORT; + +typedef struct tagVS_FIXEDFILEINFO +{ + DWORD dwSignature; /* e.g. 0xfeef04bd */ + DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */ + DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */ + DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */ + DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */ + DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */ + DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */ + DWORD dwFileType; /* e.g. VFT_DRIVER */ + DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */ + DWORD dwFileDateMS; /* e.g. 0 */ + DWORD dwFileDateLS; /* e.g. 0 */ +} VS_FIXEDFILEINFO; + +/* ----- Function prototypes ----- */ + +UINT WINAPI VerFindFile(UINT uFlags, LPCSTR szFileName, + LPCSTR szWinDir, LPCSTR szAppDir, + LPSTR szCurDir, UINT FAR* lpuCurDirLen, + LPSTR szDestDir, UINT FAR* lpuDestDirLen); + +DWORD WINAPI VerInstallFile(UINT uFlags, + LPCSTR szSrcFileName, LPCSTR szDestFileName, LPCSTR szSrcDir, + LPCSTR szDestDir, LPCSTR szCurDir, LPSTR szTmpFile, UINT FAR* lpuTmpFileLen); + +/* Returns size of version info in bytes */ +DWORD WINAPI GetFileVersionInfoSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD FAR *lpdwHandle); /* Information for use by GetFileVersionInfo */ + +/* Read version info into buffer */ +BOOL WINAPI GetFileVersionInfo( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD dwHandle, /* Information from GetFileVersionSize */ + DWORD dwLen, /* Length of buffer for info */ + void FAR* lpData); /* Buffer to place the data structure */ + +/* Returns size of resource in bytes */ +DWORD WINAPI GetFileResourceSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD FAR *lpdwFileOffset); /* Returns file offset of resource */ + +/* Reads file resource into buffer */ +BOOL WINAPI GetFileResource( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD dwFileOffset, /* File offset or NULL */ + DWORD dwResLen, /* Length of resource to read or NULL */ + void FAR* lpData); /* Pointer to data buffer */ + +UINT WINAPI VerLanguageName(UINT wLang, LPSTR szLang, UINT nSize); + +UINT WINAPI GetWindowsDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +UINT WINAPI GetSystemDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +BOOL WINAPI VerQueryValue(const void FAR* pBlock, LPCSTR lpSubBlock, + void FAR* FAR* lplpBuffer, UINT FAR* lpuLen); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#pragma pack() + +#endif /* !RC_INVOKED */ +#endif /* !_INC_VER */ diff --git a/private/oleauto/tools/win16/os2/inc/vmemory.h b/private/oleauto/tools/win16/os2/inc/vmemory.h new file mode 100644 index 000000000..4a57e93ec --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/vmemory.h @@ -0,0 +1,60 @@ +/*** +* vmemory.h - Virtual Memory (VM) Management Routines +* +* Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file provides prototypes and definitions for +* the virtual memory management routines. +* +*******************************************************************************/ + +#ifndef _INC_VMEMORY + +#if (_MSC_VER <= 600) +#define __far _far +#define __pascal _pascal +#endif + +/* virtual memory handle type */ +typedef unsigned long _vmhnd_t; + +/* null handle value */ +#define _VM_NULL ((_vmhnd_t) 0) + +/* use all available DOS memory for virtual heap */ +#define _VM_ALLDOS 0 + +/* swap areas */ +#define _VM_EMS 1 +#define _VM_XMS 2 +#define _VM_DISK 4 +#define _VM_ALLSWAP (_VM_EMS | _VM_XMS | _VM_DISK) + +/* clean/dirty flags */ +#define _VM_CLEAN 0 +#define _VM_DIRTY 1 + +/* function prototypes */ + +#ifdef __cplusplus +extern "C" { +#endif + +void __far __pascal _vfree(_vmhnd_t); +int __far __pascal _vheapinit(unsigned int, unsigned int, unsigned int); +void __far __pascal _vheapterm(void); +void __far * __far __pascal _vload(_vmhnd_t, int); +void __far * __far __pascal _vlock(_vmhnd_t); +unsigned int __far __pascal _vlockcnt(_vmhnd_t); +_vmhnd_t __far __pascal _vmalloc(unsigned long); +unsigned long __far __pascal _vmsize(_vmhnd_t); +_vmhnd_t __far __pascal _vrealloc(_vmhnd_t , unsigned long); +void __far __pascal _vunlock(_vmhnd_t, int); + +#ifdef __cplusplus +} +#endif + +#define _INC_VMEMORY +#endif /* _INC_VMEMORY */ diff --git a/private/oleauto/tools/win16/os2/inc/windows.h b/private/oleauto/tools/win16/os2/inc/windows.h new file mode 100644 index 000000000..ab1c8ba04 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/windows.h @@ -0,0 +1,5373 @@ +/*****************************************************************************\ +* * +* windows.h - Windows functions, types, and definitions * +* * +* Version 3.10 * +* * +* Copyright (c) 1985-1992, Microsoft Corp. All rights reserved. * +* * +******************************************************************************* +* +* The following symbols control inclusion of various parts of this file: +* +* WINVER Windows version number (0x030a). To exclude +* definitions introduced in version 3.1 (or above) +* #define WINVER 0x0300 before #including <windows.h> +* +* #define: To prevent inclusion of: +* +* NOKERNEL KERNEL APIs and definitions +* NOGDI GDI APIs and definitions +* NOUSER USER APIs and definitions +* NOSOUND Sound APIs and definitions +* NOCOMM Comm driver APIs and definitions +* NODRIVERS Installable driver APIs and definitions +* +* NOMINMAX min() and max() macros +* NOLOGERROR LogError() and related definitions +* NOPROFILER Profiler APIs +* NOMEMMGR Local and global memory management +* NOLFILEIO _l* file I/O routines +* NOOPENFILE OpenFile and related definitions +* NORESOURCE Resource management +* NOATOM Atom management +* NOLANGUAGE Character test routines +* NOLSTRING lstr* string management routines +* NODBCS Double-byte character set routines +* NOKEYBOARDINFO Keyboard driver routines +* NOGDICAPMASKS GDI device capability constants +* NOCOLOR COLOR_* color values +* NOGDIOBJ GDI pens, brushes, fonts +* NODRAWTEXT DrawText() and related definitions +* NOTEXTMETRIC TEXTMETRIC and related APIs +* NOSCALABLEFONT Truetype scalable font support +* NOBITMAP Bitmap support +* NORASTEROPS GDI Raster operation definitions +* NOMETAFILE Metafile support +* NOSYSMETRICS GetSystemMetrics() and related SM_* definitions +* NOSYSTEMPARAMSINFO SystemParametersInfo() and SPI_* definitions +* NOMSG APIs and definitions that use MSG structure +* NOWINSTYLES Window style definitions +* NOWINOFFSETS Get/SetWindowWord/Long offset definitions +* NOSHOWWINDOW ShowWindow and related definitions +* NODEFERWINDOWPOS DeferWindowPos and related definitions +* NOVIRTUALKEYCODES VK_* virtual key codes +* NOKEYSTATES MK_* message key state flags +* NOWH SetWindowsHook and related WH_* definitions +* NOMENUS Menu APIs +* NOSCROLL Scrolling APIs and scroll bar control +* NOCLIPBOARD Clipboard APIs and definitions +* NOICONS IDI_* icon IDs +* NOMB MessageBox and related definitions +* NOSYSCOMMANDS WM_SYSCOMMAND SC_* definitions +* NOMDI MDI support +* NOCTLMGR Control management and controls +* NOWINMESSAGES WM_* window messages +* NOHELP Help support +* +\****************************************************************************/ + +#ifndef _INC_WINDOWS +#define _INC_WINDOWS /* #defined if windows.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* If WINVER is not defined, assume version 3.1 */ +#ifndef WINVER +#define WINVER 0x030a +#endif + +#ifdef RC_INVOKED +/* Don't include definitions that RC.EXE can't parse */ +#define NOATOM +#define NOGDI +#define NOGDICAPMASKS +#define NOMETAFILE +#define NOMINMAX +#define NOMSG +#define NOOPENFILE +#define NORASTEROPS +#define NOSCROLL +#define NOSOUND +#define NOSYSMETRICS +#define NOTEXTMETRIC +#define NOWH +#define NODBCS +#define NOSYSTEMPARAMSINFO +#define NOCOMM +#define NOOEMRESOURCE +#endif /* RC_INVOKED */ + +/* Handle OEMRESOURCE for 3.0 compatibility */ +#if (WINVER < 0x030a) +#define NOOEMRESOURCE +#ifdef OEMRESOURCE +#undef NOOEMRESOURCE +#endif +#endif + +/******* Common definitions and typedefs ***********************************/ + +#define VOID void + +#define FAR _far +#define NEAR _near +#define PASCAL _pascal +#define CDECL _cdecl + +#define WINAPI _far _pascal +#define CALLBACK _far _pascal + +/****** Simple types & common helper macros *********************************/ + +typedef int BOOL; +#define FALSE 0 +#define TRUE 1 + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; + +typedef unsigned int UINT; + +#ifdef STRICT +typedef signed long LONG; +#else +#define LONG long +#endif + +#define LOBYTE(w) ((BYTE)(w)) +#define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF)) + +#define LOWORD(l) ((WORD)(DWORD)(l)) +#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF)) + +#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16))) + +#ifndef NOMINMAX +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#endif /* NOMINMAX */ + +/* Types use for passing & returning polymorphic values */ +typedef UINT WPARAM; +typedef LONG LPARAM; +typedef LONG LRESULT; + +#define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high)) +#define MAKELRESULT(low, high) ((LRESULT)MAKELONG(low, high)) + +/****** Common pointer types ************************************************/ + +#ifndef NULL +#define NULL 0 +#endif + +typedef char NEAR* PSTR; +typedef char NEAR* NPSTR; + + +typedef char FAR* LPSTR; +typedef const char FAR* LPCSTR; + +typedef BYTE NEAR* PBYTE; +typedef BYTE FAR* LPBYTE; + +typedef int NEAR* PINT; +typedef int FAR* LPINT; + +typedef WORD NEAR* PWORD; +typedef WORD FAR* LPWORD; + +typedef long NEAR* PLONG; +typedef long FAR* LPLONG; + +typedef DWORD NEAR* PDWORD; +typedef DWORD FAR* LPDWORD; + +typedef void FAR* LPVOID; + +#define MAKELP(sel, off) ((void FAR*)MAKELONG((off), (sel))) +#define SELECTOROF(lp) HIWORD(lp) +#define OFFSETOF(lp) LOWORD(lp) + +#define FIELDOFFSET(type, field) ((int)(&((type NEAR*)1)->field)-1) + +/****** Common handle types *************************************************/ + +#ifdef STRICT +typedef const void NEAR* HANDLE; +#define DECLARE_HANDLE(name) struct name##__ { int unused; }; \ + typedef const struct name##__ NEAR* name +#define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \ + typedef const struct name##__ FAR* name +#else /* STRICT */ +typedef UINT HANDLE; +#define DECLARE_HANDLE(name) typedef UINT name +#define DECLARE_HANDLE32(name) typedef DWORD name +#endif /* !STRICT */ + +typedef HANDLE* PHANDLE; +typedef HANDLE NEAR* SPHANDLE; +typedef HANDLE FAR* LPHANDLE; + +typedef HANDLE HGLOBAL; +typedef HANDLE HLOCAL; + +typedef HANDLE GLOBALHANDLE; +typedef HANDLE LOCALHANDLE; + +typedef UINT ATOM; + +#ifdef STRICT +typedef void (CALLBACK* FARPROC)(void); +typedef void (NEAR PASCAL* NEARPROC)(void); +#else +typedef int (CALLBACK* FARPROC)(); +typedef int (NEAR PASCAL* NEARPROC)(); +#endif + +DECLARE_HANDLE(HSTR); + +/****** KERNEL typedefs, structures, and functions **************************/ + +DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */ + +#ifndef NOKERNEL + +/****** Application entry point function ************************************/ + +#ifdef STRICT +int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int); +#endif + +/****** System Information **************************************************/ + +DWORD WINAPI GetVersion(void); + +DWORD WINAPI GetFreeSpace(UINT); +UINT WINAPI GetCurrentPDB(void); + +UINT WINAPI GetWindowsDirectory(LPSTR, UINT); +UINT WINAPI GetSystemDirectory(LPSTR, UINT); + +#if (WINVER >= 0x030a) +UINT WINAPI GetFreeSystemResources(UINT); +#define GFSR_SYSTEMRESOURCES 0x0000 +#define GFSR_GDIRESOURCES 0x0001 +#define GFSR_USERRESOURCES 0x0002 +#endif /* WINVER >= 0x030a */ + +DWORD WINAPI GetWinFlags(void); + +#define WF_PMODE 0x0001 +#define WF_CPU286 0x0002 +#define WF_CPU386 0x0004 +#define WF_CPU486 0x0008 +#define WF_STANDARD 0x0010 +#define WF_WIN286 0x0010 +#define WF_ENHANCED 0x0020 +#define WF_WIN386 0x0020 +#define WF_CPU086 0x0040 +#define WF_CPU186 0x0080 +#define WF_LARGEFRAME 0x0100 +#define WF_SMALLFRAME 0x0200 +#define WF_80x87 0x0400 +#define WF_PAGING 0x0800 +#define WF_WLO 0x8000 + +LPSTR WINAPI GetDOSEnvironment(void); + +DWORD WINAPI GetCurrentTime(void); +DWORD WINAPI GetTickCount(void); +DWORD WINAPI GetTimerResolution(void); + +/****** Error handling ******************************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOLOGERROR + +void WINAPI LogError(UINT err, void FAR* lpInfo); +void WINAPI LogParamError(UINT err, FARPROC lpfn, void FAR* param); + +/****** LogParamError/LogError values */ + +/* Error modifier bits */ + +#define ERR_WARNING 0x8000 +#define ERR_PARAM 0x4000 + +#define ERR_SIZE_MASK 0x3000 +#define ERR_BYTE 0x1000 +#define ERR_WORD 0x2000 +#define ERR_DWORD 0x3000 + +/****** LogParamError() values */ + +/* Generic parameter values */ +#define ERR_BAD_VALUE 0x6001 +#define ERR_BAD_FLAGS 0x6002 +#define ERR_BAD_INDEX 0x6003 +#define ERR_BAD_DVALUE 0x7004 +#define ERR_BAD_DFLAGS 0x7005 +#define ERR_BAD_DINDEX 0x7006 +#define ERR_BAD_PTR 0x7007 +#define ERR_BAD_FUNC_PTR 0x7008 +#define ERR_BAD_SELECTOR 0x6009 +#define ERR_BAD_STRING_PTR 0x700a +#define ERR_BAD_HANDLE 0x600b + +/* KERNEL parameter errors */ +#define ERR_BAD_HINSTANCE 0x6020 +#define ERR_BAD_HMODULE 0x6021 +#define ERR_BAD_GLOBAL_HANDLE 0x6022 +#define ERR_BAD_LOCAL_HANDLE 0x6023 +#define ERR_BAD_ATOM 0x6024 +#define ERR_BAD_HFILE 0x6025 + +/* USER parameter errors */ +#define ERR_BAD_HWND 0x6040 +#define ERR_BAD_HMENU 0x6041 +#define ERR_BAD_HCURSOR 0x6042 +#define ERR_BAD_HICON 0x6043 +#define ERR_BAD_HDWP 0x6044 +#define ERR_BAD_CID 0x6045 +#define ERR_BAD_HDRVR 0x6046 + +/* GDI parameter errors */ +#define ERR_BAD_COORDS 0x7060 +#define ERR_BAD_GDI_OBJECT 0x6061 +#define ERR_BAD_HDC 0x6062 +#define ERR_BAD_HPEN 0x6063 +#define ERR_BAD_HFONT 0x6064 +#define ERR_BAD_HBRUSH 0x6065 +#define ERR_BAD_HBITMAP 0x6066 +#define ERR_BAD_HRGN 0x6067 +#define ERR_BAD_HPALETTE 0x6068 +#define ERR_BAD_HMETAFILE 0x6069 + + +/**** LogError() values */ + +/* KERNEL errors */ +#define ERR_GALLOC 0x0001 +#define ERR_GREALLOC 0x0002 +#define ERR_GLOCK 0x0003 +#define ERR_LALLOC 0x0004 +#define ERR_LREALLOC 0x0005 +#define ERR_LLOCK 0x0006 +#define ERR_ALLOCRES 0x0007 +#define ERR_LOCKRES 0x0008 +#define ERR_LOADMODULE 0x0009 + +/* USER errors */ +#define ERR_CREATEDLG 0x0040 +#define ERR_CREATEDLG2 0x0041 +#define ERR_REGISTERCLASS 0x0042 +#define ERR_DCBUSY 0x0043 +#define ERR_CREATEWND 0x0044 +#define ERR_STRUCEXTRA 0x0045 +#define ERR_LOADSTR 0x0046 +#define ERR_LOADMENU 0x0047 +#define ERR_NESTEDBEGINPAINT 0x0048 +#define ERR_BADINDEX 0x0049 +#define ERR_CREATEMENU 0x004a + +/* GDI errors */ +#define ERR_CREATEDC 0x0080 +#define ERR_CREATEMETA 0x0081 +#define ERR_DELOBJSELECTED 0x0082 +#define ERR_SELBITMAP 0x0083 + +/* Debugging support (DEBUG SYSTEM ONLY) */ +typedef struct tagWINDEBUGINFO +{ + UINT flags; + DWORD dwOptions; + DWORD dwFilter; + char achAllocModule[8]; + DWORD dwAllocBreak; + DWORD dwAllocCount; +} WINDEBUGINFO; + +BOOL WINAPI GetWinDebugInfo(WINDEBUGINFO FAR* lpwdi, UINT flags); +BOOL WINAPI SetWinDebugInfo(const WINDEBUGINFO FAR* lpwdi); + +void FAR _cdecl DebugOutput(UINT flags, LPCSTR lpsz, ...); + +/* WINDEBUGINFO flags values */ +#define WDI_OPTIONS 0x0001 +#define WDI_FILTER 0x0002 +#define WDI_ALLOCBREAK 0x0004 + +/* dwOptions values */ +#define DBO_CHECKHEAP 0x0001 +#define DBO_BUFFERFILL 0x0004 +#define DBO_DISABLEGPTRAPPING 0x0010 +#define DBO_CHECKFREE 0x0020 + +#define DBO_SILENT 0x8000 + +#define DBO_TRACEBREAK 0x2000 +#define DBO_WARNINGBREAK 0x1000 +#define DBO_NOERRORBREAK 0x0800 +#define DBO_NOFATALBREAK 0x0400 +#define DBO_INT3BREAK 0x0100 + +/* DebugOutput flags values */ +#define DBF_TRACE 0x0000 +#define DBF_WARNING 0x4000 +#define DBF_ERROR 0x8000 +#define DBF_FATAL 0xc000 + +/* dwFilter values */ +#define DBF_KERNEL 0x1000 +#define DBF_KRN_MEMMAN 0x0001 +#define DBF_KRN_LOADMODULE 0x0002 +#define DBF_KRN_SEGMENTLOAD 0x0004 +#define DBF_USER 0x0800 +#define DBF_GDI 0x0400 +#define DBF_MMSYSTEM 0x0040 +#define DBF_PENWIN 0x0020 +#define DBF_APPLICATION 0x0008 +#define DBF_DRIVER 0x0010 + +#endif /* NOLOGERROR */ +#endif /* WINVER >= 0x030a */ + +void WINAPI FatalExit(int); +void WINAPI FatalAppExit(UINT, LPCSTR); + +BOOL WINAPI ExitWindows(DWORD dwReturnCode, UINT wReserved); + +#define EW_RESTARTWINDOWS 0x42 +#if (WINVER >= 0x030a) +#define EW_REBOOTSYSTEM 0x43 + +BOOL WINAPI ExitWindowsExec(LPCSTR, LPCSTR); +#endif /* WINVER >= 0x030a */ + +void WINAPI DebugBreak(void); +void WINAPI OutputDebugString(LPCSTR); + +/* SetErrorMode() constants */ +#define SEM_FAILCRITICALERRORS 0x0001 +#define SEM_NOGPFAULTERRORBOX 0x0002 +#define SEM_NOOPENFILEERRORBOX 0x8000 + +UINT WINAPI SetErrorMode(UINT); + +/****** Pointer validation **************************************************/ + +#if (WINVER >= 0x030a) + +BOOL WINAPI IsBadReadPtr(const void FAR* lp, UINT cb); +BOOL WINAPI IsBadWritePtr(void FAR* lp, UINT cb); +BOOL WINAPI IsBadHugeReadPtr(const void _huge* lp, DWORD cb); +BOOL WINAPI IsBadHugeWritePtr(void _huge* lp, DWORD cb); +BOOL WINAPI IsBadCodePtr(FARPROC lpfn); +BOOL WINAPI IsBadStringPtr(const void FAR* lpsz, UINT cchMax); +#endif /* WINVER >= 0x030a */ + +/****** Profiling support ***************************************************/ + +#ifndef NOPROFILER + +int WINAPI ProfInsChk(void); +void WINAPI ProfSetup(int,int); +void WINAPI ProfSampRate(int,int); +void WINAPI ProfStart(void); +void WINAPI ProfStop(void); +void WINAPI ProfClear(void); +void WINAPI ProfFlush(void); +void WINAPI ProfFinish(void); +#endif /* NOPROFILER */ + +/****** Catch/Throw and stack management ************************************/ + +typedef int CATCHBUF[9]; +typedef int FAR* LPCATCHBUF; + +int WINAPI Catch(int FAR*); +void WINAPI Throw(const int FAR*, int); + +void WINAPI SwitchStackBack(void); +void WINAPI SwitchStackTo(UINT, UINT, UINT); + +/****** Module Management ***************************************************/ + +#define HINSTANCE_ERROR ((HINSTANCE)32) + + +HINSTANCE WINAPI LoadModule(LPCSTR, LPVOID); +BOOL WINAPI FreeModule(HINSTANCE); + +HINSTANCE WINAPI LoadLibrary(LPCSTR); +void WINAPI FreeLibrary(HINSTANCE); + +UINT WINAPI WinExec(LPCSTR, UINT); + +HMODULE WINAPI GetModuleHandle(LPCSTR); + +int WINAPI GetModuleUsage(HINSTANCE); +int WINAPI GetModuleFileName(HINSTANCE, LPSTR, int); + +FARPROC WINAPI GetProcAddress(HINSTANCE, LPCSTR); + +int WINAPI GetInstanceData(HINSTANCE, BYTE*, int); + +HGLOBAL WINAPI GetCodeHandle(FARPROC); + +typedef struct tagSEGINFO +{ + UINT offSegment; + UINT cbSegment; + UINT flags; + UINT cbAlloc; + HGLOBAL h; + UINT alignShift; + UINT reserved[2]; +} SEGINFO; +typedef SEGINFO FAR* LPSEGINFO; + +void WINAPI GetCodeInfo(FARPROC lpProc, SEGINFO FAR* lpSegInfo); + +FARPROC WINAPI MakeProcInstance(FARPROC, HINSTANCE); +void WINAPI FreeProcInstance(FARPROC); + +LONG WINAPI SetSwapAreaSize(UINT); +void WINAPI SwapRecording(UINT); +void WINAPI ValidateCodeSegments(void); + +/* Windows Exit Procedure flag values */ +#define WEP_SYSTEM_EXIT 1 +#define WEP_FREE_DLL 0 + +/****** Task Management *****************************************************/ + +#endif /* NOKERNEL */ + +DECLARE_HANDLE(HTASK); + +#ifndef NOKERNEL + +UINT WINAPI GetNumTasks(void); + +#if (WINVER >= 0x030a) +BOOL WINAPI IsTask(HTASK); +#endif /* WINVER >= 0x030a */ + +HTASK WINAPI GetCurrentTask(void); + +void WINAPI Yield(void); +void WINAPI DirectedYield(HTASK); + + +/****** Global memory management ********************************************/ + +#ifndef NOMEMMGR + +/* Global Memory Flags */ + +#define GMEM_FIXED 0x0000 +#define GMEM_MOVEABLE 0x0002 +#define GMEM_NOCOMPACT 0x0010 +#define GMEM_NODISCARD 0x0020 +#define GMEM_ZEROINIT 0x0040 +#define GMEM_MODIFY 0x0080 +#define GMEM_DISCARDABLE 0x0100 +#define GMEM_NOT_BANKED 0x1000 +#define GMEM_SHARE 0x2000 +#define GMEM_DDESHARE 0x2000 +#define GMEM_NOTIFY 0x4000 +#define GMEM_LOWER GMEM_NOT_BANKED + +#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) +#define GPTR (GMEM_FIXED | GMEM_ZEROINIT) + +#define GlobalDiscard(h) GlobalReAlloc(h, 0L, GMEM_MOVEABLE) + +HGLOBAL WINAPI GlobalAlloc(UINT, DWORD); +HGLOBAL WINAPI GlobalReAlloc(HGLOBAL, DWORD, UINT); +HGLOBAL WINAPI GlobalFree(HGLOBAL); + +DWORD WINAPI GlobalDosAlloc(DWORD); +UINT WINAPI GlobalDosFree(UINT); + +#ifdef STRICT +void FAR* WINAPI GlobalLock(HGLOBAL); +#else +char FAR* WINAPI GlobalLock(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnlock(HGLOBAL); + +DWORD WINAPI GlobalSize(HGLOBAL); +DWORD WINAPI GlobalHandle(UINT); + +/* GlobalFlags return flags (in addition to GMEM_DISCARDABLE) */ +#define GMEM_DISCARDED 0x4000 +#define GMEM_LOCKCOUNT 0x00FF +UINT WINAPI GlobalFlags(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI GlobalWire(HGLOBAL); +#else +char FAR* WINAPI GlobalWire(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnWire(HGLOBAL); + +UINT WINAPI GlobalPageLock(HGLOBAL); +UINT WINAPI GlobalPageUnlock(HGLOBAL); + +void WINAPI GlobalFix(HGLOBAL); +void WINAPI GlobalUnfix(HGLOBAL); + +HGLOBAL WINAPI GlobalLRUNewest(HGLOBAL); +HGLOBAL WINAPI GlobalLRUOldest(HGLOBAL); + +DWORD WINAPI GlobalCompact(DWORD); + +#ifdef STRICT +typedef BOOL (CALLBACK* GNOTIFYPROC)(HGLOBAL); +#else +typedef FARPROC GNOTIFYPROC; +#endif + +void WINAPI GlobalNotify(GNOTIFYPROC); + +HGLOBAL WINAPI LockSegment(UINT); +void WINAPI UnlockSegment(UINT); + +#define LockData(dummy) LockSegment((UINT)-1) +#define UnlockData(dummy) UnlockSegment((UINT)-1) + +UINT WINAPI AllocSelector(UINT); +UINT WINAPI FreeSelector(UINT); +UINT WINAPI AllocDStoCSAlias(UINT); +UINT WINAPI PrestoChangoSelector(UINT sourceSel, UINT destSel); +DWORD WINAPI GetSelectorBase(UINT); +UINT WINAPI SetSelectorBase(UINT, DWORD); +DWORD WINAPI GetSelectorLimit(UINT); +UINT WINAPI SetSelectorLimit(UINT, DWORD); + +void WINAPI LimitEmsPages(DWORD); + +void WINAPI ValidateFreeSpaces(void); + +/* Low system memory notification message */ +#define WM_COMPACTING 0x0041 + +/***** Local Memory Management */ + +/* Local Memory Flags */ +#define LMEM_FIXED 0x0000 +#define LMEM_MOVEABLE 0x0002 +#define LMEM_NOCOMPACT 0x0010 +#define LMEM_NODISCARD 0x0020 +#define LMEM_ZEROINIT 0x0040 +#define LMEM_MODIFY 0x0080 +#define LMEM_DISCARDABLE 0x0F00 + +#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT) +#define LPTR (LMEM_FIXED | LMEM_ZEROINIT) + +#define NONZEROLHND (LMEM_MOVEABLE) +#define NONZEROLPTR (LMEM_FIXED) + + +#define LocalDiscard(h) LocalReAlloc(h, 0, LMEM_MOVEABLE) + + +HLOCAL WINAPI LocalAlloc(UINT, UINT); +HLOCAL WINAPI LocalReAlloc(HLOCAL, UINT, UINT); +HLOCAL WINAPI LocalFree(HLOCAL); + +#ifdef STRICT +void NEAR* WINAPI LocalLock(HLOCAL); +#else +char NEAR* WINAPI LocalLock(HLOCAL); +#endif + +BOOL WINAPI LocalUnlock(HLOCAL); + +UINT WINAPI LocalSize(HLOCAL); +#ifdef STRICT +HLOCAL WINAPI LocalHandle(void NEAR*); +#else +HLOCAL WINAPI LocalHandle(UINT); +#endif + +/* LocalFlags return flags (in addition to LMEM_DISCARDABLE) */ +#define LMEM_DISCARDED 0x4000 +#define LMEM_LOCKCOUNT 0x00FF + +UINT WINAPI LocalFlags(HLOCAL); + +BOOL WINAPI LocalInit(UINT, UINT, UINT); +UINT WINAPI LocalCompact(UINT); +UINT WINAPI LocalShrink(HLOCAL, UINT); + +#endif /* NOMEMMGR */ + +/****** File I/O ************************************************************/ + +#ifndef NOLFILEIO + +typedef int HFILE; /* Polymorphic with C runtime file handle type */ + +#define HFILE_ERROR ((HFILE)-1) + +#ifndef NOOPENFILE + +/* OpenFile() Structure */ +typedef struct tagOFSTRUCT +{ + BYTE cBytes; + BYTE fFixedDisk; + UINT nErrCode; + BYTE reserved[4]; + char szPathName[128]; +} OFSTRUCT; +typedef OFSTRUCT* POFSTRUCT; +typedef OFSTRUCT NEAR* NPOFSTRUCT; +typedef OFSTRUCT FAR* LPOFSTRUCT; + +/* OpenFile() Flags */ +#define OF_READ 0x0000 +#define OF_WRITE 0x0001 +#define OF_READWRITE 0x0002 +#define OF_SHARE_COMPAT 0x0000 +#define OF_SHARE_EXCLUSIVE 0x0010 +#define OF_SHARE_DENY_WRITE 0x0020 +#define OF_SHARE_DENY_READ 0x0030 +#define OF_SHARE_DENY_NONE 0x0040 +#define OF_PARSE 0x0100 +#define OF_DELETE 0x0200 +#define OF_VERIFY 0x0400 /* Used with OF_REOPEN */ +#define OF_SEARCH 0x0400 /* Used without OF_REOPEN */ +#define OF_CANCEL 0x0800 +#define OF_CREATE 0x1000 +#define OF_PROMPT 0x2000 +#define OF_EXIST 0x4000 +#define OF_REOPEN 0x8000 + +HFILE WINAPI OpenFile(LPCSTR, OFSTRUCT FAR*, UINT); + +#endif /* NOOPENFILE */ + +/* _lopen() flags */ +#define READ 0 +#define WRITE 1 +#define READ_WRITE 2 + +HFILE WINAPI _lopen(LPCSTR, int); +HFILE WINAPI _lcreat(LPCSTR, int); + +HFILE WINAPI _lclose(HFILE); + +LONG WINAPI _llseek(HFILE, LONG, int); + +/* _llseek origin values */ +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +UINT WINAPI _lread(HFILE, void _huge*, UINT); +UINT WINAPI _lwrite(HFILE, const void _huge*, UINT); + +#if (WINVER >= 0x030a) +long WINAPI _hread(HFILE, void _huge*, long); +long WINAPI _hwrite(HFILE, const void _huge*, long); +#endif /* WINVER >= 0x030a */ + + +#endif /* NOLFILEIO */ + +/* GetTempFileName() Flags */ +#define TF_FORCEDRIVE (BYTE)0x80 + +int WINAPI GetTempFileName(BYTE, LPCSTR, UINT, LPSTR); +BYTE WINAPI GetTempDrive(char); + +/* GetDriveType return values */ +#define DRIVE_REMOVABLE 2 +#define DRIVE_FIXED 3 +#define DRIVE_REMOTE 4 +UINT WINAPI GetDriveType(int); + +UINT WINAPI SetHandleCount(UINT); + +/****** Network support *****************************************************/ +UINT WINAPI WNetAddConnection(LPSTR, LPSTR, LPSTR); +UINT WINAPI WNetGetConnection(LPSTR, LPSTR, UINT FAR*); +UINT WINAPI WNetCancelConnection(LPSTR, BOOL); +/* Errors */ +#define WN_SUCCESS 0x0000 +#define WN_NOT_SUPPORTED 0x0001 +#define WN_NET_ERROR 0x0002 +#define WN_MORE_DATA 0x0003 +#define WN_BAD_POINTER 0x0004 +#define WN_BAD_VALUE 0x0005 +#define WN_BAD_PASSWORD 0x0006 +#define WN_ACCESS_DENIED 0x0007 +#define WN_FUNCTION_BUSY 0x0008 +#define WN_WINDOWS_ERROR 0x0009 +#define WN_BAD_USER 0x000A +#define WN_OUT_OF_MEMORY 0x000B +#define WN_CANCEL 0x000C +#define WN_CONTINUE 0x000D + +/* Connection errors */ +#define WN_NOT_CONNECTED 0x0030 +#define WN_OPEN_FILES 0x0031 +#define WN_BAD_NETNAME 0x0032 +#define WN_BAD_LOCALNAME 0x0033 +#define WN_ALREADY_CONNECTED 0x0034 +#define WN_DEVICE_ERROR 0x0035 +#define WN_CONNECTION_CLOSED 0x0036 + +/****** Resource Management *************************************************/ + +DECLARE_HANDLE(HRSRC); + +HRSRC WINAPI FindResource(HINSTANCE, LPCSTR, LPCSTR); +HGLOBAL WINAPI LoadResource(HINSTANCE, HRSRC); +BOOL WINAPI FreeResource(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI LockResource(HGLOBAL); +#else +char FAR* WINAPI LockResource(HGLOBAL); +#endif + +#define UnlockResource(h) GlobalUnlock(h) + +DWORD WINAPI SizeofResource(HINSTANCE, HRSRC); + +int WINAPI AccessResource(HINSTANCE, HRSRC); + +HGLOBAL WINAPI AllocResource(HINSTANCE, HRSRC, DWORD); + +#ifdef STRICT +typedef HGLOBAL (CALLBACK* RSRCHDLRPROC)(HGLOBAL, HINSTANCE, HRSRC); +#else +typedef FARPROC RSRCHDLRPROC; +#endif + +RSRCHDLRPROC WINAPI SetResourceHandler(HINSTANCE, LPCSTR, RSRCHDLRPROC); + +#define MAKEINTRESOURCE(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NORESOURCE + +/* Predefined Resource Types */ +#define RT_CURSOR MAKEINTRESOURCE(1) +#define RT_BITMAP MAKEINTRESOURCE(2) +#define RT_ICON MAKEINTRESOURCE(3) +#define RT_MENU MAKEINTRESOURCE(4) +#define RT_DIALOG MAKEINTRESOURCE(5) +#define RT_STRING MAKEINTRESOURCE(6) +#define RT_FONTDIR MAKEINTRESOURCE(7) +#define RT_FONT MAKEINTRESOURCE(8) +#define RT_ACCELERATOR MAKEINTRESOURCE(9) +#define RT_RCDATA MAKEINTRESOURCE(10) + +#define RT_GROUP_CURSOR MAKEINTRESOURCE(12) +#define RT_GROUP_ICON MAKEINTRESOURCE(14) + +#endif /* NORESOURCE */ + +#ifdef OEMRESOURCE + +/* OEM Resource Ordinal Numbers */ +#define OBM_CLOSE 32754 +#define OBM_UPARROW 32753 +#define OBM_DNARROW 32752 +#define OBM_RGARROW 32751 +#define OBM_LFARROW 32750 +#define OBM_REDUCE 32749 +#define OBM_ZOOM 32748 +#define OBM_RESTORE 32747 +#define OBM_REDUCED 32746 +#define OBM_ZOOMD 32745 +#define OBM_RESTORED 32744 +#define OBM_UPARROWD 32743 +#define OBM_DNARROWD 32742 +#define OBM_RGARROWD 32741 +#define OBM_LFARROWD 32740 +#define OBM_MNARROW 32739 +#define OBM_COMBO 32738 +#if (WINVER >= 0x030a) +#define OBM_UPARROWI 32737 +#define OBM_DNARROWI 32736 +#define OBM_RGARROWI 32735 +#define OBM_LFARROWI 32734 +#endif /* WINVER >= 0x030a */ + +#define OBM_OLD_CLOSE 32767 +#define OBM_SIZE 32766 +#define OBM_OLD_UPARROW 32765 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_LFARROW 32762 +#define OBM_BTSIZE 32761 +#define OBM_CHECK 32760 +#define OBM_CHECKBOXES 32759 +#define OBM_BTNCORNERS 32758 +#define OBM_OLD_REDUCE 32757 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_RESTORE 32755 + +#define OCR_NORMAL 32512 +#define OCR_IBEAM 32513 +#define OCR_WAIT 32514 +#define OCR_CROSS 32515 +#define OCR_UP 32516 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 + +#define OIC_SAMPLE 32512 +#define OIC_HAND 32513 +#define OIC_QUES 32514 +#define OIC_BANG 32515 +#define OIC_NOTE 32516 + +#endif /* OEMRESOURCE */ + +/****** Atom Management *****************************************************/ + +#define MAKEINTATOM(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NOATOM + +BOOL WINAPI InitAtomTable(int); +ATOM WINAPI AddAtom(LPCSTR); +ATOM WINAPI DeleteAtom(ATOM); +ATOM WINAPI FindAtom(LPCSTR); +UINT WINAPI GetAtomName(ATOM, LPSTR, int); +ATOM WINAPI GlobalAddAtom(LPCSTR); +ATOM WINAPI GlobalDeleteAtom(ATOM); +ATOM WINAPI GlobalFindAtom(LPCSTR); +UINT WINAPI GlobalGetAtomName(ATOM, LPSTR, int); +HLOCAL WINAPI GetAtomHandle(ATOM); + +#endif /* NOATOM */ + +/****** WIN.INI Support *****************************************************/ + +/* User Profile Routines */ +UINT WINAPI GetProfileInt(LPCSTR, LPCSTR, int); +int WINAPI GetProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int); +BOOL WINAPI WriteProfileString(LPCSTR, LPCSTR, LPCSTR); + +UINT WINAPI GetPrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR); +int WINAPI GetPrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int, LPCSTR); +BOOL WINAPI WritePrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPCSTR); + +#define WM_WININICHANGE 0x001A + +/****** International & Char Translation Support ****************************/ + +void WINAPI AnsiToOem(const char _huge*, char _huge*); +void WINAPI OemToAnsi(const char _huge*, char _huge*); + +void WINAPI AnsiToOemBuff(LPCSTR, LPSTR, UINT); +void WINAPI OemToAnsiBuff(LPCSTR, LPSTR, UINT); + +LPSTR WINAPI AnsiNext(LPCSTR); +LPSTR WINAPI AnsiPrev(LPCSTR, LPCSTR); + +LPSTR WINAPI AnsiUpper(LPSTR); +LPSTR WINAPI AnsiLower(LPSTR); + +UINT WINAPI AnsiUpperBuff(LPSTR, UINT); +UINT WINAPI AnsiLowerBuff(LPSTR, UINT); + + +#ifndef NOLANGUAGE +BOOL WINAPI IsCharAlpha(char); +BOOL WINAPI IsCharAlphaNumeric(char); +BOOL WINAPI IsCharUpper(char); +BOOL WINAPI IsCharLower(char); +#endif + +#ifndef NOLSTRING +int WINAPI lstrcmp(LPCSTR, LPCSTR); +int WINAPI lstrcmpi(LPCSTR, LPCSTR); +LPSTR WINAPI lstrcpy(LPSTR, LPCSTR); +LPSTR WINAPI lstrcat(LPSTR, LPCSTR); +int WINAPI lstrlen(LPCSTR); +#if (WINVER >= 0x030a) +LPSTR WINAPI lstrcpyn(LPSTR, LPCSTR, int); +void WINAPI hmemcpy(void _huge*, const void _huge*, long); +#endif /* WINVER >= 0x030a */ +#endif /* NOLSTRING */ + +#if (WINVER >= 0x030a) +#ifndef NODBCS +BOOL WINAPI IsDBCSLeadByte(BYTE); +#endif /* NODBCS */ +#endif /* WINVER >= 0x030a */ + +int WINAPI LoadString(HINSTANCE, UINT, LPSTR, int); + +/****** Keyboard Driver Functions *******************************************/ + +#ifndef NOKEYBOARDINFO + +DWORD WINAPI OemKeyScan(UINT); +UINT WINAPI VkKeyScan(UINT); +int WINAPI GetKeyboardType(int); +UINT WINAPI MapVirtualKey(UINT, UINT); +int WINAPI GetKBCodePage(void); +int WINAPI GetKeyNameText(LONG, LPSTR, int); +int WINAPI ToAscii(UINT wVirtKey, UINT wScanCode, BYTE FAR* lpKeyState, DWORD FAR* lpChar, UINT wFlags); + +#endif + +#endif /* NOKERNEL */ + +/****** GDI typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HDC); + +#ifndef NOGDI + +#ifdef STRICT +typedef const void NEAR* HGDIOBJ; +#else +DECLARE_HANDLE(HGDIOBJ); +#endif + +#endif /* NOGDI */ + +DECLARE_HANDLE(HBITMAP); +DECLARE_HANDLE(HPEN); +DECLARE_HANDLE(HBRUSH); +DECLARE_HANDLE(HRGN); +DECLARE_HANDLE(HPALETTE); +DECLARE_HANDLE(HFONT); + +typedef struct tagRECT +{ + int left; + int top; + int right; + int bottom; +} RECT; +typedef RECT* PRECT; +typedef RECT NEAR* NPRECT; +typedef RECT FAR* LPRECT; + +typedef struct tagPOINT +{ + int x; + int y; +} POINT; +typedef POINT* PPOINT; +typedef POINT NEAR* NPPOINT; +typedef POINT FAR* LPPOINT; + +#if (WINVER >= 0x030a) +typedef struct tagSIZE +{ + int cx; + int cy; +} SIZE; +typedef SIZE* PSIZE; +typedef SIZE NEAR* NPSIZE; +typedef SIZE FAR* LPSIZE; +#endif /* WINVER >= 0x030a */ + +#define MAKEPOINT(l) (*((POINT FAR*)&(l))) + +#ifndef NOGDI + +/****** DC Management *******************************************************/ + +HDC WINAPI CreateDC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateIC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateCompatibleDC(HDC); + +BOOL WINAPI DeleteDC(HDC); + +DWORD WINAPI GetDCOrg(HDC); + +int WINAPI SaveDC(HDC); +BOOL WINAPI RestoreDC(HDC, int); + +int WINAPI SetEnvironment(LPCSTR, const void FAR*, UINT); +int WINAPI GetEnvironment(LPCSTR, void FAR*, UINT); + +int WINAPI MulDiv(int, int, int); + +#if (WINVER >= 0x030a) +/* Drawing bounds accumulation APIs */ +UINT WINAPI SetBoundsRect(HDC hDC, const RECT FAR* lprcBounds, UINT flags); +UINT WINAPI GetBoundsRect(HDC hDC, RECT FAR* lprcBounds, UINT flags); + +#define DCB_RESET 0x0001 +#define DCB_ACCUMULATE 0x0002 +#define DCB_DIRTY DCB_ACCUMULATE +#define DCB_SET (DCB_RESET | DCB_ACCUMULATE) +#define DCB_ENABLE 0x0004 +#define DCB_DISABLE 0x0008 +#endif /* WINVER >= 0x030a */ + +/****** Device Capabilities *************************************************/ + +int WINAPI GetDeviceCaps(HDC, int); + +/* Device Parameters for GetDeviceCaps() */ +#define DRIVERVERSION 0 +#define TECHNOLOGY 2 +#define HORZSIZE 4 +#define VERTSIZE 6 +#define HORZRES 8 +#define VERTRES 10 +#define BITSPIXEL 12 +#define PLANES 14 +#define NUMBRUSHES 16 +#define NUMPENS 18 +#define NUMMARKERS 20 +#define NUMFONTS 22 +#define NUMCOLORS 24 +#define PDEVICESIZE 26 +#define CURVECAPS 28 +#define LINECAPS 30 +#define POLYGONALCAPS 32 +#define TEXTCAPS 34 +#define CLIPCAPS 36 +#define RASTERCAPS 38 +#define ASPECTX 40 +#define ASPECTY 42 +#define ASPECTXY 44 + +#define LOGPIXELSX 88 +#define LOGPIXELSY 90 + +#define SIZEPALETTE 104 +#define NUMRESERVED 106 +#define COLORRES 108 + +#ifndef NOGDICAPMASKS + +/* GetDeviceCaps() return value masks */ + +/* TECHNOLOGY */ +#define DT_PLOTTER 0 +#define DT_RASDISPLAY 1 +#define DT_RASPRINTER 2 +#define DT_RASCAMERA 3 +#define DT_CHARSTREAM 4 +#define DT_METAFILE 5 +#define DT_DISPFILE 6 + +/* CURVECAPS */ +#define CC_NONE 0x0000 +#define CC_CIRCLES 0x0001 +#define CC_PIE 0x0002 +#define CC_CHORD 0x0004 +#define CC_ELLIPSES 0x0008 +#define CC_WIDE 0x0010 +#define CC_STYLED 0x0020 +#define CC_WIDESTYLED 0x0040 +#define CC_INTERIORS 0x0080 +#define CC_ROUNDRECT 0x0100 + +/* LINECAPS */ +#define LC_NONE 0x0000 +#define LC_POLYLINE 0x0002 +#define LC_MARKER 0x0004 +#define LC_POLYMARKER 0x0008 +#define LC_WIDE 0x0010 +#define LC_STYLED 0x0020 +#define LC_WIDESTYLED 0x0040 +#define LC_INTERIORS 0x0080 + +/* POLYGONALCAPS */ +#define PC_NONE 0x0000 +#define PC_POLYGON 0x0001 +#define PC_RECTANGLE 0x0002 +#define PC_WINDPOLYGON 0x0004 +#define PC_SCANLINE 0x0008 +#define PC_WIDE 0x0010 +#define PC_STYLED 0x0020 +#define PC_WIDESTYLED 0x0040 +#define PC_INTERIORS 0x0080 + +/* TEXTCAPS */ +#define TC_OP_CHARACTER 0x0001 +#define TC_OP_STROKE 0x0002 +#define TC_CP_STROKE 0x0004 +#define TC_CR_90 0x0008 +#define TC_CR_ANY 0x0010 +#define TC_SF_X_YINDEP 0x0020 +#define TC_SA_DOUBLE 0x0040 +#define TC_SA_INTEGER 0x0080 +#define TC_SA_CONTIN 0x0100 +#define TC_EA_DOUBLE 0x0200 +#define TC_IA_ABLE 0x0400 +#define TC_UA_ABLE 0x0800 +#define TC_SO_ABLE 0x1000 +#define TC_RA_ABLE 0x2000 +#define TC_VA_ABLE 0x4000 +#define TC_RESERVED 0x8000 + +/* CLIPCAPS */ +#define CP_NONE 0x0000 +#define CP_RECTANGLE 0x0001 +#define CP_REGION 0x0002 + +/* RASTERCAPS */ +#define RC_NONE +#define RC_BITBLT 0x0001 +#define RC_BANDING 0x0002 +#define RC_SCALING 0x0004 +#define RC_BITMAP64 0x0008 +#define RC_GDI20_OUTPUT 0x0010 +#define RC_GDI20_STATE 0x0020 +#define RC_SAVEBITMAP 0x0040 +#define RC_DI_BITMAP 0x0080 +#define RC_PALETTE 0x0100 +#define RC_DIBTODEV 0x0200 +#define RC_BIGFONT 0x0400 +#define RC_STRETCHBLT 0x0800 +#define RC_FLOODFILL 0x1000 +#define RC_STRETCHDIB 0x2000 +#define RC_OP_DX_OUTPUT 0x4000 +#define RC_DEVBITS 0x8000 + +#endif /* NOGDICAPMASKS */ + +/****** Coordinate transformation support ***********************************/ + +int WINAPI SetMapMode(HDC, int); +int WINAPI GetMapMode(HDC); + +/* Map modes */ +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 + +DWORD WINAPI SetWindowOrg(HDC, int, int); +DWORD WINAPI GetWindowOrg(HDC); + +DWORD WINAPI SetWindowExt(HDC, int, int); +DWORD WINAPI GetWindowExt(HDC); + +DWORD WINAPI OffsetWindowOrg(HDC, int, int); +DWORD WINAPI ScaleWindowExt(HDC, int, int, int, int); + +DWORD WINAPI SetViewportOrg(HDC, int, int); +DWORD WINAPI GetViewportOrg(HDC); + +DWORD WINAPI SetViewportExt(HDC, int, int); +DWORD WINAPI GetViewportExt(HDC); + +DWORD WINAPI OffsetViewportOrg(HDC, int, int); +DWORD WINAPI ScaleViewportExt(HDC, int, int, int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI SetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetWindowOrgEx(HDC, POINT FAR*); + +BOOL WINAPI SetWindowExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetWindowExtEx(HDC, SIZE FAR*); + +BOOL WINAPI OffsetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleWindowExtEx(HDC, int, int, int, int, SIZE FAR*); + +BOOL WINAPI SetViewportExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetViewportExtEx(HDC, SIZE FAR*); + +BOOL WINAPI SetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetViewportOrgEx(HDC, POINT FAR*); + +BOOL WINAPI OffsetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleViewportExtEx(HDC, int, int, int, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DPtoLP(HDC, POINT FAR*, int); +BOOL WINAPI LPtoDP(HDC, POINT FAR*, int); + + +/* Coordinate Modes */ +#define ABSOLUTE 1 +#define RELATIVE 2 + +/****** Color support *******************************************************/ + +typedef DWORD COLORREF; + +#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16))) + +#define GetRValue(rgb) ((BYTE)(rgb)) +#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) +#define GetBValue(rgb) ((BYTE)((rgb)>>16)) + +COLORREF WINAPI GetNearestColor(HDC, COLORREF); + +#ifndef NOCOLOR + +COLORREF WINAPI GetSysColor(int); +void WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*); + +#define COLOR_SCROLLBAR 0 +#define COLOR_BACKGROUND 1 +#define COLOR_ACTIVECAPTION 2 +#define COLOR_INACTIVECAPTION 3 +#define COLOR_MENU 4 +#define COLOR_WINDOW 5 +#define COLOR_WINDOWFRAME 6 +#define COLOR_MENUTEXT 7 +#define COLOR_WINDOWTEXT 8 +#define COLOR_CAPTIONTEXT 9 +#define COLOR_ACTIVEBORDER 10 +#define COLOR_INACTIVEBORDER 11 +#define COLOR_APPWORKSPACE 12 +#define COLOR_HIGHLIGHT 13 +#define COLOR_HIGHLIGHTTEXT 14 +#define COLOR_BTNFACE 15 +#define COLOR_BTNSHADOW 16 +#define COLOR_GRAYTEXT 17 +#define COLOR_BTNTEXT 18 +#if (WINVER >= 0x030a) +#define COLOR_INACTIVECAPTIONTEXT 19 +#define COLOR_BTNHIGHLIGHT 20 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOLOR */ + +#define WM_SYSCOLORCHANGE 0x0015 + +/****** GDI Object Support **************************************************/ + +#ifndef NOGDIOBJ + +HGDIOBJ WINAPI GetStockObject(int); + +BOOL WINAPI IsGDIObject(HGDIOBJ); + +BOOL WINAPI DeleteObject(HGDIOBJ); +HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ); +int WINAPI GetObject(HGDIOBJ, int, void FAR*); +BOOL WINAPI UnrealizeObject(HGDIOBJ); + +#ifdef STRICT +typedef (CALLBACK* GOBJENUMPROC)(void FAR*, LPARAM); +#else +typedef FARPROC GOBJENUMPROC; +#endif + +#ifdef STRICT +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPARAM); +#else +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPSTR); +#endif + +/* Object types for EnumObjects() */ +#define OBJ_PEN 1 +#define OBJ_BRUSH 2 + +/****** Pen support *********************************************************/ + +/* Logical Pen */ +typedef struct tagLOGPEN +{ + UINT lopnStyle; + POINT lopnWidth; + COLORREF lopnColor; +} LOGPEN; +typedef LOGPEN* PLOGPEN; +typedef LOGPEN NEAR* NPLOGPEN; +typedef LOGPEN FAR* LPLOGPEN; + +/* Pen Styles */ +#define PS_SOLID 0 +#define PS_DASH 1 +#define PS_DOT 2 +#define PS_DASHDOT 3 +#define PS_DASHDOTDOT 4 +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 + +HPEN WINAPI CreatePen(int, int, COLORREF); +HPEN WINAPI CreatePenIndirect(LOGPEN FAR*); + +/* Stock pens for use with GetStockObject(); */ +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 + +/****** Brush support *******************************************************/ + +/* Brush Styles */ +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW BS_NULL +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 + +/* Hatch Styles */ +#define HS_HORIZONTAL 0 +#define HS_VERTICAL 1 +#define HS_FDIAGONAL 2 +#define HS_BDIAGONAL 3 +#define HS_CROSS 4 +#define HS_DIAGCROSS 5 + +/* Logical Brush (or Pattern) */ +typedef struct tagLOGBRUSH +{ + UINT lbStyle; + COLORREF lbColor; + int lbHatch; +} LOGBRUSH; +typedef LOGBRUSH* PLOGBRUSH; +typedef LOGBRUSH NEAR* NPLOGBRUSH; +typedef LOGBRUSH FAR* LPLOGBRUSH; + +typedef LOGBRUSH PATTERN; +typedef PATTERN* PPATTERN; +typedef PATTERN NEAR* NPPATTERN; +typedef PATTERN FAR* LPPATTERN; + +HBRUSH WINAPI CreateSolidBrush(COLORREF); +HBRUSH WINAPI CreateHatchBrush(int, COLORREF); +HBRUSH WINAPI CreatePatternBrush(HBITMAP); +HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL, UINT); +HBRUSH WINAPI CreateBrushIndirect(LOGBRUSH FAR*); + +/* Stock brushes for use with GetStockObject() */ +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH + +DWORD WINAPI SetBrushOrg(HDC, int, int); +DWORD WINAPI GetBrushOrg(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetBrushOrgEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +/****** Region support ******************************************************/ + +HRGN WINAPI CreateRectRgn(int, int, int, int); +HRGN WINAPI CreateRectRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgn(int, int, int, int); +HRGN WINAPI CreatePolygonRgn(const POINT FAR*, int, int); +HRGN WINAPI CreatePolyPolygonRgn(const POINT FAR*, const int FAR*, int, int); +HRGN WINAPI CreateRoundRectRgn(int, int, int, int, int, int); + +/* Region type flags */ +#define ERROR 0 +#define NULLREGION 1 +#define SIMPLEREGION 2 +#define COMPLEXREGION 3 + +void WINAPI SetRectRgn(HRGN, int, int, int, int); + +int WINAPI CombineRgn(HRGN, HRGN, HRGN, int); + +/* CombineRgn() command values */ +#define RGN_AND 1 +#define RGN_OR 2 +#define RGN_XOR 3 +#define RGN_DIFF 4 +#define RGN_COPY 5 + +BOOL WINAPI EqualRgn(HRGN, HRGN); +int WINAPI OffsetRgn(HRGN, int, int); + +int WINAPI GetRgnBox(HRGN, RECT FAR*); + +BOOL WINAPI RectInRegion(HRGN, const RECT FAR*); +BOOL WINAPI PtInRegion(HRGN, int, int); + +/****** Color palette Support ************************************************/ + +#define PALETTERGB(r,g,b) (0x02000000L | RGB(r,g,b)) +#define PALETTEINDEX(i) ((COLORREF)(0x01000000L | (DWORD)(WORD)(i))) + +typedef struct tagPALETTEENTRY +{ + BYTE peRed; + BYTE peGreen; + BYTE peBlue; + BYTE peFlags; +} PALETTEENTRY; +typedef PALETTEENTRY FAR* LPPALETTEENTRY; + +/* Palette entry flags */ +#define PC_RESERVED 0x01 /* palette index used for animation */ +#define PC_EXPLICIT 0x02 /* palette index is explicit to device */ +#define PC_NOCOLLAPSE 0x04 /* do not match color to system palette */ + +/* Logical Palette */ +typedef struct tagLOGPALETTE +{ + WORD palVersion; + WORD palNumEntries; + PALETTEENTRY palPalEntry[1]; +} LOGPALETTE; +typedef LOGPALETTE* PLOGPALETTE; +typedef LOGPALETTE NEAR* NPLOGPALETTE; +typedef LOGPALETTE FAR* LPLOGPALETTE; + +HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR*); + +HPALETTE WINAPI SelectPalette(HDC, HPALETTE, BOOL); + +UINT WINAPI RealizePalette(HDC); + +int WINAPI UpdateColors(HDC); +void WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); + +UINT WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); +UINT WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetNearestPaletteIndex(HPALETTE, COLORREF); + +BOOL WINAPI ResizePalette(HPALETTE, UINT); + +UINT WINAPI GetSystemPaletteEntries(HDC, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetSystemPaletteUse(HDC); +UINT WINAPI SetSystemPaletteUse(HDC, UINT); + +/* Get/SetSystemPaletteUse() values */ +#define SYSPAL_STATIC 1 +#define SYSPAL_NOSTATIC 2 + +/* Palette window messages */ +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 + +/****** Clipping support *****************************************************/ + +int WINAPI SelectClipRgn(HDC, HRGN); +int WINAPI GetClipBox(HDC, RECT FAR*); + +int WINAPI IntersectClipRect(HDC, int, int, int, int); +int WINAPI OffsetClipRgn(HDC, int, int); +int WINAPI ExcludeClipRect(HDC, int, int, int, int); + +BOOL WINAPI PtVisible(HDC, int, int); +BOOL WINAPI RectVisible(HDC, const RECT FAR*); + + +/****** General drawing support ********************************************/ + +DWORD WINAPI MoveTo(HDC, int, int); +DWORD WINAPI GetCurrentPosition(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI MoveToEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetCurrentPositionEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI LineTo(HDC, int, int); +BOOL WINAPI Polyline(HDC, const POINT FAR*, int); + +#ifdef STRICT +typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM); +#else +typedef FARPROC LINEDDAPROC; +#endif + +void WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM); + +BOOL WINAPI Rectangle(HDC, int, int, int, int); +BOOL WINAPI RoundRect(HDC, int, int, int, int, int, int); + +BOOL WINAPI Ellipse(HDC, int, int, int, int); +BOOL WINAPI Arc(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Chord(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Pie(HDC, int, int, int, int, int, int, int, int); + +BOOL WINAPI Polygon(HDC, const POINT FAR*, int); +BOOL WINAPI PolyPolygon(HDC, const POINT FAR*, int FAR*, int); + +/* PolyFill Modes */ +#define ALTERNATE 1 +#define WINDING 2 + +int WINAPI SetPolyFillMode(HDC, int); +int WINAPI GetPolyFillMode(HDC); + +BOOL WINAPI FloodFill(HDC, int, int, COLORREF); +BOOL WINAPI ExtFloodFill(HDC, int, int, COLORREF, UINT); + +/* ExtFloodFill style flags */ +#define FLOODFILLBORDER 0 +#define FLOODFILLSURFACE 1 + +BOOL WINAPI FillRgn(HDC, HRGN, HBRUSH); +BOOL WINAPI FrameRgn(HDC, HRGN, HBRUSH, int, int); +BOOL WINAPI InvertRgn(HDC, HRGN); +BOOL WINAPI PaintRgn(HDC, HRGN); + +/* Rectangle output routines */ +int WINAPI FillRect(HDC, const RECT FAR*, HBRUSH); +int WINAPI FrameRect(HDC, const RECT FAR*, HBRUSH); +void WINAPI InvertRect(HDC, const RECT FAR*); + +void WINAPI DrawFocusRect(HDC, const RECT FAR*); + + +/****** Text support ********************************************************/ + +BOOL WINAPI TextOut(HDC, int, int, LPCSTR, int); +LONG WINAPI TabbedTextOut(HDC, int, int, LPCSTR, int, int, int FAR*, int); +BOOL WINAPI ExtTextOut(HDC, int, int, UINT, const RECT FAR*, LPCSTR, UINT, int FAR*); + +#define ETO_GRAYED 0x0001 +#define ETO_OPAQUE 0x0002 +#define ETO_CLIPPED 0x0004 + +DWORD WINAPI GetTextExtent(HDC, LPCSTR, int); +DWORD WINAPI GetTabbedTextExtent(HDC, LPCSTR, int, int, int FAR*); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetTextExtentPoint(HDC, LPCSTR, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +/* DrawText() Format Flags */ +#ifndef NODRAWTEXT +#define DT_TOP 0x0000 +#define DT_LEFT 0x0000 +#define DT_CENTER 0x0001 +#define DT_RIGHT 0x0002 +#define DT_VCENTER 0x0004 +#define DT_BOTTOM 0x0008 +#define DT_WORDBREAK 0x0010 +#define DT_SINGLELINE 0x0020 +#define DT_EXPANDTABS 0x0040 +#define DT_TABSTOP 0x0080 +#define DT_NOCLIP 0x0100 +#define DT_EXTERNALLEADING 0x0200 +#define DT_CALCRECT 0x0400 +#define DT_NOPREFIX 0x0800 +#define DT_INTERNAL 0x1000 + +int WINAPI DrawText(HDC, LPCSTR, int, RECT FAR*, UINT); +#endif /* NODRAWTEXT */ + +#ifdef STRICT +typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int); +#else +typedef FARPROC GRAYSTRINGPROC; +#endif + +BOOL WINAPI GrayString(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int); + +BOOL WINAPI GetCharWidth(HDC, UINT, UINT, int FAR*); + +COLORREF WINAPI SetTextColor(HDC, COLORREF); +COLORREF WINAPI GetTextColor(HDC); + +COLORREF WINAPI SetBkColor(HDC, COLORREF); +COLORREF WINAPI GetBkColor(HDC); + +int WINAPI SetBkMode(HDC, int); +int WINAPI GetBkMode(HDC); + +/* Background Modes */ +#define TRANSPARENT 1 +#define OPAQUE 2 + +UINT WINAPI SetTextAlign(HDC, UINT); +UINT WINAPI GetTextAlign(HDC); + +/* Text Alignment Options */ +#define TA_NOUPDATECP 0x0000 +#define TA_UPDATECP 0x0001 +#define TA_LEFT 0x0000 +#define TA_RIGHT 0x0002 +#define TA_CENTER 0x0006 +#define TA_TOP 0x0000 +#define TA_BOTTOM 0x0008 +#define TA_BASELINE 0x0018 + +int WINAPI SetTextCharacterExtra(HDC, int); +int WINAPI GetTextCharacterExtra(HDC); + +int WINAPI SetTextJustification(HDC, int, int); + +/****** Font support ********************************************************/ + +#ifndef NOGDIOBJ +/* Logical Font */ +#define LF_FACESIZE 32 +typedef struct tagLOGFONT +{ + int lfHeight; + int lfWidth; + int lfEscapement; + int lfOrientation; + int lfWeight; + BYTE lfItalic; + BYTE lfUnderline; + BYTE lfStrikeOut; + BYTE lfCharSet; + BYTE lfOutPrecision; + BYTE lfClipPrecision; + BYTE lfQuality; + BYTE lfPitchAndFamily; + char lfFaceName[LF_FACESIZE]; +} LOGFONT; +typedef LOGFONT* PLOGFONT; +typedef LOGFONT NEAR* NPLOGFONT; +typedef LOGFONT FAR* LPLOGFONT; + +/* weight values */ +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_HEAVY 900 + +#define FW_ULTRALIGHT FW_EXTRALIGHT +#define FW_REGULAR FW_NORMAL +#define FW_DEMIBOLD FW_SEMIBOLD +#define FW_ULTRABOLD FW_EXTRABOLD +#define FW_BLACK FW_HEAVY + +/* CharSet values */ +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 + +/* OutPrecision values */ +#define OUT_DEFAULT_PRECIS 0 +#define OUT_STRING_PRECIS 1 +#define OUT_CHARACTER_PRECIS 2 +#define OUT_STROKE_PRECIS 3 +#if (WINVER >= 0x030a) +#define OUT_TT_PRECIS 4 +#define OUT_DEVICE_PRECIS 5 +#define OUT_RASTER_PRECIS 6 +#define OUT_TT_ONLY_PRECIS 7 +#endif /* WINVER >= 0x030a */ + +/* ClipPrecision values */ +#define CLIP_DEFAULT_PRECIS 0x00 +#define CLIP_CHARACTER_PRECIS 0x01 +#define CLIP_STROKE_PRECIS 0x02 +#define CLIP_MASK 0x0F +#if (WINVER >= 0x030a) +#define CLIP_LH_ANGLES 0x10 +#define CLIP_TT_ALWAYS 0x20 +#define CLIP_EMBEDDED 0x80 +#endif /* WINVER >= 0x030a */ + +/* Quality values */ +#define DEFAULT_QUALITY 0 +#define DRAFT_QUALITY 1 +#define PROOF_QUALITY 2 + +/* PitchAndFamily pitch values (low 4 bits) */ +#define DEFAULT_PITCH 0x00 +#define FIXED_PITCH 0x01 +#define VARIABLE_PITCH 0x02 + +/* PitchAndFamily family values (high 4 bits) */ +#define FF_DONTCARE 0x00 +#define FF_ROMAN 0x10 +#define FF_SWISS 0x20 +#define FF_MODERN 0x30 +#define FF_SCRIPT 0x40 +#define FF_DECORATIVE 0x50 + +HFONT WINAPI CreateFont(int, int, int, int, int, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, LPCSTR); +HFONT WINAPI CreateFontIndirect(const LOGFONT FAR*); + +/* Stock fonts for use with GetStockObject() */ +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 + + +DWORD WINAPI SetMapperFlags(HDC, DWORD); +#define ASPECT_FILTERING 0x00000001L + +int WINAPI AddFontResource(LPCSTR); +BOOL WINAPI RemoveFontResource(LPCSTR); + +#define WM_FONTCHANGE 0x001D + +int WINAPI GetTextFace(HDC, int, LPSTR); + +DWORD WINAPI GetAspectRatioFilter(HDC); +#if (WINVER >= 0x030a) +BOOL WINAPI GetAspectRatioFilterEx(HDC, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +#endif /* NOGDIOBJ */ + +#ifndef NOTEXTMETRIC + +typedef struct tagTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; +} TEXTMETRIC; +typedef TEXTMETRIC* PTEXTMETRIC; +typedef TEXTMETRIC NEAR* NPTEXTMETRIC; +typedef TEXTMETRIC FAR* LPTEXTMETRIC; + +/* tmPitchAndFamily values */ +#define TMPF_FIXED_PITCH 0x01 +#define TMPF_VECTOR 0x02 +#define TMPF_DEVICE 0x08 +#if (WINVER >= 0x030a) +#define TMPF_TRUETYPE 0x04 +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetTextMetrics(HDC, TEXTMETRIC FAR*); + +#if (WINVER >= 0x030a) +#ifndef NOSCALABLEFONT + +typedef struct tagPANOSE +{ + BYTE bFamilyType; + BYTE bSerifStyle; + BYTE bWeight; + BYTE bProportion; + BYTE bContrast; + BYTE bStrokeVariation; + BYTE bArmStyle; + BYTE bLetterform; + BYTE bMidline; + BYTE bXHeight; +} PANOSE, FAR* LPPANOSE; + +typedef struct tagOUTLINETEXTMETRIC +{ + UINT otmSize; + TEXTMETRIC otmTextMetrics; + BYTE otmFiller; + PANOSE otmPanoseNumber; + UINT otmfsSelection; + UINT otmfsType; + int otmsCharSlopeRise; + int otmsCharSlopeRun; + int otmItalicAngle; + UINT otmEMSquare; + int otmAscent; + int otmDescent; + UINT otmLineGap; + UINT otmsCapEmHeight; + UINT otmsXHeight; + RECT otmrcFontBox; + int otmMacAscent; + int otmMacDescent; + UINT otmMacLineGap; + UINT otmusMinimumPPEM; + POINT otmptSubscriptSize; + POINT otmptSubscriptOffset; + POINT otmptSuperscriptSize; + POINT otmptSuperscriptOffset; + UINT otmsStrikeoutSize; + int otmsStrikeoutPosition; + int otmsUnderscorePosition; + int otmsUnderscoreSize; + PSTR otmpFamilyName; + PSTR otmpFaceName; + PSTR otmpStyleName; + PSTR otmpFullName; +} OUTLINETEXTMETRIC, FAR* LPOUTLINETEXTMETRIC; + +WORD WINAPI GetOutlineTextMetrics(HDC, UINT, OUTLINETEXTMETRIC FAR*); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +#ifndef NOGDIOBJ +#if (WINVER >= 0x030a) + +/* Structure passed to FONTENUMPROC */ +/* NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields */ +typedef struct tagNEWTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; + DWORD ntmFlags; + UINT ntmSizeEM; + UINT ntmCellHeight; + UINT ntmAvgWidth; +} NEWTEXTMETRIC; +typedef NEWTEXTMETRIC* PNEWTEXTMETRIC; +typedef NEWTEXTMETRIC NEAR* NPNEWTEXTMETRIC; +typedef NEWTEXTMETRIC FAR* LPNEWTEXTMETRIC; + +/* ntmFlags field flags */ +#define NTM_REGULAR 0x00000040L +#define NTM_BOLD 0x00000020L +#define NTM_ITALIC 0x00000001L + +#define LF_FULLFACESIZE 64 + +/* Structure passed to FONTENUMPROC */ +typedef struct tagENUMLOGFONT +{ + LOGFONT elfLogFont; + char elfFullName[LF_FULLFACESIZE]; + char elfStyle[LF_FACESIZE]; +} ENUMLOGFONT, FAR* LPENUMLOGFONT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +#ifdef STRICT +#ifndef NOGDIOBJ + +typedef int (CALLBACK* OLDFONTENUMPROC)(const LOGFONT FAR*, const TEXTMETRIC FAR*, int, LPARAM); + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* FONTENUMPROC)(const ENUMLOGFONT FAR*, const NEWTEXTMETRIC FAR*, int, LPARAM); + +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPARAM); + +#else /* WINVER >= 0x030a */ +typedef OLDFONTENUMPROC FONTENUMPROC; +#endif /* WINVER >= 0x030a) */ + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPARAM); +#endif /* NOGDIOBJ */ + +#else /* STRICT */ + +typedef FARPROC OLDFONTENUMPROC; +typedef FARPROC FONTENUMPROC; + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPSTR); + +#if (WINVER >= 0x030a) +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPSTR); +#endif /* WINVER >= 0x030a */ + +#endif /* !STRICT */ + +/* EnumFonts font type values */ +#define RASTER_FONTTYPE 0x0001 +#define DEVICE_FONTTYPE 0X0002 +#if (WINVER >= 0x030a) +#define TRUETYPE_FONTTYPE 0x0004 +#endif /* WINVER >= 0x030a */ + +#endif /* NOTEXTMETRIC */ + +#ifndef NOSCALABLEFONT +#if (WINVER >= 0x030a) + +DWORD WINAPI GetFontData(HDC, DWORD, DWORD, void FAR*, DWORD); +BOOL WINAPI CreateScalableFontResource(UINT, LPCSTR, LPCSTR, LPCSTR); + +typedef struct tagGLYPHMETRICS +{ + UINT gmBlackBoxX; + UINT gmBlackBoxY; + POINT gmptGlyphOrigin; + int gmCellIncX; + int gmCellIncY; +} GLYPHMETRICS, FAR* LPGLYPHMETRICS; + +typedef struct tagFIXED +{ + UINT fract; + int value; +} FIXED, FAR* LPFIXED; + +typedef struct tagMAT2 +{ + FIXED eM11; + FIXED eM12; + FIXED eM21; + FIXED eM22; +} MAT2, FAR* LPMAT2; + +DWORD WINAPI GetGlyphOutline(HDC, UINT, UINT, GLYPHMETRICS FAR*, DWORD, void FAR*, const MAT2 FAR*); + +/* GetGlyphOutline constants */ +#define GGO_METRICS 0 +#define GGO_BITMAP 1 +#define GGO_NATIVE 2 + +#define TT_POLYGON_TYPE 24 + +#define TT_PRIM_LINE 1 +#define TT_PRIM_QSPLINE 2 + +typedef struct tagPOINTFX +{ + FIXED x; + FIXED y; +} POINTFX, FAR* LPPOINTFX; + +typedef struct tagTTPOLYCURVE +{ + UINT wType; + UINT cpfx; + POINTFX apfx[1]; +} TTPOLYCURVE, FAR* LPTTPOLYCURVE; + +typedef struct tagTTPOLYGONHEADER +{ + DWORD cb; + DWORD dwType; + POINTFX pfxStart; +} TTPOLYGONHEADER, FAR* LPTTPOLYGONHEADER; + +typedef struct tagABC +{ + int abcA; + UINT abcB; + int abcC; +} ABC; +typedef ABC FAR* LPABC; + +BOOL WINAPI GetCharABCWidths(HDC, UINT, UINT, ABC FAR*); + +typedef struct tagKERNINGPAIR +{ + WORD wFirst; + WORD wSecond; + int iKernAmount; +} KERNINGPAIR, FAR* LPKERNINGPAIR; + +int WINAPI GetKerningPairs(HDC, int, KERNINGPAIR FAR*); + +typedef struct tagRASTERIZER_STATUS +{ + int nSize; + int wFlags; + int nLanguageID; +} RASTERIZER_STATUS; +typedef RASTERIZER_STATUS FAR* LPRASTERIZER_STATUS; + +/* bits defined in wFlags of RASTERIZER_STATUS */ +#define TT_AVAILABLE 0x0001 +#define TT_ENABLED 0x0002 + +BOOL WINAPI GetRasterizerCaps(RASTERIZER_STATUS FAR*, int); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +/****** Bitmap support ******************************************************/ + +#ifndef NOBITMAP +typedef struct tagBITMAP +{ + int bmType; + int bmWidth; + int bmHeight; + int bmWidthBytes; + BYTE bmPlanes; + BYTE bmBitsPixel; + void FAR* bmBits; +} BITMAP; +typedef BITMAP* PBITMAP; +typedef BITMAP NEAR* NPBITMAP; +typedef BITMAP FAR* LPBITMAP; + +/* Bitmap Header structures */ +typedef struct tagRGBTRIPLE +{ + BYTE rgbtBlue; + BYTE rgbtGreen; + BYTE rgbtRed; +} RGBTRIPLE; +typedef RGBTRIPLE FAR* LPRGBTRIPLE; + +typedef struct tagRGBQUAD +{ + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} RGBQUAD; +typedef RGBQUAD FAR* LPRGBQUAD; + +/* structures for defining DIBs */ +typedef struct tagBITMAPCOREHEADER +{ + DWORD bcSize; + short bcWidth; + short bcHeight; + WORD bcPlanes; + WORD bcBitCount; +} BITMAPCOREHEADER; +typedef BITMAPCOREHEADER* PBITMAPCOREHEADER; +typedef BITMAPCOREHEADER FAR* LPBITMAPCOREHEADER; + +typedef struct tagBITMAPINFOHEADER +{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER* PBITMAPINFOHEADER; +typedef BITMAPINFOHEADER FAR* LPBITMAPINFOHEADER; + +/* constants for the biCompression field */ +#define BI_RGB 0L +#define BI_RLE8 1L +#define BI_RLE4 2L + +typedef struct tagBITMAPINFO +{ + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO; +typedef BITMAPINFO* PBITMAPINFO; +typedef BITMAPINFO FAR* LPBITMAPINFO; + +typedef struct tagBITMAPCOREINFO +{ + BITMAPCOREHEADER bmciHeader; + RGBTRIPLE bmciColors[1]; +} BITMAPCOREINFO; +typedef BITMAPCOREINFO* PBITMAPCOREINFO; +typedef BITMAPCOREINFO FAR* LPBITMAPCOREINFO; + +typedef struct tagBITMAPFILEHEADER +{ + UINT bfType; + DWORD bfSize; + UINT bfReserved1; + UINT bfReserved2; + DWORD bfOffBits; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER* PBITMAPFILEHEADER; +typedef BITMAPFILEHEADER FAR* LPBITMAPFILEHEADER; + + +HBITMAP WINAPI CreateBitmap(int, int, UINT, UINT, const void FAR*); +HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR* ); +HBITMAP WINAPI CreateCompatibleBitmap(HDC, int, int); +HBITMAP WINAPI CreateDiscardableBitmap(HDC, int, int); +HBITMAP WINAPI CreateDIBitmap(HDC, BITMAPINFOHEADER FAR*, DWORD, const void FAR*, BITMAPINFO FAR*, UINT); + +HBITMAP WINAPI LoadBitmap(HINSTANCE, LPCSTR); + +/* DIB color table identifiers */ +#define DIB_RGB_COLORS 0 +#define DIB_PAL_COLORS 1 + +/* constants for CreateDIBitmap */ +#define CBM_INIT 0x00000004L +#endif /* NOBITMAP */ + +#ifndef NORASTEROPS + +/* Binary raster ops */ +#define R2_BLACK 1 +#define R2_NOTMERGEPEN 2 +#define R2_MASKNOTPEN 3 +#define R2_NOTCOPYPEN 4 +#define R2_MASKPENNOT 5 +#define R2_NOT 6 +#define R2_XORPEN 7 +#define R2_NOTMASKPEN 8 +#define R2_MASKPEN 9 +#define R2_NOTXORPEN 10 +#define R2_NOP 11 +#define R2_MERGENOTPEN 12 +#define R2_COPYPEN 13 +#define R2_MERGEPENNOT 14 +#define R2_MERGEPEN 15 +#define R2_WHITE 16 + +/* Ternary raster operations */ +#define SRCCOPY 0x00CC0020L +#define SRCPAINT 0x00EE0086L +#define SRCAND 0x008800C6L +#define SRCINVERT 0x00660046L +#define SRCERASE 0x00440328L +#define NOTSRCCOPY 0x00330008L +#define NOTSRCERASE 0x001100A6L +#define MERGECOPY 0x00C000CAL +#define MERGEPAINT 0x00BB0226L +#define PATCOPY 0x00F00021L +#define PATPAINT 0x00FB0A09L +#define PATINVERT 0x005A0049L +#define DSTINVERT 0x00550009L +#define BLACKNESS 0x00000042L +#define WHITENESS 0x00FF0062L + +#endif /* NORASTEROPS */ + +#ifndef NOBITMAP +BOOL WINAPI BitBlt(HDC, int, int, int, int, HDC, int, int, DWORD); + +BOOL WINAPI PatBlt(HDC, int, int, int, int, DWORD); + +BOOL WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD); +int WINAPI StretchDIBits(HDC, int, int, int, int, int, + int, int, int, const void FAR*, LPBITMAPINFO, UINT, DWORD); + +COLORREF WINAPI SetPixel(HDC, int, int, COLORREF); +COLORREF WINAPI GetPixel(HDC, int, int); + +/* StretchBlt() Modes */ +#define BLACKONWHITE 1 +#define WHITEONBLACK 2 +#define COLORONCOLOR 3 + +/* new StretchBlt() Modes (simpler names) */ +#define STRETCH_ANDSCANS 1 +#define STRETCH_ORSCANS 2 +#define STRETCH_DELETESCANS 3 + +int WINAPI SetStretchBltMode(HDC, int); +int WINAPI GetStretchBltMode(HDC); + +DWORD WINAPI SetBitmapDimension(HBITMAP, int, int); +DWORD WINAPI GetBitmapDimension(HBITMAP); +#if (WINVER >= 0x030a) +BOOL WINAPI SetBitmapDimensionEx(HBITMAP, int, int, SIZE FAR*); +BOOL WINAPI GetBitmapDimensionEx(HBITMAP, SIZE FAR*); +#endif /* WINVER >= 0x030a */ +int WINAPI SetROP2(HDC, int); +int WINAPI GetROP2(HDC); + +LONG WINAPI SetBitmapBits(HBITMAP, DWORD, const void FAR*); +LONG WINAPI GetBitmapBits(HBITMAP, LONG, void FAR*); + +int WINAPI SetDIBits(HDC, HBITMAP, UINT, UINT, const void FAR*, BITMAPINFO FAR*, UINT); +int WINAPI GetDIBits(HDC, HBITMAP, UINT, UINT, void FAR*, BITMAPINFO FAR*, UINT); + +int WINAPI SetDIBitsToDevice(HDC, int, int, int, int, int, int, UINT, UINT, + void FAR*, BITMAPINFO FAR*, UINT); +#endif /* NOBITMAP */ + +/****** Metafile support ****************************************************/ + +#ifndef NOMETAFILE + +DECLARE_HANDLE(HMETAFILE); + +HDC WINAPI CreateMetaFile(LPCSTR); +HMETAFILE WINAPI CloseMetaFile(HDC); + +HMETAFILE WINAPI GetMetaFile(LPCSTR); +BOOL WINAPI DeleteMetaFile(HMETAFILE); +HMETAFILE WINAPI CopyMetaFile(HMETAFILE, LPCSTR); + +BOOL WINAPI PlayMetaFile(HDC, HMETAFILE); + +HGLOBAL WINAPI GetMetaFileBits(HMETAFILE); +HMETAFILE WINAPI SetMetaFileBits(HGLOBAL); +#if (WINVER >= 0x030a) +HMETAFILE WINAPI SetMetaFileBitsBetter(HGLOBAL); +#endif /* WINVER >= 0x030a */ + +/* Clipboard Metafile Picture Structure */ +typedef struct tagMETAFILEPICT +{ + int mm; + int xExt; + int yExt; + HMETAFILE hMF; +} METAFILEPICT; +typedef METAFILEPICT FAR* LPMETAFILEPICT; + +typedef struct tagMETAHEADER +{ + UINT mtType; + UINT mtHeaderSize; + UINT mtVersion; + DWORD mtSize; + UINT mtNoObjects; + DWORD mtMaxRecord; + UINT mtNoParameters; +} METAHEADER; + +typedef struct tagHANDLETABLE +{ + HGDIOBJ objectHandle[1]; +} HANDLETABLE; +typedef HANDLETABLE* PHANDLETABLE; +typedef HANDLETABLE FAR* LPHANDLETABLE; + +typedef struct tagMETARECORD +{ + DWORD rdSize; + UINT rdFunction; + UINT rdParm[1]; +} METARECORD; +typedef METARECORD* PMETARECORD; +typedef METARECORD FAR* LPMETARECORD; + +/* Metafile Functions */ +#define META_SETBKCOLOR 0x0201 +#define META_SETBKMODE 0x0102 +#define META_SETMAPMODE 0x0103 +#define META_SETROP2 0x0104 +#define META_SETRELABS 0x0105 +#define META_SETPOLYFILLMODE 0x0106 +#define META_SETSTRETCHBLTMODE 0x0107 +#define META_SETTEXTCHAREXTRA 0x0108 +#define META_SETTEXTCOLOR 0x0209 +#define META_SETTEXTJUSTIFICATION 0x020A +#define META_SETWINDOWORG 0x020B +#define META_SETWINDOWEXT 0x020C +#define META_SETVIEWPORTORG 0x020D +#define META_SETVIEWPORTEXT 0x020E +#define META_OFFSETWINDOWORG 0x020F +#define META_SCALEWINDOWEXT 0x0410 +#define META_OFFSETVIEWPORTORG 0x0211 +#define META_SCALEVIEWPORTEXT 0x0412 +#define META_LINETO 0x0213 +#define META_MOVETO 0x0214 +#define META_EXCLUDECLIPRECT 0x0415 +#define META_INTERSECTCLIPRECT 0x0416 +#define META_ARC 0x0817 +#define META_ELLIPSE 0x0418 +#define META_FLOODFILL 0x0419 +#define META_PIE 0x081A +#define META_RECTANGLE 0x041B +#define META_ROUNDRECT 0x061C +#define META_PATBLT 0x061D +#define META_SAVEDC 0x001E +#define META_SETPIXEL 0x041F +#define META_OFFSETCLIPRGN 0x0220 +#define META_TEXTOUT 0x0521 +#define META_BITBLT 0x0922 +#define META_STRETCHBLT 0x0B23 +#define META_POLYGON 0x0324 +#define META_POLYLINE 0x0325 +#define META_ESCAPE 0x0626 +#define META_RESTOREDC 0x0127 +#define META_FILLREGION 0x0228 +#define META_FRAMEREGION 0x0429 +#define META_INVERTREGION 0x012A +#define META_PAINTREGION 0x012B +#define META_SELECTCLIPREGION 0x012C +#define META_SELECTOBJECT 0x012D +#define META_SETTEXTALIGN 0x012E +#define META_DRAWTEXT 0x062F + +#define META_CHORD 0x0830 +#define META_SETMAPPERFLAGS 0x0231 +#define META_EXTTEXTOUT 0x0a32 +#define META_SETDIBTODEV 0x0d33 +#define META_SELECTPALETTE 0x0234 +#define META_REALIZEPALETTE 0x0035 +#define META_ANIMATEPALETTE 0x0436 +#define META_SETPALENTRIES 0x0037 +#define META_POLYPOLYGON 0x0538 +#define META_RESIZEPALETTE 0x0139 + +#define META_DIBBITBLT 0x0940 +#define META_DIBSTRETCHBLT 0x0b41 +#define META_DIBCREATEPATTERNBRUSH 0x0142 +#define META_STRETCHDIB 0x0f43 + +#define META_EXTFLOODFILL 0x0548 + +#define META_RESETDC 0x014C +#define META_STARTDOC 0x014D +#define META_STARTPAGE 0x004F +#define META_ENDPAGE 0x0050 +#define META_ABORTDOC 0x0052 +#define META_ENDDOC 0x005E + +#define META_DELETEOBJECT 0x01f0 + +#define META_CREATEPALETTE 0x00f7 +#define META_CREATEBRUSH 0x00F8 +#define META_CREATEPATTERNBRUSH 0x01F9 +#define META_CREATEPENINDIRECT 0x02FA +#define META_CREATEFONTINDIRECT 0x02FB +#define META_CREATEBRUSHINDIRECT 0x02FC +#define META_CREATEBITMAPINDIRECT 0x02FD +#define META_CREATEBITMAP 0x06FE +#define META_CREATEREGION 0x06FF + +void WINAPI PlayMetaFileRecord(HDC, HANDLETABLE FAR*, METARECORD FAR*, UINT); + +#ifdef STRICT +typedef int (CALLBACK* MFENUMPROC)(HDC, HANDLETABLE FAR*, METARECORD FAR*, int, LPARAM); +#else +typedef FARPROC MFENUMPROC; +#endif + +BOOL WINAPI EnumMetaFile(HDC, HMETAFILE, MFENUMPROC, LPARAM); + +#endif /* NOMETAFILE */ + +/****** Printing support ****************************************************/ + +#ifdef STRICT +typedef BOOL (CALLBACK* ABORTPROC)(HDC, int); +#else +typedef FARPROC ABORTPROC; +#endif + +#if (WINVER >= 0x030a) + +typedef struct +{ + int cbSize; + LPCSTR lpszDocName; + LPCSTR lpszOutput; +} DOCINFO; +typedef DOCINFO FAR* LPDOCINFO; + +int WINAPI StartDoc(HDC, DOCINFO FAR*); +int WINAPI StartPage(HDC); +int WINAPI EndPage(HDC); +int WINAPI EndDoc(HDC); +int WINAPI AbortDoc(HDC); + +int WINAPI SetAbortProc(HDC, ABORTPROC); +HANDLE WINAPI SpoolFile(LPSTR, LPSTR, LPSTR, LPSTR); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI QueryAbort(HDC, int); + +/* Spooler Error Codes */ +#define SP_NOTREPORTED 0x4000 +#define SP_ERROR (-1) +#define SP_APPABORT (-2) +#define SP_USERABORT (-3) +#define SP_OUTOFDISK (-4) +#define SP_OUTOFMEMORY (-5) + +#define PR_JOBSTATUS 0x0000 + +#endif /* NOGDI */ + +/* Spooler status notification message */ +#define WM_SPOOLERSTATUS 0x002A + +#ifndef NOGDI + +/******* GDI Escape support *************************************************/ + +int WINAPI Escape(HDC, int, int, LPCSTR, void FAR*); + +/* GDI Escapes */ +#define NEWFRAME 1 +#define ABORTDOC 2 +#define NEXTBAND 3 +#define SETCOLORTABLE 4 +#define GETCOLORTABLE 5 +#define FLUSHOUTPUT 6 +#define DRAFTMODE 7 +#define QUERYESCSUPPORT 8 +#define SETABORTPROC 9 +#define STARTDOC 10 +#define ENDDOC 11 +#define GETPHYSPAGESIZE 12 +#define GETPRINTINGOFFSET 13 +#define GETSCALINGFACTOR 14 +#define MFCOMMENT 15 +#define GETPENWIDTH 16 +#define SETCOPYCOUNT 17 +#define SELECTPAPERSOURCE 18 +#define DEVICEDATA 19 +#define PASSTHROUGH 19 +#define GETTECHNOLGY 20 +#define GETTECHNOLOGY 20 +#define SETLINECAP 21 +#define SETLINEJOIN 22 +#define SETMITERLIMIT 23 +#define BANDINFO 24 +#define DRAWPATTERNRECT 25 +#define GETVECTORPENSIZE 26 +#define GETVECTORBRUSHSIZE 27 +#define ENABLEDUPLEX 28 +#define GETSETPAPERBINS 29 +#define GETSETPRINTORIENT 30 +#define ENUMPAPERBINS 31 +#define SETDIBSCALING 32 +#define EPSPRINTING 33 +#define ENUMPAPERMETRICS 34 +#define GETSETPAPERMETRICS 35 +#define POSTSCRIPT_DATA 37 +#define POSTSCRIPT_IGNORE 38 +#define MOUSETRAILS 39 + +#define GETEXTENDEDTEXTMETRICS 256 +#define GETEXTENTTABLE 257 +#define GETPAIRKERNTABLE 258 +#define GETTRACKKERNTABLE 259 +#define EXTTEXTOUT 512 +#define GETFACENAME 513 +#define ENABLERELATIVEWIDTHS 768 +#define ENABLEPAIRKERNING 769 +#define SETKERNTRACK 770 +#define SETALLJUSTVALUES 771 +#define SETCHARSET 772 + +#define STRETCHBLT 2048 + +#define GETSETSCREENPARAMS 3072 + +#define BEGIN_PATH 4096 +#define CLIP_TO_PATH 4097 +#define END_PATH 4098 +#define EXT_DEVICE_CAPS 4099 +#define RESTORE_CTM 4100 +#define SAVE_CTM 4101 +#define SET_ARC_DIRECTION 4102 +#define SET_BACKGROUND_COLOR 4103 +#define SET_POLY_MODE 4104 +#define SET_SCREEN_ANGLE 4105 +#define SET_SPREAD 4106 +#define TRANSFORM_CTM 4107 +#define SET_CLIP_BOX 4108 +#define SET_BOUNDS 4109 + +#endif /* NOGDI */ + +/****** USER typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HWND); + +#ifndef NOUSER + +DECLARE_HANDLE(HMENU); + +DECLARE_HANDLE(HICON); +typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */ + +/****** System Metrics *******************************************************/ + +#ifndef NOSYSMETRICS + +int WINAPI GetSystemMetrics(int); + +/* GetSystemMetrics() codes */ +#define SM_CXSCREEN 0 +#define SM_CYSCREEN 1 +#define SM_CXVSCROLL 2 +#define SM_CYHSCROLL 3 +#define SM_CYCAPTION 4 +#define SM_CXBORDER 5 +#define SM_CYBORDER 6 +#define SM_CXDLGFRAME 7 +#define SM_CYDLGFRAME 8 +#define SM_CYVTHUMB 9 +#define SM_CXHTHUMB 10 +#define SM_CXICON 11 +#define SM_CYICON 12 +#define SM_CXCURSOR 13 +#define SM_CYCURSOR 14 +#define SM_CYMENU 15 +#define SM_CXFULLSCREEN 16 +#define SM_CYFULLSCREEN 17 +#define SM_CYKANJIWINDOW 18 +#define SM_MOUSEPRESENT 19 +#define SM_CYVSCROLL 20 +#define SM_CXHSCROLL 21 +#define SM_DEBUG 22 +#define SM_SWAPBUTTON 23 +#define SM_RESERVED1 24 +#define SM_RESERVED2 25 +#define SM_RESERVED3 26 +#define SM_RESERVED4 27 +#define SM_CXMIN 28 +#define SM_CYMIN 29 +#define SM_CXSIZE 30 +#define SM_CYSIZE 31 +#define SM_CXFRAME 32 +#define SM_CYFRAME 33 +#define SM_CXMINTRACK 34 +#define SM_CYMINTRACK 35 + +#if (WINVER >= 0x030a) +#define SM_CXDOUBLECLK 36 +#define SM_CYDOUBLECLK 37 +#define SM_CXICONSPACING 38 +#define SM_CYICONSPACING 39 +#define SM_MENUDROPALIGNMENT 40 +#define SM_PENWINDOWS 41 +#define SM_DBCSENABLED 42 +#endif /* WINVER >= 0x030a */ + +#define SM_CMETRICS 43 + +#endif /* NOSYSMETRICS */ + +UINT WINAPI GetDoubleClickTime(void); +void WINAPI SetDoubleClickTime(UINT); + +#define WM_DEVMODECHANGE 0x001B +#define WM_TIMECHANGE 0x001E + +/****** System Parameters support ********************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOSYSTEMPARAMSINFO + +BOOL WINAPI SystemParametersInfo(UINT, UINT, VOID FAR*, UINT); + +#define SPI_GETBEEP 1 +#define SPI_SETBEEP 2 +#define SPI_GETMOUSE 3 +#define SPI_SETMOUSE 4 +#define SPI_GETBORDER 5 +#define SPI_SETBORDER 6 +#define SPI_GETKEYBOARDSPEED 10 +#define SPI_SETKEYBOARDSPEED 11 +#define SPI_LANGDRIVER 12 +#define SPI_ICONHORIZONTALSPACING 13 +#define SPI_GETSCREENSAVETIMEOUT 14 +#define SPI_SETSCREENSAVETIMEOUT 15 +#define SPI_GETSCREENSAVEACTIVE 16 +#define SPI_SETSCREENSAVEACTIVE 17 +#define SPI_GETGRIDGRANULARITY 18 +#define SPI_SETGRIDGRANULARITY 19 +#define SPI_SETDESKWALLPAPER 20 +#define SPI_SETDESKPATTERN 21 +#define SPI_GETKEYBOARDDELAY 22 +#define SPI_SETKEYBOARDDELAY 23 +#define SPI_ICONVERTICALSPACING 24 +#define SPI_GETICONTITLEWRAP 25 +#define SPI_SETICONTITLEWRAP 26 +#define SPI_GETMENUDROPALIGNMENT 27 +#define SPI_SETMENUDROPALIGNMENT 28 +#define SPI_SETDOUBLECLKWIDTH 29 +#define SPI_SETDOUBLECLKHEIGHT 30 +#define SPI_GETICONTITLELOGFONT 31 +#define SPI_SETDOUBLECLICKTIME 32 +#define SPI_SETMOUSEBUTTONSWAP 33 +#define SPI_SETICONTITLELOGFONT 34 +#define SPI_GETFASTTASKSWITCH 35 +#define SPI_SETFASTTASKSWITCH 36 + +/* SystemParametersInfo flags */ +#define SPIF_UPDATEINIFILE 0x0001 +#define SPIF_SENDWININICHANGE 0x0002 + +#endif /* NOSYSTEMPARAMSINFO */ +#endif /* WINVER >= 0x030a */ + +/****** Rectangle support ****************************************************/ + +void WINAPI SetRect(RECT FAR*, int, int, int, int); +void WINAPI SetRectEmpty(RECT FAR*); + +void WINAPI CopyRect(RECT FAR*, const RECT FAR*); + +BOOL WINAPI IsRectEmpty(const RECT FAR*); + +BOOL WINAPI EqualRect(const RECT FAR*, const RECT FAR*); + +BOOL WINAPI IntersectRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI UnionRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*); + +void WINAPI OffsetRect(RECT FAR*, int, int); +void WINAPI InflateRect(RECT FAR*, int, int); + +BOOL WINAPI PtInRect(const RECT FAR*, POINT); + +/****** Window message support ***********************************************/ + +UINT WINAPI RegisterWindowMessage(LPCSTR); + +#define WM_NULL 0x0000 + +/* NOTE: All messages below 0x0400 are RESERVED by Windows */ +#define WM_USER 0x0400 + +#ifndef NOMSG + +/* Queued message structure */ +typedef struct tagMSG +{ + HWND hwnd; + UINT message; + WPARAM wParam; + LPARAM lParam; + DWORD time; + POINT pt; +} MSG; +typedef MSG* PMSG; +typedef MSG NEAR* NPMSG; +typedef MSG FAR* LPMSG; + +BOOL WINAPI GetMessage(MSG FAR*, HWND, UINT, UINT); +BOOL WINAPI PeekMessage(MSG FAR*, HWND, UINT, UINT, UINT); + +/* PeekMessage() options */ +#define PM_NOREMOVE 0x0000 +#define PM_REMOVE 0x0001 +#define PM_NOYIELD 0x0002 + +void WINAPI WaitMessage(void); + +DWORD WINAPI GetMessagePos(void); +LONG WINAPI GetMessageTime(void); +#if (WINVER >= 0x030a) +LPARAM WINAPI GetMessageExtraInfo(void); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI TranslateMessage(const MSG FAR*); +LONG WINAPI DispatchMessage(const MSG FAR*); + +BOOL WINAPI SetMessageQueue(int); + +BOOL WINAPI GetInputState(void); + +#if (WINVER >= 0x030a) +DWORD WINAPI GetQueueStatus(UINT flags); + +/* GetQueueStatus flags */ +#define QS_KEY 0x0001 +#define QS_MOUSEMOVE 0x0002 +#define QS_MOUSEBUTTON 0x0004 +#define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON) +#define QS_POSTMESSAGE 0x0008 +#define QS_TIMER 0x0010 +#define QS_PAINT 0x0020 +#define QS_SENDMESSAGE 0x0040 + +#define QS_ALLINPUT 0x007f +#endif /* WINVER >= 0x030a */ + +#endif /* NOMSG */ + +BOOL WINAPI PostMessage(HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI SendMessage(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG + +BOOL WINAPI PostAppMessage(HTASK, UINT, WPARAM, LPARAM); + +void WINAPI ReplyMessage(LRESULT); +BOOL WINAPI InSendMessage(void); + +/* Special HWND value for use with PostMessage() and SendMessage() */ +#define HWND_BROADCAST ((HWND)0xffff) + +BOOL WINAPI CallMsgFilter(MSG FAR*, int); + +#define WH_GETMESSAGE 3 + +#define WH_CALLWNDPROC 4 + +#define WH_MSGFILTER (-1) +#define WH_SYSMSGFILTER 6 + +/* CallMsgFilter() and WH_SYS/MSGFILTER context codes */ +#define MSGF_DIALOGBOX 0 +#define MSGF_MENU 2 +#define MSGF_MOVE 3 +#define MSGF_SIZE 4 +#define MSGF_SCROLLBAR 5 +#define MSGF_NEXTWINDOW 6 +#define MSGF_MAINLOOP 8 +#define MSGF_USER 4096 +#endif /* NOMSG */ + +/* Standard window messages */ +/* PenWindows specific messages */ +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F + +/* Coalescing messages */ +#define WM_COALESCE_FIRST 0x0390 +#define WM_COALESCE_LAST 0x039F + + +#if (WINVER >= 0x030a) +/****** Power management ****************************************************/ +#define WM_POWER 0x0048 + +/* wParam for WM_POWER window message and DRV_POWER driver notification */ +#define PWR_OK 1 +#define PWR_FAIL (-1) +#define PWR_SUSPENDREQUEST 1 +#define PWR_SUSPENDRESUME 2 +#define PWR_CRITICALRESUME 3 +#endif /* WINVER >= 0x030a */ + +/****** Application termination *********************************************/ + +#define WM_QUERYENDSESSION 0x0011 +#define WM_ENDSESSION 0x0016 + +#define WM_QUIT 0x0012 + +void WINAPI PostQuitMessage(int); + +#define WM_SYSTEMERROR 0x0017 + +/****** Window class management *********************************************/ + +typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); + +typedef struct tagWNDCLASS +{ + UINT style; + WNDPROC lpfnWndProc; + int cbClsExtra; + int cbWndExtra; + HINSTANCE hInstance; + HICON hIcon; + HCURSOR hCursor; + HBRUSH hbrBackground; + LPCSTR lpszMenuName; + LPCSTR lpszClassName; +} WNDCLASS; +typedef WNDCLASS* PWNDCLASS; +typedef WNDCLASS NEAR* NPWNDCLASS; +typedef WNDCLASS FAR* LPWNDCLASS; + +ATOM WINAPI RegisterClass(const WNDCLASS FAR*); +BOOL WINAPI UnregisterClass(LPCSTR, HINSTANCE); + +BOOL WINAPI GetClassInfo(HINSTANCE, LPCSTR, WNDCLASS FAR*); +int WINAPI GetClassName(HWND, LPSTR, int); + +#ifndef NOWINSTYLES + +/* Class styles */ +#define CS_VREDRAW 0x0001 +#define CS_HREDRAW 0x0002 + +#define CS_OWNDC 0x0020 +#define CS_CLASSDC 0x0040 +#define CS_PARENTDC 0x0080 + +#define CS_SAVEBITS 0x0800 + +#define CS_DBLCLKS 0x0008 + +#define CS_BYTEALIGNCLIENT 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 + +#define CS_NOCLOSE 0x0200 + +#define CS_KEYCVTWINDOW 0x0004 +#define CS_NOKEYCVT 0x0100 + +#define CS_GLOBALCLASS 0x4000 +#endif /* NOWINSTYLES */ + +#ifndef NOWINOFFSETS + +WORD WINAPI GetClassWord(HWND, int); +WORD WINAPI SetClassWord(HWND, int, WORD); +LONG WINAPI GetClassLong(HWND, int); +LONG WINAPI SetClassLong(HWND, int, LONG); + +/* Class field offsets for GetClassLong() and GetClassWord() */ +#define GCL_MENUNAME (-8) +#define GCW_HBRBACKGROUND (-10) +#define GCW_HCURSOR (-12) +#define GCW_HICON (-14) +#define GCW_HMODULE (-16) +#define GCW_CBWNDEXTRA (-18) +#define GCW_CBCLSEXTRA (-20) +#define GCL_WNDPROC (-24) +#define GCW_STYLE (-26) + +#if (WINVER >= 0x030a) +#define GCW_ATOM (-32) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINOFFSETS */ + +/****** Window creation/destroy *********************************************/ + +/* Window Styles */ +#ifndef NOWINSTYLES + +/* Basic window types */ +#define WS_OVERLAPPED 0x00000000L +#define WS_POPUP 0x80000000L +#define WS_CHILD 0x40000000L + +/* Clipping styles */ +#define WS_CLIPSIBLINGS 0x04000000L +#define WS_CLIPCHILDREN 0x02000000L + +/* Generic window states */ +#define WS_VISIBLE 0x10000000L +#define WS_DISABLED 0x08000000L + +/* Main window states */ +#define WS_MINIMIZE 0x20000000L +#define WS_MAXIMIZE 0x01000000L + +/* Main window styles */ +#define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */ +#define WS_BORDER 0x00800000L +#define WS_DLGFRAME 0x00400000L +#define WS_VSCROLL 0x00200000L +#define WS_HSCROLL 0x00100000L +#define WS_SYSMENU 0x00080000L +#define WS_THICKFRAME 0x00040000L +#define WS_MINIMIZEBOX 0x00020000L +#define WS_MAXIMIZEBOX 0x00010000L + +/* Control window styles */ +#define WS_GROUP 0x00020000L +#define WS_TABSTOP 0x00010000L + +/* Common Window Styles */ +#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) +#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU) +#define WS_CHILDWINDOW (WS_CHILD) + +/* Extended Window Styles */ +#define WS_EX_DLGMODALFRAME 0x00000001L +#define WS_EX_NOPARENTNOTIFY 0x00000004L + +#if (WINVER >= 0x030a) +#define WS_EX_TOPMOST 0x00000008L +#define WS_EX_ACCEPTFILES 0x00000010L +#define WS_EX_TRANSPARENT 0x00000020L +#endif /* WINVER >= 0x030a */ + +/* Obsolete style names */ +#define WS_TILED WS_OVERLAPPED +#define WS_ICONIC WS_MINIMIZE +#define WS_SIZEBOX WS_THICKFRAME +#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW + + +#endif /* NOWINSTYLES */ + +/* Special value for CreateWindow, et al. */ +#define HWND_DESKTOP ((HWND)0) + +BOOL WINAPI IsWindow(HWND); + +HWND WINAPI CreateWindowEx(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); +HWND WINAPI CreateWindow(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); + +#define WM_CREATE 0x0001 +#define WM_NCCREATE 0x0081 + +/* WM_CREATE/WM_NCCREATE lParam struct */ +typedef struct tagCREATESTRUCT +{ + void FAR* lpCreateParams; + HINSTANCE hInstance; + HMENU hMenu; + HWND hwndParent; + int cy; + int cx; + int y; + int x; + LONG style; + LPCSTR lpszName; + LPCSTR lpszClass; + DWORD dwExStyle; +} CREATESTRUCT; +typedef CREATESTRUCT FAR* LPCREATESTRUCT; + +BOOL WINAPI DestroyWindow(HWND); + +#define WM_DESTROY 0x0002 +#define WM_NCDESTROY 0x0082 + +/* Basic window attributes */ + +HTASK WINAPI GetWindowTask(HWND); + +BOOL WINAPI IsChild(HWND, HWND); + +HWND WINAPI GetParent(HWND); +HWND WINAPI SetParent(HWND, HWND); + +BOOL WINAPI IsWindowVisible(HWND); + +BOOL WINAPI ShowWindow(HWND, int); + + +#ifndef NOSHOWWINDOW + +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 + +/* Obsolete ShowWindow() command names */ +#define HIDE_WINDOW 0 +#define SHOW_OPENWINDOW 1 +#define SHOW_ICONWINDOW 2 +#define SHOW_FULLSCREEN 3 +#define SHOW_OPENNOACTIVATE 4 + +#define WM_SHOWWINDOW 0x0018 + +/* WM_SHOWWINDOW wParam codes */ +#define SW_PARENTCLOSING 1 +#define SW_OTHERMAXIMIZED 2 +#define SW_PARENTOPENING 3 +#define SW_OTHERRESTORED 4 + +/* Obsolete constant names */ +#define SW_OTHERZOOM SW_OTHERMAXIMIZED +#define SW_OTHERUNZOOM SW_OTHERRESTORED +#endif /* NOSHOWWINDOW */ + +#define WM_SETREDRAW 0x000B + +/* Enabled state */ +BOOL WINAPI EnableWindow(HWND,BOOL); +BOOL WINAPI IsWindowEnabled(HWND); + +#define WM_ENABLE 0x000A + +/* Window text */ +void WINAPI SetWindowText(HWND, LPCSTR); +int WINAPI GetWindowText(HWND, LPSTR, int); +int WINAPI GetWindowTextLength(HWND); + +#define WM_SETTEXT 0x000C +#define WM_GETTEXT 0x000D +#define WM_GETTEXTLENGTH 0x000E + +/* Window words */ +WORD WINAPI GetWindowWord(HWND, int); +WORD WINAPI SetWindowWord(HWND, int, WORD); +LONG WINAPI GetWindowLong(HWND, int); +LONG WINAPI SetWindowLong(HWND, int, LONG); + +/* Window field offsets for GetWindowLong() and GetWindowWord() */ +#ifndef NOWINOFFSETS +#define GWL_WNDPROC (-4) +#define GWW_HINSTANCE (-6) +#define GWW_HWNDPARENT (-8) +#define GWW_ID (-12) +#define GWL_STYLE (-16) +#define GWL_EXSTYLE (-20) +#endif /* NOWINOFFSETS */ + +/****** Window size, position, Z-order, and visibility **********************/ + +#define CW_USEDEFAULT ((int)0x8000) + +void WINAPI GetClientRect(HWND, RECT FAR*); +void WINAPI GetWindowRect(HWND, RECT FAR*); + + +#if (WINVER >= 0x030a) +typedef struct tagWINDOWPLACEMENT +{ + UINT length; + UINT flags; + UINT showCmd; + POINT ptMinPosition; + POINT ptMaxPosition; + RECT rcNormalPosition; +} WINDOWPLACEMENT; +typedef WINDOWPLACEMENT *PWINDOWPLACEMENT; +typedef WINDOWPLACEMENT FAR* LPWINDOWPLACEMENT; + +#define WPF_SETMINPOSITION 0x0001 +#define WPF_RESTORETOMAXIMIZED 0x0002 + +BOOL WINAPI GetWindowPlacement(HWND, WINDOWPLACEMENT FAR*); +BOOL WINAPI SetWindowPlacement(HWND, const WINDOWPLACEMENT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI SetWindowPos(HWND, HWND, int, int, int, int, UINT); + +/* SetWindowPos() and WINDOWPOS flags */ +#define SWP_NOSIZE 0x0001 +#define SWP_NOMOVE 0x0002 +#define SWP_NOZORDER 0x0004 +#define SWP_NOREDRAW 0x0008 +#define SWP_NOACTIVATE 0x0010 +#define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */ +#define SWP_SHOWWINDOW 0x0040 +#define SWP_HIDEWINDOW 0x0080 +#define SWP_NOCOPYBITS 0x0100 +#define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */ + +#define SWP_DRAWFRAME SWP_FRAMECHANGED +#define SWP_NOREPOSITION SWP_NOOWNERZORDER + +#define SWP_NOSENDCHANGING 0x0400 +#define SWP_DEFERERASE 0x2000 + +/* SetWindowPos() hwndInsertAfter field values */ +#define HWND_TOP ((HWND)0) +#define HWND_BOTTOM ((HWND)1) +#define HWND_TOPMOST ((HWND)-1) +#define HWND_NOTOPMOST ((HWND)-2) + +#ifndef NODEFERWINDOWPOS + +DECLARE_HANDLE(HDWP); + +HDWP WINAPI BeginDeferWindowPos(int); +HDWP WINAPI DeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT); +BOOL WINAPI EndDeferWindowPos(HDWP); + +#endif /* NODEFERWINDOWPOS */ + +BOOL WINAPI MoveWindow(HWND, int, int, int, int, BOOL); +BOOL WINAPI BringWindowToTop(HWND); + +#if (WINVER >= 0x030a) + +#define WM_WINDOWPOSCHANGING 0x0046 +#define WM_WINDOWPOSCHANGED 0x0047 + +/* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */ +typedef struct tagWINDOWPOS +{ + HWND hwnd; + HWND hwndInsertAfter; + int x; + int y; + int cx; + int cy; + UINT flags; +} WINDOWPOS; +typedef WINDOWPOS FAR* LPWINDOWPOS; +#endif /* WINVER >= 0x030a */ + +#define WM_MOVE 0x0003 +#define WM_SIZE 0x0005 + +/* WM_SIZE message wParam values */ +#define SIZE_RESTORED 0 +#define SIZE_MINIMIZED 1 +#define SIZE_MAXIMIZED 2 +#define SIZE_MAXSHOW 3 +#define SIZE_MAXHIDE 4 + +/* Obsolete constant names */ +#define SIZENORMAL SIZE_RESTORED +#define SIZEICONIC SIZE_MINIMIZED +#define SIZEFULLSCREEN SIZE_MAXIMIZED +#define SIZEZOOMSHOW SIZE_MAXSHOW +#define SIZEZOOMHIDE SIZE_MAXHIDE + +/****** Window proc implementation & subclassing support *********************/ + +LRESULT WINAPI DefWindowProc(HWND, UINT, WPARAM, LPARAM); + +#ifdef STRICT +LRESULT WINAPI CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM); +#else +LRESULT WINAPI CallWindowProc(FARPROC, HWND, UINT, WPARAM, LPARAM); +#endif + +/****** Main window support **************************************************/ + +void WINAPI AdjustWindowRect(RECT FAR*, DWORD, BOOL); +void WINAPI AdjustWindowRectEx(RECT FAR*, DWORD, BOOL, DWORD); + +#define WM_QUERYOPEN 0x0013 +#define WM_CLOSE 0x0010 + +/* Struct pointed to by WM_GETMINMAXINFO lParam */ +typedef struct tagMINMAXINFO +{ + POINT ptReserved; + POINT ptMaxSize; + POINT ptMaxPosition; + POINT ptMinTrackSize; + POINT ptMaxTrackSize; +} MINMAXINFO; +#define WM_GETMINMAXINFO 0x0024 + + +BOOL WINAPI FlashWindow(HWND, BOOL); + +void WINAPI ShowOwnedPopups(HWND, BOOL); + +/* Obsolete functions */ +BOOL WINAPI OpenIcon(HWND); +void WINAPI CloseWindow(HWND); +BOOL WINAPI AnyPopup(void); +BOOL WINAPI IsIconic(HWND); +BOOL WINAPI IsZoomed(HWND); + +/****** Window coordinate mapping and hit-testing ***************************/ + +void WINAPI ClientToScreen(HWND, POINT FAR*); +void WINAPI ScreenToClient(HWND, POINT FAR*); + +#if (WINVER >= 0x030a) +void WINAPI MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT FAR* lppt, UINT cpt); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI WindowFromPoint(POINT); +HWND WINAPI ChildWindowFromPoint(HWND, POINT); + +/****** Window query and enumeration ****************************************/ + +HWND WINAPI GetDesktopWindow(void); + +HWND WINAPI FindWindow(LPCSTR, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM); +#else +typedef FARPROC WNDENUMPROC; +#endif + +BOOL WINAPI EnumWindows(WNDENUMPROC, LPARAM); +BOOL WINAPI EnumChildWindows(HWND, WNDENUMPROC, LPARAM); +BOOL WINAPI EnumTaskWindows(HTASK, WNDENUMPROC, LPARAM); + +HWND WINAPI GetTopWindow(HWND); + +HWND WINAPI GetWindow(HWND, UINT); +HWND WINAPI GetNextWindow(HWND, UINT); + +/* GetWindow() constants */ +#define GW_HWNDFIRST 0 +#define GW_HWNDLAST 1 +#define GW_HWNDNEXT 2 +#define GW_HWNDPREV 3 +#define GW_OWNER 4 +#define GW_CHILD 5 + + +/****** Window property support *********************************************/ + +BOOL WINAPI SetProp(HWND, LPCSTR, HANDLE); +HANDLE WINAPI GetProp(HWND, LPCSTR); +HANDLE WINAPI RemoveProp(HWND, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE); +#else +typedef FARPROC PROPENUMPROC; +#endif + +int WINAPI EnumProps(HWND, PROPENUMPROC); + +/****** Window drawing support **********************************************/ + +HDC WINAPI GetDC(HWND); +int WINAPI ReleaseDC(HWND, HDC); + +HDC WINAPI GetWindowDC(HWND); + +#if (WINVER >= 0x030a) +HDC WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags); + +#define DCX_WINDOW 0x00000001L +#define DCX_CACHE 0x00000002L +#define DCX_CLIPCHILDREN 0x00000008L +#define DCX_CLIPSIBLINGS 0x00000010L +#define DCX_PARENTCLIP 0x00000020L + +#define DCX_EXCLUDERGN 0x00000040L +#define DCX_INTERSECTRGN 0x00000080L + + +#define DCX_LOCKWINDOWUPDATE 0x00000400L + + +#define DCX_USESTYLE 0x00010000L + +#endif /* WINVER >= 0x030a */ + +/****** Window repainting ***************************************************/ + +#define WM_PAINT 0x000F +#define WM_ERASEBKGND 0x0014 +#define WM_ICONERASEBKGND 0x0027 + +/* BeginPaint() return structure */ +typedef struct tagPAINTSTRUCT +{ + HDC hdc; + BOOL fErase; + RECT rcPaint; + BOOL fRestore; + BOOL fIncUpdate; + BYTE rgbReserved[16]; +} PAINTSTRUCT; +typedef PAINTSTRUCT* PPAINTSTRUCT; +typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT; +typedef PAINTSTRUCT FAR* LPPAINTSTRUCT; + +HDC WINAPI BeginPaint(HWND, PAINTSTRUCT FAR*); +void WINAPI EndPaint(HWND, const PAINTSTRUCT FAR*); + +void WINAPI UpdateWindow(HWND); + +int WINAPI ExcludeUpdateRgn(HDC, HWND); + +#if (WINVER >= 0x030a) +BOOL WINAPI LockWindowUpdate(HWND hwndLock); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetUpdateRect(HWND, RECT FAR*, BOOL); +int WINAPI GetUpdateRgn(HWND, HRGN, BOOL); + +void WINAPI InvalidateRect(HWND, const RECT FAR*, BOOL); +void WINAPI ValidateRect(HWND, const RECT FAR*); + +void WINAPI InvalidateRgn(HWND, HRGN, BOOL); +void WINAPI ValidateRgn(HWND, HRGN); + +#if (WINVER >= 0x030a) +BOOL WINAPI RedrawWindow(HWND hwnd, const RECT FAR* lprcUpdate, HRGN hrgnUpdate, UINT flags); + +#define RDW_INVALIDATE 0x0001 +#define RDW_INTERNALPAINT 0x0002 +#define RDW_ERASE 0x0004 + +#define RDW_VALIDATE 0x0008 +#define RDW_NOINTERNALPAINT 0x0010 +#define RDW_NOERASE 0x0020 + +#define RDW_NOCHILDREN 0x0040 +#define RDW_ALLCHILDREN 0x0080 + +#define RDW_UPDATENOW 0x0100 +#define RDW_ERASENOW 0x0200 + +#define RDW_FRAME 0x0400 +#define RDW_NOFRAME 0x0800 + +#endif /* WINVER >= 0x030a */ + +/****** Window scrolling ****************************************************/ + +void WINAPI ScrollWindow(HWND, int, int, const RECT FAR*, const RECT FAR*); +BOOL WINAPI ScrollDC(HDC, int, int, const RECT FAR*, const RECT FAR*, HRGN, RECT FAR*); + +#if (WINVER >= 0x030a) + +int WINAPI ScrollWindowEx(HWND hwnd, int dx, int dy, + const RECT FAR* prcScroll, const RECT FAR* prcClip, + HRGN hrgnUpdate, RECT FAR* prcUpdate, UINT flags); + +#define SW_SCROLLCHILDREN 0x0001 +#define SW_INVALIDATE 0x0002 +#define SW_ERASE 0x0004 + + +#endif /* WINVER >= 0x030a */ + +/****** Non-client window area management ************************************/ + +#define WM_NCPAINT 0x0085 + +#define WM_NCCALCSIZE 0x0083 + +#if (WINVER >= 0x030a) +/* WM_NCCALCSIZE return flags */ +#define WVR_ALIGNTOP 0x0010 +#define WVR_ALIGNLEFT 0x0020 +#define WVR_ALIGNBOTTOM 0x0040 +#define WVR_ALIGNRIGHT 0x0080 +#define WVR_HREDRAW 0x0100 +#define WVR_VREDRAW 0x0200 +#define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW) +#define WVR_VALIDRECTS 0x0400 + + +/* WM_NCCALCSIZE parameter structure */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[3]; + WINDOWPOS FAR* lppos; +} NCCALCSIZE_PARAMS; +#else /* WINVER >= 0x030a */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[2]; +} NCCALCSIZE_PARAMS; +#endif /* WINVER >= 0x030a */ +typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS; + +#define WM_NCHITTEST 0x0084 + +/* WM_NCHITTEST return codes */ +#define HTERROR (-2) +#define HTTRANSPARENT (-1) +#define HTNOWHERE 0 +#define HTCLIENT 1 +#define HTCAPTION 2 +#define HTSYSMENU 3 +#define HTSIZE 4 +#define HTMENU 5 +#define HTHSCROLL 6 +#define HTVSCROLL 7 +#define HTMINBUTTON 8 +#define HTMAXBUTTON 9 +#define HTLEFT 10 +#define HTRIGHT 11 +#define HTTOP 12 +#define HTTOPLEFT 13 +#define HTTOPRIGHT 14 +#define HTBOTTOM 15 +#define HTBOTTOMLEFT 16 +#define HTBOTTOMRIGHT 17 +#define HTBORDER 18 +#define HTGROWBOX HTSIZE +#define HTREDUCE HTMINBUTTON +#define HTZOOM HTMAXBUTTON + +/****** Drag-and-drop support ***********************************************/ + +#define WM_QUERYDRAGICON 0x0037 +#define WM_DROPFILES 0x0233 + +/****** Window activation ***************************************************/ + +HWND WINAPI SetActiveWindow(HWND); +HWND WINAPI GetActiveWindow(void); + +HWND WINAPI GetLastActivePopup(HWND); + +/* WM_ACTIVATE state values */ +#define WA_INACTIVE 0 +#define WA_ACTIVE 1 +#define WA_CLICKACTIVE 2 + +#define WM_ACTIVATE 0x0006 +#define WM_ACTIVATEAPP 0x001C +#define WM_NCACTIVATE 0x0086 + +/****** Keyboard input support **********************************************/ + +HWND WINAPI SetFocus(HWND); +HWND WINAPI GetFocus(void); + +int WINAPI GetKeyState(int); +int WINAPI GetAsyncKeyState(int); + +void WINAPI GetKeyboardState(BYTE FAR* ); +void WINAPI SetKeyboardState(BYTE FAR* ); + +#define WM_SETFOCUS 0x0007 +#define WM_KILLFOCUS 0x0008 + +#define WM_KEYDOWN 0x0100 +#define WM_KEYUP 0x0101 + +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 + +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 + +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 + + +/* Keyboard message range */ +#define WM_KEYFIRST 0x0100 +#define WM_KEYLAST 0x0108 + +/* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */ +#define KF_EXTENDED 0x0100 +#define KF_DLGMODE 0x0800 +#define KF_MENUMODE 0x1000 +#define KF_ALTDOWN 0x2000 +#define KF_REPEAT 0x4000 +#define KF_UP 0x8000 + +/* Virtual key codes */ +#ifndef NOVIRTUALKEYCODES +#define VK_LBUTTON 0x01 +#define VK_RBUTTON 0x02 +#define VK_CANCEL 0x03 +#define VK_MBUTTON 0x04 +#define VK_BACK 0x08 +#define VK_TAB 0x09 +#define VK_CLEAR 0x0C +#define VK_RETURN 0x0D +#define VK_SHIFT 0x10 +#define VK_CONTROL 0x11 +#define VK_MENU 0x12 +#define VK_PAUSE 0x13 +#define VK_CAPITAL 0x14 +#define VK_ESCAPE 0x1B +#define VK_SPACE 0x20 +#define VK_PRIOR 0x21 +#define VK_NEXT 0x22 +#define VK_END 0x23 +#define VK_HOME 0x24 +#define VK_LEFT 0x25 +#define VK_UP 0x26 +#define VK_RIGHT 0x27 +#define VK_DOWN 0x28 +#define VK_SELECT 0x29 +#define VK_PRINT 0x2A +#define VK_EXECUTE 0x2B +#define VK_SNAPSHOT 0x2C +#define VK_INSERT 0x2D +#define VK_DELETE 0x2E +#define VK_HELP 0x2F +#define VK_NUMPAD0 0x60 +#define VK_NUMPAD1 0x61 +#define VK_NUMPAD2 0x62 +#define VK_NUMPAD3 0x63 +#define VK_NUMPAD4 0x64 +#define VK_NUMPAD5 0x65 +#define VK_NUMPAD6 0x66 +#define VK_NUMPAD7 0x67 +#define VK_NUMPAD8 0x68 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define VK_ADD 0x6B +#define VK_SEPARATOR 0x6C +#define VK_SUBTRACT 0x6D +#define VK_DECIMAL 0x6E +#define VK_DIVIDE 0x6F +#define VK_F1 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define VK_F12 0x7B +#define VK_F13 0x7C +#define VK_F14 0x7D +#define VK_F15 0x7E +#define VK_F16 0x7F +#define VK_F17 0x80 +#define VK_F18 0x81 +#define VK_F19 0x82 +#define VK_F20 0x83 +#define VK_F21 0x84 +#define VK_F22 0x85 +#define VK_F23 0x86 +#define VK_F24 0x87 +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 + +/* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */ +/* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' */ + +#endif /* NOVIRTUALKEYCODES */ + + +/* SetWindowsHook() keyboard hook */ +#define WH_KEYBOARD 2 + +/****** Mouse input support *************************************************/ + +HWND WINAPI SetCapture(HWND); +void WINAPI ReleaseCapture(void); +HWND WINAPI GetCapture(void); + +BOOL WINAPI SwapMouseButton(BOOL); + +/* Mouse input messages */ +#define WM_MOUSEMOVE 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 + +/* Mouse input message range */ +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSELAST 0x0209 + +/* Mouse message wParam key states */ +#ifndef NOKEYSTATES +#define MK_LBUTTON 0x0001 +#define MK_RBUTTON 0x0002 +#define MK_SHIFT 0x0004 +#define MK_CONTROL 0x0008 +#define MK_MBUTTON 0x0010 +#endif /* NOKEYSTATES */ + +/* Non-client mouse messages */ +#define WM_NCMOUSEMOVE 0x00A0 +#define WM_NCLBUTTONDOWN 0x00A1 +#define WM_NCLBUTTONUP 0x00A2 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define WM_NCRBUTTONDOWN 0x00A4 +#define WM_NCRBUTTONUP 0x00A5 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define WM_NCMBUTTONDOWN 0x00A7 +#define WM_NCMBUTTONUP 0x00A8 +#define WM_NCMBUTTONDBLCLK 0x00A9 + +/* Mouse click activation support */ +#define WM_MOUSEACTIVATE 0x0021 + +/* WM_MOUSEACTIVATE return codes */ +#define MA_ACTIVATE 1 +#define MA_ACTIVATEANDEAT 2 +#define MA_NOACTIVATE 3 +#if (WINVER >= 0x030a) +#define MA_NOACTIVATEANDEAT 4 +#endif /* WINVER >= 0x030a */ + +/* SetWindowsHook() mouse hook */ +#ifndef NOWH +#define WH_MOUSE 7 + +typedef struct tagMOUSEHOOKSTRUCT +{ + POINT pt; + HWND hwnd; + UINT wHitTestCode; + DWORD dwExtraInfo; +} MOUSEHOOKSTRUCT; +typedef MOUSEHOOKSTRUCT FAR* LPMOUSEHOOKSTRUCT; +#endif /* NOWH */ + +/****** Mode control ********************************************************/ + +#define WM_CANCELMODE 0x001F + +/****** System modal window support *****************************************/ + +HWND WINAPI GetSysModalWindow(void); +HWND WINAPI SetSysModalWindow(HWND); + +/****** Timer support *******************************************************/ + +#ifdef STRICT +typedef void (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD); +#else +typedef FARPROC TIMERPROC; +#endif + +UINT WINAPI SetTimer(HWND, UINT, UINT, TIMERPROC); + +BOOL WINAPI KillTimer(HWND, UINT); + +#define WM_TIMER 0x0113 + +/****** Accelerator support *************************************************/ + +DECLARE_HANDLE(HACCEL); + +HACCEL WINAPI LoadAccelerators(HINSTANCE, LPCSTR); + +#ifndef NOMSG +int WINAPI TranslateAccelerator(HWND, HACCEL, MSG FAR*); +#endif + +/****** Menu support ********************************************************/ + +#ifndef NOMENUS + +/* Menu template header */ +typedef struct +{ + UINT versionNumber; + UINT offset; +} MENUITEMTEMPLATEHEADER; + +/* Menu template item struct */ +typedef struct +{ + UINT mtOption; + UINT mtID; + char mtString[1]; +} MENUITEMTEMPLATE; + +#if (WINVER >= 0x030a) +BOOL WINAPI IsMenu(HMENU); +#endif /* WINVER >= 0x030a */ + +HMENU WINAPI CreateMenu(void); +HMENU WINAPI CreatePopupMenu(void); +HMENU WINAPI LoadMenu(HINSTANCE, LPCSTR); +HMENU WINAPI LoadMenuIndirect(const void FAR*); + +BOOL WINAPI DestroyMenu(HMENU); + +HMENU WINAPI GetMenu(HWND); +BOOL WINAPI SetMenu(HWND, HMENU); + +HMENU WINAPI GetSystemMenu(HWND, BOOL); + +void WINAPI DrawMenuBar(HWND); + +BOOL WINAPI HiliteMenuItem(HWND, HMENU, UINT, UINT); + +BOOL WINAPI InsertMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI AppendMenu(HMENU, UINT, UINT, LPCSTR); +BOOL WINAPI ModifyMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI RemoveMenu(HMENU, UINT, UINT); +BOOL WINAPI DeleteMenu(HMENU, UINT, UINT); + +BOOL WINAPI ChangeMenu(HMENU, UINT, LPCSTR, UINT, UINT); + +#define MF_INSERT 0x0000 +#define MF_CHANGE 0x0080 +#define MF_APPEND 0x0100 +#define MF_DELETE 0x0200 +#define MF_REMOVE 0x1000 + +/* Menu flags for Add/Check/EnableMenuItem() */ +#define MF_BYCOMMAND 0x0000 +#define MF_BYPOSITION 0x0400 + +#define MF_SEPARATOR 0x0800 + +#define MF_ENABLED 0x0000 +#define MF_GRAYED 0x0001 +#define MF_DISABLED 0x0002 + +#define MF_UNCHECKED 0x0000 +#define MF_CHECKED 0x0008 +#define MF_USECHECKBITMAPS 0x0200 + +#define MF_STRING 0x0000 +#define MF_BITMAP 0x0004 +#define MF_OWNERDRAW 0x0100 + +#define MF_POPUP 0x0010 +#define MF_MENUBARBREAK 0x0020 +#define MF_MENUBREAK 0x0040 + +#define MF_UNHILITE 0x0000 +#define MF_HILITE 0x0080 + +#define MF_SYSMENU 0x2000 +#define MF_HELP 0x4000 +#define MF_MOUSESELECT 0x8000 + + +#define MF_END 0x0080 /* Only valid in menu resource templates */ + +BOOL WINAPI EnableMenuItem(HMENU, UINT, UINT); +BOOL WINAPI CheckMenuItem(HMENU, UINT, UINT); + +HMENU WINAPI GetSubMenu(HMENU, int); + +int WINAPI GetMenuItemCount(HMENU); +UINT WINAPI GetMenuItemID(HMENU, int); + +int WINAPI GetMenuString(HMENU, UINT, LPSTR, int, UINT); +UINT WINAPI GetMenuState(HMENU, UINT, UINT); + +BOOL WINAPI SetMenuItemBitmaps(HMENU, UINT, UINT, HBITMAP, HBITMAP); +DWORD WINAPI GetMenuCheckMarkDimensions(void); + +BOOL WINAPI TrackPopupMenu(HMENU, UINT, int, int, int, HWND, const RECT FAR*); + +/* Flags for TrackPopupMenu */ +#define TPM_LEFTBUTTON 0x0000 +#if (WINVER >= 0x030a) +#define TPM_RIGHTBUTTON 0x0002 +#define TPM_LEFTALIGN 0x0000 +#define TPM_CENTERALIGN 0x0004 +#define TPM_RIGHTALIGN 0x0008 +#endif /* WINVER >= 0x030a */ + +#endif /* NOMENUS */ + +/* Menu messages */ +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 + +#ifndef NOMENUS + +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 + +#endif /* NOMENUS */ + +/* Menu and control command messages */ +#define WM_COMMAND 0x0111 + +/****** Scroll bar support **************************************************/ + +#ifndef NOSCROLL + +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 + +/* WM_H/VSCROLL commands */ +#define SB_LINEUP 0 +#define SB_LINELEFT 0 +#define SB_LINEDOWN 1 +#define SB_LINERIGHT 1 +#define SB_PAGEUP 2 +#define SB_PAGELEFT 2 +#define SB_PAGEDOWN 3 +#define SB_PAGERIGHT 3 +#define SB_THUMBPOSITION 4 +#define SB_THUMBTRACK 5 +#define SB_TOP 6 +#define SB_LEFT 6 +#define SB_BOTTOM 7 +#define SB_RIGHT 7 +#define SB_ENDSCROLL 8 + +/* Scroll bar selection constants */ +#define SB_HORZ 0 +#define SB_VERT 1 +#define SB_CTL 2 +#define SB_BOTH 3 + +int WINAPI SetScrollPos(HWND, int, int, BOOL); +int WINAPI GetScrollPos(HWND, int); +void WINAPI SetScrollRange(HWND, int, int, int, BOOL); +void WINAPI GetScrollRange(HWND, int, int FAR*, int FAR*); +void WINAPI ShowScrollBar(HWND, int, BOOL); +BOOL WINAPI EnableScrollBar(HWND, int, UINT); + +/* EnableScrollBar() flags */ +#define ESB_ENABLE_BOTH 0x0000 +#define ESB_DISABLE_BOTH 0x0003 + +#define ESB_DISABLE_LEFT 0x0001 +#define ESB_DISABLE_RIGHT 0x0002 + +#define ESB_DISABLE_UP 0x0001 +#define ESB_DISABLE_DOWN 0x0002 + +#define ESB_DISABLE_LTUP ESB_DISABLE_LEFT +#define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT + +#endif /* NOSCROLL */ + +/******* Clipboard manager **************************************************/ + +#ifndef NOCLIPBOARD + +/* Predefined Clipboard Formats */ +#define CF_TEXT 1 +#define CF_BITMAP 2 +#define CF_METAFILEPICT 3 +#define CF_SYLK 4 +#define CF_DIF 5 +#define CF_TIFF 6 +#define CF_OEMTEXT 7 +#define CF_DIB 8 +#define CF_PALETTE 9 +#define CF_PENDATA 10 +#define CF_RIFF 11 +#define CF_WAVE 12 + +#define CF_OWNERDISPLAY 0x0080 +#define CF_DSPTEXT 0x0081 +#define CF_DSPBITMAP 0x0082 +#define CF_DSPMETAFILEPICT 0x0083 + +/* "Private" formats don't get GlobalFree()'d */ +#define CF_PRIVATEFIRST 0x0200 +#define CF_PRIVATELAST 0x02FF + +/* "GDIOBJ" formats do get DeleteObject()'d */ +#define CF_GDIOBJFIRST 0x0300 +#define CF_GDIOBJLAST 0x03FF + +/* Clipboard Manager Functions */ +BOOL WINAPI OpenClipboard(HWND); +BOOL WINAPI CloseClipboard(void); +BOOL WINAPI EmptyClipboard(void); + +#if (WINVER >= 0x030a) +HWND WINAPI GetOpenClipboardWindow(void); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI GetClipboardOwner(void); + +HWND WINAPI SetClipboardViewer(HWND); +HWND WINAPI GetClipboardViewer(void); + +HANDLE WINAPI SetClipboardData(UINT, HANDLE); +HANDLE WINAPI GetClipboardData(UINT); + +BOOL WINAPI IsClipboardFormatAvailable(UINT); +int WINAPI GetPriorityClipboardFormat(UINT FAR*, int); + +UINT WINAPI RegisterClipboardFormat(LPCSTR); +int WINAPI CountClipboardFormats(void); +UINT WINAPI EnumClipboardFormats(UINT); +int WINAPI GetClipboardFormatName(UINT, LPSTR, int); + +BOOL WINAPI ChangeClipboardChain(HWND, HWND); + +/* Clipboard command messages */ +#define WM_CUT 0x0300 +#define WM_COPY 0x0301 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 + +/* Clipboard owner messages */ +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 + +/* Clipboard viewer messages */ +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_SIZECLIPBOARD 0x030B +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D + +#endif /* NOCLIPBOARD */ + +/****** Mouse cursor support *************************************************/ + +HCURSOR WINAPI LoadCursor(HINSTANCE, LPCSTR); +HCURSOR WINAPI CreateCursor(HINSTANCE, int, int, int, int, const void FAR*, const void FAR*); +BOOL WINAPI DestroyCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI CopyCursor(HINSTANCE, HCURSOR); +#endif /* WINVER >= 0x030a */ + +int WINAPI ShowCursor(BOOL); + +void WINAPI SetCursorPos(int, int); +void WINAPI GetCursorPos(POINT FAR*); + +HCURSOR WINAPI SetCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI GetCursor(void); +#endif /* WINVER >= 0x030a */ + +void WINAPI ClipCursor(const RECT FAR*); +#if (WINVER >= 0x030a) +void WINAPI GetClipCursor(RECT FAR*); +#endif /* WINVER >= 0x030a */ + +/* Standard cursor resource IDs */ +#define IDC_ARROW MAKEINTRESOURCE(32512) +#define IDC_IBEAM MAKEINTRESOURCE(32513) +#define IDC_WAIT MAKEINTRESOURCE(32514) +#define IDC_CROSS MAKEINTRESOURCE(32515) +#define IDC_UPARROW MAKEINTRESOURCE(32516) +#define IDC_SIZE MAKEINTRESOURCE(32640) +#define IDC_ICON MAKEINTRESOURCE(32641) +#define IDC_SIZENWSE MAKEINTRESOURCE(32642) +#define IDC_SIZENESW MAKEINTRESOURCE(32643) +#define IDC_SIZEWE MAKEINTRESOURCE(32644) +#define IDC_SIZENS MAKEINTRESOURCE(32645) + +#define WM_SETCURSOR 0x0020 + +/****** Icon support *********************************************************/ + +HICON WINAPI LoadIcon(HINSTANCE, LPCSTR); +HICON WINAPI CreateIcon(HINSTANCE, int, int, BYTE, BYTE, const void FAR*, const void FAR*); +BOOL WINAPI DestroyIcon(HICON); + +#if (WINVER >= 0x030a) +HICON WINAPI CopyIcon(HINSTANCE, HICON); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DrawIcon(HDC, int, int, HICON); + +#ifndef NOICONS + +/* Standard icon resource IDs */ +#define IDI_APPLICATION MAKEINTRESOURCE(32512) +#define IDI_HAND MAKEINTRESOURCE(32513) +#define IDI_QUESTION MAKEINTRESOURCE(32514) +#define IDI_EXCLAMATION MAKEINTRESOURCE(32515) +#define IDI_ASTERISK MAKEINTRESOURCE(32516) + +#endif /* NOICONS */ + +/****** Message Box support *************************************************/ + +#ifndef NOMB + +int WINAPI MessageBox(HWND, LPCSTR, LPCSTR, UINT); +void WINAPI MessageBeep(UINT); + +#define MB_OK 0x0000 +#define MB_OKCANCEL 0x0001 +#define MB_ABORTRETRYIGNORE 0x0002 +#define MB_YESNOCANCEL 0x0003 +#define MB_YESNO 0x0004 +#define MB_RETRYCANCEL 0x0005 +#define MB_TYPEMASK 0x000F + +#define MB_ICONHAND 0x0010 +#define MB_ICONQUESTION 0x0020 +#define MB_ICONEXCLAMATION 0x0030 +#define MB_ICONASTERISK 0x0040 +#define MB_ICONMASK 0x00F0 + +#define MB_ICONINFORMATION MB_ICONASTERISK +#define MB_ICONSTOP MB_ICONHAND + +#define MB_DEFBUTTON1 0x0000 +#define MB_DEFBUTTON2 0x0100 +#define MB_DEFBUTTON3 0x0200 +#define MB_DEFMASK 0x0F00 + +#define MB_APPLMODAL 0x0000 +#define MB_SYSTEMMODAL 0x1000 +#define MB_TASKMODAL 0x2000 + +#define MB_NOFOCUS 0x8000 + + + +#endif /* NOMB */ + +/****** Caret support ********************************************************/ + +void WINAPI CreateCaret(HWND, HBITMAP, int, int); +void WINAPI DestroyCaret(void); + +void WINAPI SetCaretPos(int, int); +void WINAPI GetCaretPos(POINT FAR*); + +void WINAPI HideCaret(HWND); +void WINAPI ShowCaret(HWND); + +UINT WINAPI GetCaretBlinkTime(void); +void WINAPI SetCaretBlinkTime(UINT); + +/****** WM_SYSCOMMAND support ***********************************************/ + +#define WM_SYSCOMMAND 0x0112 + +#ifndef NOSYSCOMMANDS + +/* System Menu Command Values */ +#define SC_SIZE 0xF000 +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 + +/* Obsolete names */ +#define SC_ICON SC_MINIMIZE +#define SC_ZOOM SC_MAXIMIZE + + +#endif /* NOSYSCOMMANDS */ + +/****** MDI Support *********************************************************/ + +#ifndef NOMDI + +/* CreateWindow lpParams structure for creating MDI client */ +typedef struct tagCLIENTCREATESTRUCT +{ + HMENU hWindowMenu; + UINT idFirstChild; +} CLIENTCREATESTRUCT; +typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT; + +/* MDI client style bits */ +#if (WINVER >= 0x030a) +#define MDIS_ALLCHILDSTYLES 0x0001 +#endif /* WINVER >= 0x030a */ + +/* MDI messages */ +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 + +/* WM_MDICREATE message structure */ +typedef struct tagMDICREATESTRUCT +{ + LPCSTR szClass; + LPCSTR szTitle; + HINSTANCE hOwner; + int x; + int y; + int cx; + int cy; + DWORD style; + LPARAM lParam; +} MDICREATESTRUCT; +typedef MDICREATESTRUCT FAR* LPMDICREATESTRUCT; + +#if (WINVER >= 0x030a) +/* wParam values for WM_MDITILE and WM_MDICASCADE messages. */ +#define MDITILE_VERTICAL 0x0000 +#define MDITILE_HORIZONTAL 0x0001 +#define MDITILE_SKIPDISABLED 0x0002 +#endif /* WINVER >= 0x030a */ + +#define WM_CHILDACTIVATE 0x0022 + +LRESULT WINAPI DefFrameProc(HWND, HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI DefMDIChildProc(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG +BOOL WINAPI TranslateMDISysAccel(HWND, MSG FAR*); +#endif + +UINT WINAPI ArrangeIconicWindows(HWND); + +#endif /* NOMDI */ + +/****** Dialog and Control Management ***************************************/ + +#ifndef NOCTLMGR + +/* Dialog window class */ +#define WC_DIALOG (MAKEINTATOM(0x8002)) + +/* cbWndExtra bytes needed by dialog manager for dialog classes */ +#define DLGWINDOWEXTRA 30 + +/* Dialog styles */ +#define DS_ABSALIGN 0x01L +#define DS_SYSMODAL 0x02L +#define DS_LOCALEDIT 0x20L +#define DS_SETFONT 0x40L +#define DS_MODALFRAME 0x80L +#define DS_NOIDLEMSG 0x100L + +/* Dialog messages */ +#define DM_GETDEFID (WM_USER+0) +#define DM_SETDEFID (WM_USER+1) + +/* Returned in HIWORD() of DM_GETDEFID result if msg is supported */ +#define DC_HASDEFID 0x534B + +#endif /* NOCTLMGR */ + +/* Dialog notification messages */ +#define WM_INITDIALOG 0x0110 +#define WM_NEXTDLGCTL 0x0028 + +#define WM_PARENTNOTIFY 0x0210 + +#define WM_ENTERIDLE 0x0121 + + +#ifndef NOCTLMGR + +#ifdef STRICT +typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM); +#else +typedef FARPROC DLGPROC; +#endif + +/* Get/SetWindowWord/Long offsets for use with WC_DIALOG windows */ +#define DWL_MSGRESULT 0 +#define DWL_DLGPROC 4 +#define DWL_USER 8 + +#ifndef NOMSG +BOOL WINAPI IsDialogMessage(HWND, MSG FAR*); +#endif + +LRESULT WINAPI DefDlgProc(HWND, UINT, WPARAM, LPARAM); + +HWND WINAPI CreateDialog(HINSTANCE, LPCSTR, HWND, DLGPROC); +HWND WINAPI CreateDialogIndirect(HINSTANCE, const void FAR*, HWND, DLGPROC); +HWND WINAPI CreateDialogParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +HWND WINAPI CreateDialogIndirectParam(HINSTANCE, const void FAR*, HWND, DLGPROC, LPARAM); + +int WINAPI DialogBox(HINSTANCE, LPCSTR, HWND, DLGPROC); +int WINAPI DialogBoxIndirect(HINSTANCE, HGLOBAL, HWND, DLGPROC); +int WINAPI DialogBoxParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +int WINAPI DialogBoxIndirectParam(HINSTANCE, HGLOBAL, HWND, DLGPROC, LPARAM); + +void WINAPI EndDialog(HWND, int); + +int WINAPI GetDlgCtrlID(HWND); +HWND WINAPI GetDlgItem(HWND, int); +LRESULT WINAPI SendDlgItemMessage(HWND, int, UINT, WPARAM, LPARAM); + +void WINAPI SetDlgItemInt(HWND, int, UINT, BOOL); +UINT WINAPI GetDlgItemInt(HWND, int, BOOL FAR* , BOOL); + +void WINAPI SetDlgItemText(HWND, int, LPCSTR); +int WINAPI GetDlgItemText(HWND, int, LPSTR, int); + +void WINAPI CheckDlgButton(HWND, int, UINT); +void WINAPI CheckRadioButton(HWND, int, int, int); +UINT WINAPI IsDlgButtonChecked(HWND, int); + +HWND WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL); +HWND WINAPI GetNextDlgTabItem(HWND, HWND, BOOL); + +void WINAPI MapDialogRect(HWND, RECT FAR*); +DWORD WINAPI GetDialogBaseUnits(void); + +#define WM_GETDLGCODE 0x0087 + +/* dialog codes */ +#define DLGC_WANTARROWS 0x0001 +#define DLGC_WANTTAB 0x0002 +#define DLGC_WANTALLKEYS 0x0004 +#define DLGC_WANTMESSAGE 0x0004 +#define DLGC_HASSETSEL 0x0008 +#define DLGC_DEFPUSHBUTTON 0x0010 +#define DLGC_UNDEFPUSHBUTTON 0x0020 +#define DLGC_RADIOBUTTON 0x0040 +#define DLGC_WANTCHARS 0x0080 +#define DLGC_STATIC 0x0100 +#define DLGC_BUTTON 0x2000 + +#define WM_CTLCOLOR 0x0019 + +/* WM_CTLCOLOR control IDs */ +#define CTLCOLOR_MSGBOX 0 +#define CTLCOLOR_EDIT 1 +#define CTLCOLOR_LISTBOX 2 +#define CTLCOLOR_BTN 3 +#define CTLCOLOR_DLG 4 +#define CTLCOLOR_SCROLLBAR 5 +#define CTLCOLOR_STATIC 6 + +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 + +#endif /* NOCTLMGR */ + +/* Standard dialog button IDs */ +#define IDOK 1 +#define IDCANCEL 2 +#define IDABORT 3 +#define IDRETRY 4 +#define IDIGNORE 5 +#define IDYES 6 +#define IDNO 7 + +/****** Owner draw control support ******************************************/ + +/* Owner draw control types */ +#define ODT_MENU 1 +#define ODT_LISTBOX 2 +#define ODT_COMBOBOX 3 +#define ODT_BUTTON 4 + +/* Owner draw actions */ +#define ODA_DRAWENTIRE 0x0001 +#define ODA_SELECT 0x0002 +#define ODA_FOCUS 0x0004 + +/* Owner draw state */ +#define ODS_SELECTED 0x0001 +#define ODS_GRAYED 0x0002 +#define ODS_DISABLED 0x0004 +#define ODS_CHECKED 0x0008 +#define ODS_FOCUS 0x0010 + +#define WM_DRAWITEM 0x002B + +typedef struct tagDRAWITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemAction; + UINT itemState; + HWND hwndItem; + HDC hDC; + RECT rcItem; + DWORD itemData; +} DRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT; + +#define WM_MEASUREITEM 0x002C + +typedef struct tagMEASUREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemWidth; + UINT itemHeight; + DWORD itemData; +} MEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT; + +#define WM_DELETEITEM 0x002D + +typedef struct tagDELETEITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + HWND hwndItem; + DWORD itemData; +} DELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT; + +#define WM_COMPAREITEM 0x0039 + +typedef struct tagCOMPAREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + HWND hwndItem; + UINT itemID1; + DWORD itemData1; + UINT itemID2; + DWORD itemData2; +} COMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT; + +/****** Static control ******************************************************/ + +#ifndef NOCTLMGR + +/* Static Control Styles */ +#define SS_LEFT 0x00000000L +#define SS_CENTER 0x00000001L +#define SS_RIGHT 0x00000002L +#define SS_ICON 0x00000003L +#define SS_BLACKRECT 0x00000004L +#define SS_GRAYRECT 0x00000005L +#define SS_WHITERECT 0x00000006L +#define SS_BLACKFRAME 0x00000007L +#define SS_GRAYFRAME 0x00000008L +#define SS_WHITEFRAME 0x00000009L +#define SS_SIMPLE 0x0000000BL +#define SS_LEFTNOWORDWRAP 0x0000000CL +#define SS_NOPREFIX 0x00000080L + +#if (WINVER >= 0x030a) +#ifndef NOWINMESSAGES +/* Static Control Mesages */ +#define STM_SETICON (WM_USER+0) +#define STM_GETICON (WM_USER+1) +#endif /* NOWINMESSAGES */ +#endif /* WINVER >= 0x030a */ + +#endif /* NOCTLMGR */ + +/****** Button control *****************************************************/ + +#ifndef NOCTLMGR + +/* Button Control Styles */ +#define BS_PUSHBUTTON 0x00000000L +#define BS_DEFPUSHBUTTON 0x00000001L +#define BS_CHECKBOX 0x00000002L +#define BS_AUTOCHECKBOX 0x00000003L +#define BS_RADIOBUTTON 0x00000004L +#define BS_3STATE 0x00000005L +#define BS_AUTO3STATE 0x00000006L +#define BS_GROUPBOX 0x00000007L +#define BS_USERBUTTON 0x00000008L +#define BS_AUTORADIOBUTTON 0x00000009L +#define BS_OWNERDRAW 0x0000000BL +#define BS_LEFTTEXT 0x00000020L + +/* Button Control Messages */ +#define BM_GETCHECK (WM_USER+0) +#define BM_SETCHECK (WM_USER+1) +#define BM_GETSTATE (WM_USER+2) +#define BM_SETSTATE (WM_USER+3) +#define BM_SETSTYLE (WM_USER+4) + +/* User Button Notification Codes */ +#define BN_CLICKED 0 +#define BN_PAINT 1 +#define BN_HILITE 2 +#define BN_UNHILITE 3 +#define BN_DISABLE 4 +#define BN_DOUBLECLICKED 5 + +#endif /* NOCTLMGR */ + +/****** Edit control *******************************************************/ + +#ifndef NOCTLMGR + +/* Edit control styles */ +#ifndef NOWINSTYLES +#define ES_LEFT 0x00000000L +#define ES_CENTER 0x00000001L +#define ES_RIGHT 0x00000002L +#define ES_MULTILINE 0x00000004L +#define ES_UPPERCASE 0x00000008L +#define ES_LOWERCASE 0x00000010L +#define ES_PASSWORD 0x00000020L +#define ES_AUTOVSCROLL 0x00000040L +#define ES_AUTOHSCROLL 0x00000080L +#define ES_NOHIDESEL 0x00000100L +#define ES_OEMCONVERT 0x00000400L +#if (WINVER >= 0x030a) +#define ES_READONLY 0x00000800L +#define ES_WANTRETURN 0x00001000L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Edit control messages */ +#ifndef NOWINMESSAGES +#define EM_GETSEL (WM_USER+0) +#define EM_SETSEL (WM_USER+1) +#define EM_GETRECT (WM_USER+2) +#define EM_SETRECT (WM_USER+3) +#define EM_SETRECTNP (WM_USER+4) +#define EM_LINESCROLL (WM_USER+6) +#define EM_GETMODIFY (WM_USER+8) +#define EM_SETMODIFY (WM_USER+9) +#define EM_GETLINECOUNT (WM_USER+10) +#define EM_LINEINDEX (WM_USER+11) +#define EM_SETHANDLE (WM_USER+12) +#define EM_GETHANDLE (WM_USER+13) +#define EM_LINELENGTH (WM_USER+17) +#define EM_REPLACESEL (WM_USER+18) +#define EM_SETFONT (WM_USER+19) /* NOT IMPLEMENTED: use WM_SETFONT */ +#define EM_GETLINE (WM_USER+20) +#define EM_LIMITTEXT (WM_USER+21) +#define EM_CANUNDO (WM_USER+22) +#define EM_UNDO (WM_USER+23) +#define EM_FMTLINES (WM_USER+24) +#define EM_LINEFROMCHAR (WM_USER+25) +#define EM_SETWORDBREAK (WM_USER+26) /* NOT IMPLEMENTED: use EM_SETWORDBREAK */ +#define EM_SETTABSTOPS (WM_USER+27) +#define EM_SETPASSWORDCHAR (WM_USER+28) +#define EM_EMPTYUNDOBUFFER (WM_USER+29) +#if (WINVER >= 0x030a) +#define EM_GETFIRSTVISIBLELINE (WM_USER+30) +#define EM_SETREADONLY (WM_USER+31) +#define EM_SETWORDBREAKPROC (WM_USER+32) +#define EM_GETWORDBREAKPROC (WM_USER+33) +#define EM_GETPASSWORDCHAR (WM_USER+34) +#endif /* WINVER >= 0x030a */ +#endif /* NOWINMESSAGES */ + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code); + +/* EDITWORDBREAKPROC code values */ +#define WB_LEFT 0 +#define WB_RIGHT 1 +#define WB_ISDELIMITER 2 +#endif /* WINVER >= 0x030a */ + +/* Edit control notification codes */ +#define EN_SETFOCUS 0x0100 +#define EN_KILLFOCUS 0x0200 +#define EN_CHANGE 0x0300 +#define EN_UPDATE 0x0400 +#define EN_ERRSPACE 0x0500 +#define EN_MAXTEXT 0x0501 +#define EN_HSCROLL 0x0601 +#define EN_VSCROLL 0x0602 + +#endif /* NOCTLMGR */ + +/****** Scroll bar control *************************************************/ +/* Also see scrolling support */ + +#ifndef NOCTLMGR + +#ifndef NOWINSTYLES + +/* Scroll bar styles */ +#define SBS_HORZ 0x0000L +#define SBS_VERT 0x0001L +#define SBS_TOPALIGN 0x0002L +#define SBS_LEFTALIGN 0x0002L +#define SBS_BOTTOMALIGN 0x0004L +#define SBS_RIGHTALIGN 0x0004L +#define SBS_SIZEBOXTOPLEFTALIGN 0x0002L +#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L +#define SBS_SIZEBOX 0x0008L + +#endif /* NOWINSTYLES */ + +#endif /* NOCTLMGR */ + +/****** Listbox control ****************************************************/ + +#ifndef NOCTLMGR + +/* Listbox styles */ +#ifndef NOWINSTYLES +#define LBS_NOTIFY 0x0001L +#define LBS_SORT 0x0002L +#define LBS_NOREDRAW 0x0004L +#define LBS_MULTIPLESEL 0x0008L +#define LBS_OWNERDRAWFIXED 0x0010L +#define LBS_OWNERDRAWVARIABLE 0x0020L +#define LBS_HASSTRINGS 0x0040L +#define LBS_USETABSTOPS 0x0080L +#define LBS_NOINTEGRALHEIGHT 0x0100L +#define LBS_MULTICOLUMN 0x0200L +#define LBS_WANTKEYBOARDINPUT 0x0400L +#define LBS_EXTENDEDSEL 0x0800L +#if (WINVER >= 0x030a) +#define LBS_DISABLENOSCROLL 0x1000L +#endif /* WINVER >= 0x030a */ +#define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) +#endif /* NOWINSTYLES */ + +/* Listbox messages */ +#ifndef NOWINMESSAGES +#define LB_ADDSTRING (WM_USER+1) +#define LB_INSERTSTRING (WM_USER+2) +#define LB_DELETESTRING (WM_USER+3) +#define LB_RESETCONTENT (WM_USER+5) +#define LB_SETSEL (WM_USER+6) +#define LB_SETCURSEL (WM_USER+7) +#define LB_GETSEL (WM_USER+8) +#define LB_GETCURSEL (WM_USER+9) +#define LB_GETTEXT (WM_USER+10) +#define LB_GETTEXTLEN (WM_USER+11) +#define LB_GETCOUNT (WM_USER+12) +#define LB_SELECTSTRING (WM_USER+13) +#define LB_DIR (WM_USER+14) +#define LB_GETTOPINDEX (WM_USER+15) +#define LB_FINDSTRING (WM_USER+16) +#define LB_GETSELCOUNT (WM_USER+17) +#define LB_GETSELITEMS (WM_USER+18) +#define LB_SETTABSTOPS (WM_USER+19) +#define LB_GETHORIZONTALEXTENT (WM_USER+20) +#define LB_SETHORIZONTALEXTENT (WM_USER+21) +#define LB_SETCOLUMNWIDTH (WM_USER+22) +#define LB_SETTOPINDEX (WM_USER+24) +#define LB_GETITEMRECT (WM_USER+25) +#define LB_GETITEMDATA (WM_USER+26) +#define LB_SETITEMDATA (WM_USER+27) +#define LB_SELITEMRANGE (WM_USER+28) +#define LB_SETCARETINDEX (WM_USER+31) +#define LB_GETCARETINDEX (WM_USER+32) + +#if (WINVER >= 0x030a) +#define LB_SETITEMHEIGHT (WM_USER+33) +#define LB_GETITEMHEIGHT (WM_USER+34) +#define LB_FINDSTRINGEXACT (WM_USER+35) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Listbox notification codes */ +#define LBN_ERRSPACE (-2) +#define LBN_SELCHANGE 1 +#define LBN_DBLCLK 2 +#define LBN_SELCANCEL 3 +#define LBN_SETFOCUS 4 +#define LBN_KILLFOCUS 5 + +/* Listbox notification messages */ +#define WM_VKEYTOITEM 0x002E +#define WM_CHARTOITEM 0x002F + +/* Listbox message return values */ +#define LB_OKAY 0 +#define LB_ERR (-1) +#define LB_ERRSPACE (-2) + +#define LB_CTLCODE 0L + +/****** Dialog directory support ********************************************/ + +int WINAPI DlgDirList(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelect(HWND, LPSTR, int); + +int WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelectComboBox(HWND, LPSTR, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI DlgDirSelectEx(HWND, LPSTR, int, int); +BOOL WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int); +#endif /* WINVER >= 0x030a */ + + +/* DlgDirList, DlgDirListComboBox flags values */ +#define DDL_READWRITE 0x0000 +#define DDL_READONLY 0x0001 +#define DDL_HIDDEN 0x0002 +#define DDL_SYSTEM 0x0004 +#define DDL_DIRECTORY 0x0010 +#define DDL_ARCHIVE 0x0020 + +#define DDL_POSTMSGS 0x2000 +#define DDL_DRIVES 0x4000 +#define DDL_EXCLUSIVE 0x8000 + +#endif /* NOCTLMGR */ + +/****** Combo box control **************************************************/ + +#ifndef NOCTLMGR + +/* Combo box styles */ +#ifndef NOWINSTYLES +#define CBS_SIMPLE 0x0001L +#define CBS_DROPDOWN 0x0002L +#define CBS_DROPDOWNLIST 0x0003L +#define CBS_OWNERDRAWFIXED 0x0010L +#define CBS_OWNERDRAWVARIABLE 0x0020L +#define CBS_AUTOHSCROLL 0x0040L +#define CBS_OEMCONVERT 0x0080L +#define CBS_SORT 0x0100L +#define CBS_HASSTRINGS 0x0200L +#define CBS_NOINTEGRALHEIGHT 0x0400L +#if (WINVER >= 0x030a) +#define CBS_DISABLENOSCROLL 0x0800L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Combo box messages */ +#ifndef NOWINMESSAGES +#define CB_GETEDITSEL (WM_USER+0) +#define CB_LIMITTEXT (WM_USER+1) +#define CB_SETEDITSEL (WM_USER+2) +#define CB_ADDSTRING (WM_USER+3) +#define CB_DELETESTRING (WM_USER+4) +#define CB_DIR (WM_USER+5) +#define CB_GETCOUNT (WM_USER+6) +#define CB_GETCURSEL (WM_USER+7) +#define CB_GETLBTEXT (WM_USER+8) +#define CB_GETLBTEXTLEN (WM_USER+9) +#define CB_INSERTSTRING (WM_USER+10) +#define CB_RESETCONTENT (WM_USER+11) +#define CB_FINDSTRING (WM_USER+12) +#define CB_SELECTSTRING (WM_USER+13) +#define CB_SETCURSEL (WM_USER+14) +#define CB_SHOWDROPDOWN (WM_USER+15) +#define CB_GETITEMDATA (WM_USER+16) +#define CB_SETITEMDATA (WM_USER+17) +#if (WINVER >= 0x030a) +#define CB_GETDROPPEDCONTROLRECT (WM_USER+18) +#define CB_SETITEMHEIGHT (WM_USER+19) +#define CB_GETITEMHEIGHT (WM_USER+20) +#define CB_SETEXTENDEDUI (WM_USER+21) +#define CB_GETEXTENDEDUI (WM_USER+22) +#define CB_GETDROPPEDSTATE (WM_USER+23) +#define CB_FINDSTRINGEXACT (WM_USER+24) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Combo box notification codes */ +#define CBN_ERRSPACE (-1) +#define CBN_SELCHANGE 1 +#define CBN_DBLCLK 2 +#define CBN_SETFOCUS 3 +#define CBN_KILLFOCUS 4 +#define CBN_EDITCHANGE 5 +#define CBN_EDITUPDATE 6 +#define CBN_DROPDOWN 7 +#if (WINVER >= 0x030a) +#define CBN_CLOSEUP 8 +#define CBN_SELENDOK 9 +#define CBN_SELENDCANCEL 10 +#endif /* WINVER >= 0x030a */ + +/* Combo box message return values */ +#define CB_OKAY 0 +#define CB_ERR (-1) +#define CB_ERRSPACE (-2) + +#endif /* NOCTLMGR */ + +/******* Windows hook support **********************************************/ + +#ifndef NOWH + +DECLARE_HANDLE32(HHOOK); + +#ifdef STRICT +typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam); +#else +typedef FARPROC HOOKPROC; +#endif + +#ifdef STRICT +HHOOK WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*); +#else +HOOKPROC WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HOOKPROC FAR*); +#endif +BOOL WINAPI UnhookWindowsHook(int, HOOKPROC); + +#if (WINVER >= 0x030a) + +HHOOK WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hInstance, HTASK hTask); +BOOL WINAPI UnhookWindowsHookEx(HHOOK hHook); +LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam); + +#endif /* WINVER >= 0x030a */ + + +/* Standard hook code */ +#define HC_ACTION 0 + +/* Obsolete hook codes (NO LONGER SUPPORTED) */ +#define HC_GETLPLPFN (-3) +#define HC_LPLPFNNEXT (-2) +#define HC_LPFNNEXT (-1) + +#endif /* NOWH */ + +/****** Computer-based-training (CBT) support *******************************/ + +#define WM_QUEUESYNC 0x0023 + +#ifndef NOWH + +/* SetWindowsHook() code */ +#define WH_CBT 5 + +#define HCBT_MOVESIZE 0 +#define HCBT_MINMAX 1 +#define HCBT_QS 2 +#define HCBT_CREATEWND 3 +#define HCBT_DESTROYWND 4 +#define HCBT_ACTIVATE 5 +#define HCBT_CLICKSKIPPED 6 +#define HCBT_KEYSKIPPED 7 +#define HCBT_SYSCOMMAND 8 +#define HCBT_SETFOCUS 9 + +#if (WINVER >= 0x030a) +/* HCBT_CREATEWND parameters pointed to by lParam */ +typedef struct tagCBT_CREATEWND +{ + CREATESTRUCT FAR* lpcs; + HWND hwndInsertAfter; +} CBT_CREATEWND; +typedef CBT_CREATEWND FAR* LPCBT_CREATEWND; + +/* HCBT_ACTIVATE structure pointed to by lParam */ +typedef struct tagCBTACTIVATESTRUCT +{ + BOOL fMouse; + HWND hWndActive; +} CBTACTIVATESTRUCT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Hardware hook support ***********************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +#define WH_HARDWARE 8 + +typedef struct tagHARDWAREHOOKSTRUCT +{ + HWND hWnd; + UINT wMessage; + WPARAM wParam; + LPARAM lParam; +} HARDWAREHOOKSTRUCT; +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Shell support *******************************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +/* SetWindowsHook() Shell hook code */ +#define WH_SHELL 10 + +#define HSHELL_WINDOWCREATED 1 +#define HSHELL_WINDOWDESTROYED 2 +#define HSHELL_ACTIVATESHELLWINDOW 3 + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Journalling support *************************************************/ + +#ifndef NOWH +#define WH_JOURNALRECORD 0 +#define WH_JOURNALPLAYBACK 1 + +/* Journalling hook codes */ +#define HC_GETNEXT 1 +#define HC_SKIP 2 +#define HC_NOREMOVE 3 +#define HC_NOREM HC_NOREMOVE +#define HC_SYSMODALON 4 +#define HC_SYSMODALOFF 5 + +/* Journalling message structure */ +typedef struct tagEVENTMSG +{ + UINT message; + UINT paramL; + UINT paramH; + DWORD time; +} EVENTMSG; +typedef EVENTMSG *PEVENTMSG; +typedef EVENTMSG NEAR* NPEVENTMSG; +typedef EVENTMSG FAR* LPEVENTMSG; + +BOOL WINAPI EnableHardwareInput(BOOL); + +#endif /* NOWH */ + + +/****** Debugger support ****************************************************/ + +#if (WINVER >= 0x030a) +/* SetWindowsHook debug hook support */ +#define WH_DEBUG 9 + +typedef struct tagDEBUGHOOKINFO +{ + HMODULE hModuleHook; + LPARAM reserved; + LPARAM lParam; + WPARAM wParam; + int code; +} DEBUGHOOKINFO; +typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO; + +#ifndef NOMSG +BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg); +#endif /* NOMSG */ + +BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock); + +LONG WINAPI GetSystemDebugState(void); +/* Flags returned by GetSystemDebugState. + */ +#define SDS_MENU 0x0001 +#define SDS_SYSMODAL 0x0002 +#define SDS_NOTASKQUEUE 0x0004 +#define SDS_DIALOG 0x0008 +#define SDS_TASKLOCKED 0x0010 +#endif /* WINVER >= 0x030a */ + +/****** Help support ********************************************************/ + +#ifndef NOHELP + +BOOL WINAPI WinHelp(HWND hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData); + +/* WinHelp() commands */ +#define HELP_CONTEXT 0x0001 +#define HELP_QUIT 0x0002 +#define HELP_INDEX 0x0003 +#define HELP_CONTENTS 0x0003 +#define HELP_HELPONHELP 0x0004 +#define HELP_SETINDEX 0x0005 +#define HELP_SETCONTENTS 0x0005 +#define HELP_CONTEXTPOPUP 0x0008 +#define HELP_FORCEFILE 0x0009 +#define HELP_KEY 0x0101 +#define HELP_COMMAND 0x0102 +#define HELP_PARTIALKEY 0x0105 +#define HELP_MULTIKEY 0x0201 +#define HELP_SETWINPOS 0x0203 + +typedef struct tagMULTIKEYHELP +{ + UINT mkSize; + BYTE mkKeylist; + BYTE szKeyphrase[1]; +} MULTIKEYHELP; + + +typedef struct +{ + int wStructSize; + int x; + int y; + int dx; + int dy; + int wMax; + char rgchMember[2]; +} HELPWININFO; +typedef HELPWININFO NEAR* PHELPWININFO; +typedef HELPWININFO FAR* LPHELPWININFO; + +#endif /* NOHELP */ + +/****** Sound support ******************************************************/ + +#ifndef NOSOUND + +int WINAPI OpenSound(void); +void WINAPI CloseSound(void); + +int WINAPI StartSound(void); +int WINAPI StopSound(void); + +int WINAPI SetVoiceQueueSize(int, int); +int WINAPI SetVoiceNote(int, int, int, int); +int WINAPI SetVoiceAccent(int, int, int, int, int); +int WINAPI SetVoiceEnvelope(int, int, int); +int WINAPI SetVoiceSound(int, DWORD, int); + +int WINAPI SetVoiceThreshold(int, int); +int FAR* WINAPI GetThresholdEvent(void); +int WINAPI GetThresholdStatus(void); + +int WINAPI SetSoundNoise(int, int); + +/* SetSoundNoise() Sources */ +#define S_PERIOD512 0 +#define S_PERIOD1024 1 +#define S_PERIOD2048 2 +#define S_PERIODVOICE 3 +#define S_WHITE512 4 +#define S_WHITE1024 5 +#define S_WHITE2048 6 +#define S_WHITEVOICE 7 + +int WINAPI WaitSoundState(int); + +/* WaitSoundState() constants */ +#define S_QUEUEEMPTY 0 +#define S_THRESHOLD 1 +#define S_ALLTHRESHOLD 2 + +int WINAPI SyncAllVoices(void); +int WINAPI CountVoiceNotes(int); + +/* Accent Modes */ +#define S_NORMAL 0 +#define S_LEGATO 1 +#define S_STACCATO 2 + +/* Error return values */ +#define S_SERDVNA (-1) +#define S_SEROFM (-2) +#define S_SERMACT (-3) +#define S_SERQFUL (-4) +#define S_SERBDNT (-5) +#define S_SERDLN (-6) +#define S_SERDCC (-7) +#define S_SERDTP (-8) +#define S_SERDVL (-9) +#define S_SERDMD (-10) +#define S_SERDSH (-11) +#define S_SERDPT (-12) +#define S_SERDFQ (-13) +#define S_SERDDR (-14) +#define S_SERDSR (-15) +#define S_SERDST (-16) + +#endif /* NOSOUND */ + +/****** Comm support ******************************************************/ + +#ifndef NOCOMM + +#define NOPARITY 0 +#define ODDPARITY 1 +#define EVENPARITY 2 +#define MARKPARITY 3 +#define SPACEPARITY 4 + +#define ONESTOPBIT 0 +#define ONE5STOPBITS 1 +#define TWOSTOPBITS 2 + +#define IGNORE 0 +#define INFINITE 0xFFFF + +/* Error Flags */ +#define CE_RXOVER 0x0001 +#define CE_OVERRUN 0x0002 +#define CE_RXPARITY 0x0004 +#define CE_FRAME 0x0008 +#define CE_BREAK 0x0010 +#define CE_CTSTO 0x0020 +#define CE_DSRTO 0x0040 +#define CE_RLSDTO 0x0080 +#define CE_TXFULL 0x0100 +#define CE_PTO 0x0200 +#define CE_IOE 0x0400 +#define CE_DNS 0x0800 +#define CE_OOP 0x1000 +#define CE_MODE 0x8000 + +#define IE_BADID (-1) +#define IE_OPEN (-2) +#define IE_NOPEN (-3) +#define IE_MEMORY (-4) +#define IE_DEFAULT (-5) +#define IE_HARDWARE (-10) +#define IE_BYTESIZE (-11) +#define IE_BAUDRATE (-12) + +/* Events */ +#define EV_RXCHAR 0x0001 +#define EV_RXFLAG 0x0002 +#define EV_TXEMPTY 0x0004 +#define EV_CTS 0x0008 +#define EV_DSR 0x0010 +#define EV_RLSD 0x0020 +#define EV_BREAK 0x0040 +#define EV_ERR 0x0080 +#define EV_RING 0x0100 +#define EV_PERR 0x0200 +#define EV_CTSS 0x0400 +#define EV_DSRS 0x0800 +#define EV_RLSDS 0x1000 +#define EV_RingTe 0x2000 +#define EV_RINGTE EV_RingTe + +/* Escape Functions */ +#define SETXOFF 1 +#define SETXON 2 +#define SETRTS 3 +#define CLRRTS 4 +#define SETDTR 5 +#define CLRDTR 6 +#define RESETDEV 7 + +#define LPTx 0x80 + +#if (WINVER >= 0x030a) + +/* new escape functions */ +#define GETMAXLPT 8 +#define GETMAXCOM 9 +#define GETBASEIRQ 10 + +/* Comm Baud Rate indices */ +#define CBR_110 0xFF10 +#define CBR_300 0xFF11 +#define CBR_600 0xFF12 +#define CBR_1200 0xFF13 +#define CBR_2400 0xFF14 +#define CBR_4800 0xFF15 +#define CBR_9600 0xFF16 +#define CBR_14400 0xFF17 +#define CBR_19200 0xFF18 +#define CBR_38400 0xFF1B +#define CBR_56000 0xFF1F +#define CBR_128000 0xFF23 +#define CBR_256000 0xFF27 + +/* notifications passed in low word of lParam on WM_COMMNOTIFY messages */ +#define CN_RECEIVE 0x0001 +#define CN_TRANSMIT 0x0002 +#define CN_EVENT 0x0004 + +#endif /* WINVER >= 0x030a */ + +typedef struct tagDCB +{ + BYTE Id; + UINT BaudRate; + BYTE ByteSize; + BYTE Parity; + BYTE StopBits; + UINT RlsTimeout; + UINT CtsTimeout; + UINT DsrTimeout; + + UINT fBinary :1; + UINT fRtsDisable :1; + UINT fParity :1; + UINT fOutxCtsFlow :1; + UINT fOutxDsrFlow :1; + UINT fDummy :2; + UINT fDtrDisable :1; + + UINT fOutX :1; + UINT fInX :1; + UINT fPeChar :1; + UINT fNull :1; + UINT fChEvt :1; + UINT fDtrflow :1; + UINT fRtsflow :1; + UINT fDummy2 :1; + + char XonChar; + char XoffChar; + UINT XonLim; + UINT XoffLim; + char PeChar; + char EofChar; + char EvtChar; + UINT TxDelay; +} DCB; +typedef DCB FAR* LPDCB; + +#if (defined(STRICT) | (WINVER >= 0x030a)) + +typedef struct tagCOMSTAT +{ + BYTE status; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#define CSTF_CTSHOLD 0x01 +#define CSTF_DSRHOLD 0x02 +#define CSTF_RLSDHOLD 0x04 +#define CSTF_XOFFHOLD 0x08 +#define CSTF_XOFFSENT 0x10 +#define CSTF_EOF 0x20 +#define CSTF_TXIM 0x40 + +#else /* (STRICT | WINVER >= 0x030a) */ + +/* NOTE: This structure declaration is not ANSI compatible! */ +typedef struct tagCOMSTAT +{ + BYTE fCtsHold :1; + BYTE fDsrHold :1; + BYTE fRlsdHold :1; + BYTE fXoffHold :1; + BYTE fXoffSent :1; + BYTE fEof :1; + BYTE fTxim :1; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#endif /* !(STRICT | WINVER >= 0x030a */ + +int WINAPI BuildCommDCB(LPCSTR, DCB FAR*); + +int WINAPI OpenComm(LPCSTR, UINT, UINT); +int WINAPI CloseComm(int); + +int WINAPI ReadComm(int, void FAR*, int); +int WINAPI WriteComm(int, const void FAR*, int); +int WINAPI UngetCommChar(int, char); +int WINAPI FlushComm(int, int); +int WINAPI TransmitCommChar(int, char); + +int WINAPI SetCommState(const DCB FAR*); +int WINAPI GetCommState(int, DCB FAR*); +int WINAPI GetCommError(int, COMSTAT FAR* ); + +int WINAPI SetCommBreak(int); +int WINAPI ClearCommBreak(int); + +UINT FAR* WINAPI SetCommEventMask(int, UINT); +UINT WINAPI GetCommEventMask(int, int); + +LONG WINAPI EscapeCommFunction(int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI EnableCommNotification(int, HWND, int, int); + +#define WM_COMMNOTIFY 0x0044 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOMM */ + +/****** String formatting support *******************************************/ + +int WINAPI wvsprintf(LPSTR lpszOut, LPCSTR lpszFmt, const void FAR* lpParams); + +int FAR CDECL wsprintf(LPSTR lpszOut, LPCSTR lpszFmt, ...); + + +/****** Driver support ******************************************************/ + +#if (WINVER >= 0x030a) + +#ifndef NODRIVERS + +DECLARE_HANDLE(HDRVR); + +typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM); + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_EXITSESSION 0x000B +#define DRV_EXITAPPLICATION 0x000C +#define DRV_POWER 0x000F + +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO +{ + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR* LPDRVCONFIGINFO; + +/* Supported return values for DRV_CONFIGURE message */ +#define DRVCNF_CANCEL 0x0000 +#define DRVCNF_OK 0x0001 +#define DRVCNF_RESTART 0x0002 + +/* Supported lParam1 of DRV_EXITAPPLICATION notification */ +#define DRVEA_NORMALEXIT 0x0001 +#define DRVEA_ABNORMALEXIT 0x0002 + +LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2); + +HDRVR WINAPI OpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2); +LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); + +LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2); + +HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver); + +HDRVR WINAPI GetNextDriver(HDRVR, DWORD); + +/* GetNextDriver flags */ +#define GND_FIRSTINSTANCEONLY 0x00000001 + +#define GND_FORWARD 0x00000000 +#define GND_REVERSE 0x00000002 + +typedef struct tagDRIVERINFOSTRUCT +{ + UINT length; + HDRVR hDriver; + HINSTANCE hModule; + char szAliasName[128]; +} DRIVERINFOSTRUCT; +typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT; + +BOOL WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*); + +#endif /* !NODRIVERS */ +#endif /* WINVER >= 0x030a */ +#endif /* NOUSER */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* _INC_WINDOWS */ diff --git a/private/oleauto/tools/win16/os2/inc/windows.inc b/private/oleauto/tools/win16/os2/inc/windows.inc new file mode 100644 index 000000000..9d2860e1c --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/windows.inc @@ -0,0 +1,2108 @@ +;************************************************************************* +; +; WINDOWS.INC - Windows assembly language structures & constants +; +;************************************************************************* +; +; Conditional Block includes: (True states) +; NOTEXT - don't include TextMetric struc & text drawing modes & stock objs. +; NORASTOPS - don't include binary and ternary raster ops. +; NOVK - don't include virtual key definitions +; NOMB - don't include message box definitions +; NOWM - don't include window messages +; +; +FALSE = 0 +TRUE = 1 +NULL = 0 + +;******************************************************************* +; +; Rectangle +; +;******************************************************************* + +RECT struc + rcLeft dw ? + rcTop dw ? + rcRight dw ? + rcBottom dw ? +RECT ends + +;******************************************************************* +; +; Window Class structure +; +;******************************************************************* + +WNDCLASS struc + clsStyle dw ? ; class style + clsLpfnWndProc dd ? + clsCbClsExtra dw ? + clsCbWndExtra dw ? + clsHInstance dw ? ; instance handle + clsHIcon dw ? ; class icon handle + clsHCursor dw ? ; class cursor handle + clsHbrBackground dw ? ; class background brush + clsLpszMenuName dd ? ; menu name + clsLpszClassName dd ? ; far ptr to class name +WNDCLASS ends + +IFNDEF NOTEXT +TEXTMETRIC struc + tmHeight dw ? + tmAscent dw ? + tmDescent dw ? + tmIntLeading dw ? + tmExtLeading dw ? + tmAveCharWidth dw ? + tmMaxCharWidth dw ? + tmWeight dw ? + tmItalic db ? + tmUnderlined db ? + tmStruckOut db ? + tmFirstChar db ? + tmLastChar db ? + tmDefaultChar db ? + tmBreakChar db ? + tmPitch db ? + tmCharSet db ? + tmOverhang dw ? + tmAspectX dw ? + tmAspectY dw ? +TEXTMETRIC ends + +LF_FACESIZE EQU 32 + +LOGFONT struc + lfHeight dw ? + lfWidth dw ? + lfEscapement dw ? + lfOrientation dw ? + lfWeight dw ? + lfItalic db ? + lfUnderline db ? + lfStrikeOut db ? + lfCharSet db ? + lfOutPrecision db ? + lfClipPrecision db ? + lfQuality db ? + lfPitchAndFamily db ? + lfFaceName db LF_FACESIZE dup(?) +LOGFONT ends + +LOGBRUSH struc + lbStyle dw ? + lbColor dd ? + lbHatch dw ? +LOGBRUSH ends + +; +; Text Drawing modes +; +TRANSPARENT = 1 +OPAQUE = 2 +; +; Mapping Modes +; +MM_TEXT = 1 +MM_LOMETRIC = 2 +MM_HIMETRIC = 3 +MM_LOENGLISH = 4 +MM_HIENGLISH = 5 +MM_TWIPS = 6 +MM_ISOTROPIC = 7 +MM_ANISOTROPIC = 8 +; +; Coordinate Modes +; +ABSOLUTE = 1 +RELATIVE = 2 +; +; Stock Logical Objects +; +WHITE_BRUSH = 0 +LTGRAY_BRUSH = 1 +GRAY_BRUSH = 2 +DKGRAY_BRUSH = 3 +BLACK_BRUSH = 4 +NULL_BRUSH = 5 +HOLLOW_BRUSH = 5 +WHITE_PEN = 6 +BLACK_PEN = 7 +NULL_PEN = 8 +DOT_MARKER = 9 +OEM_FIXED_FONT = 10 +ANSI_FIXED_FONT = 11 +ANSI_VAR_FONT = 12 +SYSTEM_FONT = 13 +DEVICE_DEFAULT_FONT = 14 +DEFAULT_PALETTE = 15 +SYSTEM_FIXED_FONT = 16 +ENDIF +; +; Brush Styles +; +BS_SOLID = 0 +BS_NULL = 1 +BS_HOLLOW = BS_NULL +BS_HATCHED = 2 +BS_PATTERN = 3 +BS_INDEXED = 4 +BS_DIBPATTERN = 5 +; +; Hatch Styles +; +HS_HORIZONTAL = 0 ; ----- +HS_VERTICAL = 1 ; ||||| +HS_FDIAGONAL = 2 ; \\\\\ +HS_BDIAGONAL = 3 ; ///// +HS_CROSS = 4 ; +++++ +HS_DIAGCROSS = 5 ; xxxxx +; +; Pen Styles +; +PS_SOLID = 0 +PS_DASH = 1 ; ------- +PS_DOT = 2 ; ....... +PS_DASHDOT = 3 ; _._._._ +PS_DASHDOTDOT = 4 ; _.._.._ +PS_NULL = 5 +PS_INSIDEFRAME = 6 +; +; Device Parameters for GetDeviceCaps() +; +DRIVERVERSION =0 ; Device driver version +TECHNOLOGY =2 ; Device classification +HORZSIZE =4 ; Horizontal size in millimeters +VERTSIZE =6 ; Vertical size in millimeters +HORZRES =8 ; Horizontal width in pixels +VERTRES =10 ; Vertical width in pixels +BITSPIXEL =12 ; Number of bits per pixel +PLANES =14 ; Number of planes +NUMBRUSHES =16 ; Number of brushes the device has +NUMPENS =18 ; Number of pens the device has +NUMMARKERS =20 ; Number of markers the device has +NUMFONTS =22 ; Number of fonts the device has +NUMCOLORS =24 ; Number of colors the device supports +PDEVICESIZE =26 ; Size required for device descriptor +CURVECAPS =28 ; Curve capabilities +LINECAPS =30 ; Line capabilities +POLYGONALCAPS =32 ; Polygonal capabilities +TEXTCAPS =34 ; Text capabilities +CLIPCAPS =36 ; Clipping capabilities +RASTERCAPS =38 ; Bitblt capabilities +ASPECTX =40 ; Length of the X leg +ASPECTY =42 ; Length of the Y leg +ASPECTXY =44 ; Length of the hypotenuse + +LOGPIXELSX =88 ; Logical pixels/inch in X +LOGPIXELSY =90 ; Logical pixels/inch in Y + +SIZEPALETTE =104 ; Number of entries in physical palette +NUMRESERVED =106 ; Number of reserved entries in palette +COLORRES =108 ; Actual color resolution +; +ifndef NOGDICAPMASKS +; +; Device Capability Masks: +; +; Device Technologies +DT_PLOTTER = 0 ; /* Vector plotter */ +DT_RASDISPLAY = 1 ; /* Raster display */ +DT_RASPRINTER = 2 ; /* Raster printer */ +DT_RASCAMERA = 3 ; /* Raster camera */ +DT_CHARSTREAM = 4 ; /* Character-stream, PLP */ +DT_METAFILE = 5 ; /* Metafile, VDM */ +DT_DISPFILE = 6 ; /* Display-file */ +; +; Curve Capabilities +CC_NONE = 0 ; /* Curves not supported */ +CC_CIRCLES = 1 ; /* Can do circles */ +CC_PIE = 2 ; /* Can do pie wedges */ +CC_CHORD = 4 ; /* Can do chord arcs */ +CC_ELLIPSES = 8 ; /* Can do ellipese */ +CC_WIDE = 16 ; /* Can do wide lines */ +CC_STYLED = 32 ; /* Can do styled lines */ +CC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +CC_INTERIORS = 128; /* Can do interiors */ +; +; Line Capabilities +LC_NONE = 0 ; /* Lines not supported */ +LC_POLYLINE = 2 ; /* Can do polylines */ +LC_MARKER = 4 ; /* Can do markers */ +LC_POLYMARKER = 8 ; /* Can do polymarkers */ +LC_WIDE = 16 ; /* Can do wide lines */ +LC_STYLED = 32 ; /* Can do styled lines */ +LC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +LC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities +PC_NONE = 0 ; /* Polygonals not supported */ +PC_POLYGON = 1 ; /* Can do polygons */ +PC_RECTANGLE = 2 ; /* Can do rectangles */ +PC_WINDPOLYGON = 4 ; /* Can do winding polygons */ +PC_TRAPEZOID = 4 ; /* Can do trapezoids */ +PC_SCANLINE = 8 ; /* Can do scanlines */ +PC_WIDE = 16 ; /* Can do wide borders */ +PC_STYLED = 32 ; /* Can do styled borders */ +PC_WIDESTYLED = 64 ; /* Can do wide styled borders */ +PC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities */ +CP_NONE = 0 ; /* No clipping of output */ +CP_RECTANGLE = 1 ; /* Output clipped to rects */ +; +; Text Capabilities +TC_OP_CHARACTER = 0001h ; /* Can do OutputPrecision CHARACTER */ +TC_OP_STROKE = 0002h ; /* Can do OutputPrecision STROKE */ +TC_CP_STROKE = 0004h ; /* Can do ClipPrecision STROKE */ +TC_CR_90 = 0008h ; /* Can do CharRotAbility 90 */ +TC_CR_ANY = 0010h ; /* Can do CharRotAbility ANY */ +TC_SF_X_YINDEP = 0020h ; /* Can do ScaleFreedom X_YINDEPENDENT */ +TC_SA_DOUBLE = 0040h ; /* Can do ScaleAbility DOUBLE */ +TC_SA_INTEGER = 0080h ; /* Can do ScaleAbility INTEGER */ +TC_SA_CONTIN = 0100h ; /* Can do ScaleAbility CONTINUOUS */ +TC_EA_DOUBLE = 0200h ; /* Can do EmboldenAbility DOUBLE */ +TC_IA_ABLE = 0400h ; /* Can do ItalisizeAbility ABLE */ +TC_UA_ABLE = 0800h ; /* Can do UnderlineAbility ABLE */ +TC_SO_ABLE = 1000h ; /* Can do StrikeOutAbility ABLE */ +TC_RA_ABLE = 2000h ; /* Can do RasterFontAble ABLE */ +TC_VA_ABLE = 4000h ; /* Can do VectorFontAble ABLE */ +TC_RESERVED = 8000h +; +; Raster Capabilities +RC_BITBLT = 1 ; /* Can do standard BLT. */ +RC_BANDING = 2 ; /* Device requires banding support */ +RC_SCALING = 4 ; /* Device requires scaling support */ +RC_BITMAP64 = 8 ; /* Device can support >64K bitmap */ +RC_GDI20_OUTPUT = 0010h ; /* has 2.0 output calls */ +RC_DI_BITMAP = 0080h ; /* supports DIB to memory */ +RC_PALETTE = 0100h ; /* supports a palette */ +RC_DIBTODEV = 0200h ; /* supports DIBitsToDevice */ +RC_BIGFONT = 0400h ; /* supports >64K fonts */ +RC_STRETCHBLT = 0800h ; /* supports StretchBlt */ +RC_FLOODFILL = 1000h ; /* supports FloodFill */ +RC_STRETCHDIB = 2000h ; /* supports StretchDIBits */ + +endif ;NOGDICAPMASKS + +; palette entry flags +; +PC_RESERVED = 1 ;/* palette index used for animation */ +PC_EXPLICIT = 2 ;/* palette index is explicit to device */ +PC_NOCOLLAPSE = 4 ;/* do not match color to system palette */ + +; DIB color table identifiers +; +DIB_RGB_COLORS = 0 ;/* color table in RGBTriples */ +DIB_PAL_COLORS = 1 ;/* color table in palette indices */ +; + +;constants for Get/SetSystemPaletteUse() +; +SYSPAL_STATIC = 1 +SYSPAL_NOSTATIC = 2 + +; constants for CreateDIBitmap +CBM_INIT = 4 ;/* initialize bitmap */ +; +; Bitmap format constants +BI_RGB = 0 +BI_RLE8 = 1 +BI_RLE4 = 2 +; +; +ANSI_CHARSET = 0 +SYMBOL_CHARSET = 2 +OEM_CHARSET = 255 +; +; styles for CombineRgn +; +RGN_AND = 1 +RGN_OR = 2 +RGN_XOR = 3 +RGN_DIFF = 4 +RGN_COPY = 5 +; +; Predefined cursor & icon IDs +; +IDC_ARROW = 32512 +IDC_IBEAM = 32513 +IDC_WAIT = 32514 +IDC_CROSS = 32515 +IDC_UPARROW = 32516 +IDC_SIZE = 32640 +IDC_ICON = 32641 +IDC_SIZENWSE = 32642 +IDC_SIZENESW = 32643 +IDC_SIZEWE = 32644 +IDC_SIZENS = 32645 + +IDI_APPLICATION = 32512 +IDI_HAND = 32513 +IDI_QUESTION = 32514 +IDI_EXCLAMATION = 32515 +IDI_ASTERISK = 32516 + +; +; OEM Resource Ordinal Numbers */ +; +OBM_CLOSE = 32754 +OBM_UPARROW = 32753 +OBM_DNARROW = 32752 +OBM_RGARROW = 32751 +OBM_LFARROW = 32750 +OBM_REDUCE = 32749 +OBM_ZOOM = 32748 +OBM_RESTORE = 32747 +OBM_REDUCED = 32746 +OBM_ZOOMD = 32745 +OBM_RESTORED = 32744 +OBM_UPARROWD = 32743 +OBM_DNARROWD = 32742 +OBM_RGARROWD = 32741 +OBM_LFARROWD = 32740 +OBM_MNARROW = 32739 +OBM_COMBO = 32738 + +OBM_OLD_CLOSE = 32767 +OBM_SIZE = 32766 +OBM_OLD_UPARROW = 32765 +OBM_OLD_DNARROW = 32764 +OBM_OLD_RGARROW = 32763 +OBM_OLD_LFARROW = 32762 +OBM_BTSIZE = 32761 +OBM_CHECK = 32760 +OBM_CHECKBOXES = 32759 +OBM_BTNCORNERS = 32758 +OBM_OLD_REDUCE = 32757 +OBM_OLD_ZOOM = 32756 +OBM_OLD_RESTORE = 32755 + +OCR_NORMAL = 32512 +OCR_IBEAM = 32513 +OCR_WAIT = 32514 +OCR_CROSS = 32515 +OCR_UP = 32516 +OCR_SIZE = 32640 +OCR_ICON = 32641 +OCR_SIZENWSE = 32642 +OCR_SIZENESW = 32643 +OCR_SIZEWE = 32644 +OCR_SIZENS = 32645 +OCR_SIZEALL = 32646 +OCR_ICOCUR = 32647 + +OIC_SAMPLE = 32512 +OIC_HAND = 32513 +OIC_QUES = 32514 +OIC_BANG = 32515 +OIC_NOTE = 32516 + +; +; Scroll bar constants +; +SB_HORZ = 0 +SB_VERT = 1 +SB_CTL = 2 +SB_BOTH = 3 +; +; Scroll Commands +; +SB_LINEUP = 0 +SB_LINEDOWN = 1 +SB_PAGEUP = 2 +SB_PAGEDOWN = 3 +SB_THUMBPOSITION = 4 +SB_THUMBTRACK = 5 +SB_TOP = 6 +SB_BOTTOM = 7 +SB_ENDSCROLL = 8 +; +; MessageBox type flags +; +IFNDEF NOMB +MB_OK = 0000H +MB_OKCANCEL = 0001H +MB_ABORTRETRYIGNORE = 0002H +MB_YESNOCANCEL = 0003H +MB_YESNO = 0004H +MB_RETRYCANCEL = 0005H + +MB_ICONHAND = 0010H +MB_ICONQUESTION = 0020H +MB_ICONEXCLAMATION = 0030H +MB_ICONASTERISK = 0040H + +MB_DEFBUTTON1 = 0000H +MB_DEFBUTTON2 = 0100H +MB_DEFBUTTON3 = 0200H + +MB_APPLMODAL = 0000H +MB_SYSTEMMODAL = 1000H +MB_TASKMODAL = 2000H + +MB_NOFOCUS = 8000H + +; +; Conventional dialog box and message box command IDs +; +IDOK = 1 +IDCANCEL = 2 +IDABORT = 3 +IDRETRY = 4 +IDIGNORE = 5 +IDYES = 6 +IDNO = 7 +; +; Flags for OpenFile +; +OF_READ = 0000H +OF_WRITE = 0001H +OF_READWRITE = 0002H +OF_SHARE_COMPAT = 0000H +OF_SHARE_EXCLUSIVE = 0010H +OF_SHARE_DENY_WRITE = 0020H +OF_SHARE_DENY_READ = 0030H +OF_SHARE_DENY_NONE = 0040H +OF_PARSE = 0100H +OF_DELETE = 0200H +OF_VERIFY = 0400H +OF_CANCEL = 0800H +OF_CREATE = 1000H +OF_PROMPT = 2000H +OF_EXIST = 4000H +OF_REOPEN = 8000H + +TF_FORCEDRIVE = 80H + +OPENSTRUC STRUC +opLen db ? +opDisk db ? +opXtra dw ? +opDate dw ? +opTime dw ? +opFile db 120 dup (?) +OPENSTRUC ENDS +; +; DrawText format flags +; +DT_LEFT = 00H +DT_CENTER = 01H +DT_RIGHT = 02H +DT_TOP = 00H +DT_VCENTER = 04H +DT_BOTTOM = 08H +DT_WORDBREAK = 10H +DT_SINGLELINE = 20H +DT_EXPANDTABS = 40H +DT_TABSTOP = 80H +DT_NOCLIP = 0100H +DT_EXTERNALLEADING = 0200H +DT_CALCRECT = 0400H +DT_NOPREFIX = 0800H +DT_INTERNAL = 1000H +ENDIF + +; +; ExtFloodFill style flags +; +FLOODFILLBORDER = 0 +FLOODFILLSURFACE = 1 + +; +; Memory manager flags +; +LMEM_FIXED = 0000h +LMEM_MOVEABLE = 0002h +LMEM_NOCOMPACT = 0010H +LMEM_NODISCARD = 0020H +LMEM_ZEROINIT = 0040h +LMEM_MODIFY = 0080H +LMEM_DISCARDABLE= 0F00h +LHND = LMEM_MOVEABLE+LMEM_ZEROINIT +LPTR = LMEM_FIXED+LMEM_ZEROINIT +; Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) +LMEM_DISCARDED = 4000H +LMEM_LOCKCOUNT = 00FFH + +NONZEROLHND = LMEM_MOVEABLE +NONZEROLPTR = LMEM_FIXED + +LNOTIFY_OUTOFMEM = 0 +LNOTIFY_MOVE = 1 +LNOTIFY_DISCARD = 2 + + +GMEM_FIXED = 0000h +GMEM_MOVEABLE = 0002h +GMEM_NOCOMPACT = 0010h +GMEM_NODISCARD = 0020h +GMEM_ZEROINIT = 0040h +GMEM_MODIFY = 0080h +GMEM_DISCARDABLE= 0100h +GMEM_NOT_BANKED = 1000h +GMEM_DDESHARE = 2000h +GMEM_SHARE = 2000h +GMEM_NOTIFY = 4000h +GMEM_LOWER = GMEM_NOT_BANKED +GHND = GMEM_MOVEABLE+GMEM_ZEROINIT +GPTR = GMEM_FIXED+GMEM_ZEROINIT + +; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) +GMEM_DISCARDED = 4000h +GMEM_LOCKCOUNT = 00FFh + +; Flags returned by GetWinFlags + +WF_PMODE = 0001h +WF_CPU286 = 0002h +WF_CPU386 = 0004h +WF_CPU486 = 0008h +WF_STANDARD = 0010h +WF_WIN286 = 0010h +WF_ENHANCED = 0020h +WF_WIN386 = 0020h +WF_CPU086 = 0040h +WF_CPU186 = 0080h +WF_LARGEFRAME = 0100h +WF_SMALLFRAME = 0200h +WF_80x87 = 0400h + +; WEP fSystemExit flag values +WEP_SYSTEM_EXIT = 1 +WEP_FREE_DLL = 0 + +; Virtual Keys, Standard Set + +IFNDEF NOVK +VK_LBUTTON = 01H +VK_RBUTTON = 02H +VK_CANCEL = 03H +VK_BACK = 08H +VK_TAB = 09H +VK_CLEAR = 0cH +VK_RETURN = 0dH +VK_SHIFT = 10H +VK_CONTROL = 11H +VK_MENU = 12H +VK_PAUSE = 13H +VK_CAPITAL = 14H +VK_ESCAPE = 1bH +VK_SPACE = 20H + +VK_PRIOR = 21H +VK_NEXT = 22H +VK_END = 23H +VK_HOME = 24H +VK_LEFT = 25H +VK_UP = 26H +VK_RIGHT = 27H +VK_DOWN = 28H + +; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' +; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' + +VK_PRINT = 2aH +VK_EXECUTE = 2bH +VK_SNAPSHOT = 2ch ; Printscreen key.. +VK_INSERT = 2dH +VK_DELETE = 2eH +VK_HELP = 2fH + +VK_NUMPAD0 = 60H +VK_NUMPAD1 = 61H +VK_NUMPAD2 = 62H +VK_NUMPAD3 = 63H +VK_NUMPAD4 = 64H +VK_NUMPAD5 = 65H +VK_NUMPAD6 = 66H +VK_NUMPAD7 = 67H +VK_NUMPAD8 = 68H +VK_NUMPAD9 = 69H +VK_MULTIPLY = 6AH +VK_ADD = 6BH +VK_SEPARATER = 6CH +VK_SUBTRACT = 6DH +VK_DECIMAL = 6EH +VK_DIVIDE = 6FH + +VK_F1 = 70H +VK_F2 = 71H +VK_F3 = 72H +VK_F4 = 73H +VK_F5 = 74H +VK_F6 = 75H +VK_F7 = 76H +VK_F8 = 77H +VK_F9 = 78H +VK_F10 = 79H +VK_F11 = 7aH +VK_F12 = 7bH +VK_F13 = 7cH +VK_F14 = 7dH +VK_F15 = 7eH +VK_F16 = 7fH +ENDIF + +IFNDEF NOWH + +; SetWindowsHook() codes +WH_MSGFILTER = (-1) +WH_JOURNALRECORD = 0 +WH_JOURNALPLAYBACK = 1 +WH_KEYBOARD = 2 +WH_GETMESSAGE = 3 +WH_CALLWNDPROC = 4 +WH_CBT = 5 +WH_SYSMSGFILTER = 6 +WH_WINDOWMGR = 7 +; +; Hook Codes +HC_LPLPFNNEXT = (-2) +HC_LPFNNEXT = (-1) +HC_ACTION = 0 +HC_GETNEXT = 1 +HC_SKIP = 2 +HC_NOREM = 3 +HC_NOREMOVE = 3 +HC_SYSMODALON = 4 +HC_SYSMODALOFF = 5 +; +; CBT Hook Codes +HCBT_MOVESIZE = 0 +HCBT_MINMAX = 1 +HCBT_QS = 2 +; +; WH_MSGFILTER Filter Proc Codes +MSGF_DIALOGBOX = 0 +MSGF_MESSAGEBOX = 1 +MSGF_MENU = 2 +MSGF_MOVE = 3 +MSGF_SIZE = 4 +MSGF_SCROLLBAR = 5 +MSGF_NEXTWINDOW = 6 +; +; Window Manager Hook Codes +WC_INIT = 1 +WC_SWP = 2 +WC_DEFWINDOWPROC = 3 +WC_MINMAX = 4 +WC_MOVE = 5 +WC_SIZE = 6 +WC_DRAWCAPTION = 7 +; +; Message Structure used in Journaling +EVENTMSG struc + message dw ? + paramL dw ? + paramH dw ? + time dd ? +EVENTMSG ends + +ENDIF ;NOWH + +; Window field offsets for GetWindowLong() and GetWindowWord() +GWL_WNDPROC = (-4) +GWW_HINSTANCE = (-6) +GWW_HWNDPARENT = (-8) +GWW_ID = (-12) +GWL_STYLE = (-16) +GWL_EXSTYLE = (-20) + +; GetWindow() Constants +GW_HWNDFIRST = 0 +GW_HWNDLAST = 1 +GW_HWNDNEXT = 2 +GW_HWNDPREV = 3 +GW_OWNER = 4 +GW_CHILD = 5 + +; Class field offsets for GetClassLong() and GetClassWord() +GCL_MENUNAME = (-8) +GCW_HBRBACKGROUND = (-10) +GCW_HCURSOR = (-12) +GCW_HICON = (-14) +GCW_HMODULE = (-16) +GCW_CBWNDEXTRA = (-18) +GCW_CBCLSEXTRA = (-20) +GCL_WNDPROC = (-24) +GCW_STYLE = (-26) + +; WinWhere() Area Codes +HTERROR = (-2) +HTTRANSPARENT = (-1) +HTNOWHERE = 0 +HTCLIENT = 1 +HTCAPTION = 2 +HTSYSMENU = 3 +HTGROWBOX = 4 +HTSIZE = HTGROWBOX +HTMENU = 5 +HTHSCROLL = 6 +HTVSCROLL = 7 +HTREDUCE = 8 +HTZOOM = 9 +HTLEFT = 10 +HTRIGHT = 11 +HTTOP = 12 +HTTOPLEFT = 13 +HTTOPRIGHT = 14 +HTBOTTOM = 15 +HTBOTTOMLEFT = 16 +HTBOTTOMRIGHT = 17 +HTSIZEFIRST = HTLEFT +HTSIZELAST = HTBOTTOMRIGHT + + + +;************************************************************************* +; +; Misc structures & constants +; +;************************************************************************* + +IFNDEF NOMST +POINT struc + ptX dw ? + ptY dw ? +POINT ends + +LOGPEN struc + lopnStyle dw ? + lopnWidth db (SIZE POINT) DUP(?) + lopnColor dd ? +LOGPEN ends + + +BITMAP STRUC + bmType DW ? + bmWidth DW ? + bmHeight DW ? + bmWidthBytes DW ? + bmPlanes DB ? + bmBitsPixel DB ? + bmBits DD ? +BITMAP ENDS + +RGBTRIPLE struc + rgbBlue db ? + rgbGreen db ? + rgbRed db ? +RGBTRIPLE ends + +RGBQUAD struc + rgbqBlue db ? + rgbqGreen db ? + rgbqRed db ? + rgbqReserved db ? +RGBQUAD ends + +; structures for defining DIBs +BITMAPCOREHEADER struc + bcSize dd ? + bcWidth dw ? + bcHeight dw ? + bcPlanes dw ? + bcBitCount dw ? +BITMAPCOREHEADER ends + +BITMAPINFOHEADER struc + biSize dd ? + biWidth dd ? + biHeight dd ? + biPlanes dw ? + biBitCount dw ? + + biCompression dd ? + biSizeImage dd ? + biXPelsPerMeter dd ? + biYPelsPerMeter dd ? + biClrUsed dd ? + biClrImportant dd ? +BITMAPINFOHEADER ends + +BITMAPINFO struc + bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?) + bmiColors db ? ; array of RGBQUADs +BITMAPINFO ends + +BITMAPCOREINFO struc + bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?) + bmciColors db ? ; array of RGBTRIPLEs +BITMAPCOREINFO ends + +BITMAPFILEHEADER struc + bfType dw ? + bfSize dd ? + bfReserved1 dw ? + bfReserved2 dw ? + bfOffBits dd ? +BITMAPFILEHEADER ends + + +WNDSTRUC struc + WSwndStyle dd ? + WSwndID dw ? + WSwndText dw ? + WSwndParent dw ? + WSwndInstance dw ? + WSwndClassProc dd ? +WNDSTRUC ends +; +; Message structure +; +MSGSTRUCT struc +msHWND dw ? +msMESSAGE dw ? +msWPARAM dw ? +msLPARAM dd ? +msTIME dd ? +msPT dd ? +MSGSTRUCT ends + +NEWPARMS struc + nprmHwnd dw ? + nprmCmd db ? +NEWPARMS ends +ENDIF + +PAINTSTRUCT STRUC + PShdc DW ? + PSfErase DW ? + PSrcPaint DB size RECT dup(?) + PSfRestore DW ? + PSfIncUpdate DW ? + PSrgbReserved DB 16 dup(?) +PAINTSTRUCT ENDS + + +CREATESTRUCT struc + cs_lpCreateParams dd ? + cs_hInstance dw ? + cs_hMenu dw ? + cs_hwndParent dw ? + cs_cy dw ? + cs_cx dw ? + cs_y dw ? + cs_x dw ? + cs_style dd ? + cs_lpszName dd ? + cs_lpszClass dd ? + cs_dwExStyle dd ? +CREATESTRUCT ends +; +; PostError constants +; +WARNING = 0 ; command codes +MINOR_ERROR = 1 +FATAL_ERROR = 2 + +IGNORE = 0 ; response codes +RETRY = 1 +ABORT = 2 +; +; GDI-related constants & commands +; +ERRORREGION = 0 +NULLREGION = 1 +SIMPLEREGION = 2 +COMPLEXREGION = 3 + +IFNDEF NORASTOPS +; +; Binary raster ops +; +R2_BLACK = 1 +R2_NOTMERGEPEN = 2 +R2_MASKNOTPEN = 3 +R2_NOTCOPYPEN = 4 +R2_MASKPENNOT = 5 +R2_NOT = 6 +R2_XORPEN = 7 +R2_NOTMASKPEN = 8 +R2_MASKPEN = 9 +R2_NOTXORPEN = 10 +R2_NOP = 11 +R2_MERGENOTPEN = 12 +R2_COPYPEN = 13 +R2_MERGEPENNOT = 14 +R2_MERGEPEN = 15 +R2_WHITE = 16 +; +; Ternary raster ops +; +SRCCOPY_L = 0020h ;dest=source +SRCCOPY_H = 00CCh +SRCPAINT_L = 0086h ;dest=source OR dest +SRCPAINT_H = 00EEh +SRCAND_L = 00C6h ;dest=source AND dest +SRCAND_H = 0088h +SRCINVERT_L = 0046h ;dest= source XOR dest +SRCINVERT_H = 0066h +SRCERASE_L = 0328h ;dest= source AND (not dest ) +SRCERASE_H = 0044h +NOTSRCCOPY_L = 0008h ;dest= (not source) +NOTSRCCOPY_H = 0033h +NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest) +NOTSRCERASE_H = 0011h +MERGECOPY_L = 00CAh ;dest= (source AND pattern) +MERGECOPY_H = 00C0h +MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest +MERGEPAINT_H = 00BBh +PATCOPY_L = 0021h ;dest= pattern +PATCOPY_H = 00F0h +PATPAINT_L = 0A09h ;DPSnoo +PATPAINT_H = 00FBh +PATINVERT_L = 0049h ;dest= pattern XOR dest +PATINVERT_H = 005Ah +DSTINVERT_L = 0009h ;dest= (not dest) +DSTINVERT_H = 0055h +BLACKNESS_L = 0042h ;dest= BLACK +BLACKNESS_H = 0000h +WHITENESS_L = 0062h ;dest= WHITE +WHITENESS_H = 00FFh +; +; StretchBlt modes +; +BLACKONWHITE = 1 +WHITEONBLACK = 2 +COLORONCOLOR = 3 +; +; PolyFill modes +; +ALTERNATE = 1 +WINDING = 2 +ENDIF +; +; Text Alignment Options +; +TA_NOUPDATECP = 0 +TA_UPDATECP = 1 + +TA_LEFT = 0 +TA_RIGHT = 2 +TA_CENTER = 6 + +TA_TOP = 0 +TA_BOTTOM = 8 +TA_BASELINE = 24 + +ETO_GRAYED = 1 +ETO_OPAQUE = 2 +ETO_CLIPPED = 4 + +ASPECT_FILTERING = 1 + +ifndef NOMETAFILE + +; Metafile Functions */ +META_SETBKCOLOR = 0201h +META_SETBKMODE = 0102h +META_SETMAPMODE = 0103h +META_SETROP2 = 0104h +META_SETRELABS = 0105h +META_SETPOLYFILLMODE = 0106h +META_SETSTRETCHBLTMODE = 0107h +META_SETTEXTCHAREXTRA = 0108h +META_SETTEXTCOLOR = 0209h +META_SETTEXTJUSTIFICATION = 020Ah +META_SETWINDOWORG = 020Bh +META_SETWINDOWEXT = 020Ch +META_SETVIEWPORTORG = 020Dh +META_SETVIEWPORTEXT = 020Eh +META_OFFSETWINDOWORG = 020Fh +META_SCALEWINDOWEXT = 0400h +META_OFFSETVIEWPORTORG = 0211h +META_SCALEVIEWPORTEXT = 0412h +META_LINETO = 0213h +META_MOVETO = 0214h +META_EXCLUDECLIPRECT = 0415h +META_INTERSECTCLIPRECT = 0416h +META_ARC = 0817h +META_ELLIPSE = 0418h +META_FLOODFILL = 0419h +META_PIE = 081Ah +META_RECTANGLE = 041Bh +META_ROUNDRECT = 061Ch +META_PATBLT = 061Dh +META_SAVEDC = 001Eh +META_SETPIXEL = 041Fh +META_OFFSETCLIPRGN = 0220h +META_TEXTOUT = 0521h +META_BITBLT = 0922h +META_STRETCHBLT = 0B23h +META_POLYGON = 0324h +META_POLYLINE = 0325h +META_ESCAPE = 0626h +META_RESTOREDC = 0127h +META_FILLREGION = 0228h +META_FRAMEREGION = 0429h +META_INVERTREGION = 012Ah +META_PAINTREGION = 012Bh +META_SELECTCLIPREGION = 012Ch +META_SELECTOBJECT = 012Dh +META_SETTEXTALIGN = 012Eh +META_DRAWTEXT = 062Fh + +META_CHORD = 0830h +META_SETMAPPERFLAGS = 0231h +META_EXTTEXTOUT = 0a32h +META_SETDIBTODEV = 0d33h +META_SELECTPALETTE = 0234h +META_REALIZEPALETTE = 0035h +META_ANIMATEPALETTE = 0436h +META_SETPALENTRIES = 0037h +META_POLYPOLYGON = 0538h +META_RESIZEPALETTE = 0139h + +META_DIBBITBLT = 0940h +META_DIBSTRETCHBLT = 0b41h +META_DIBCREATEPATTERNBRUSH = 0142h +META_STRETCHDIB = 0f43h + +META_DELETEOBJECT = 01f0h + +META_CREATEPALETTE = 00f7h +META_CREATEBRUSH = 00F8h +META_CREATEPATTERNBRUSH = 01F9h +META_CREATEPENINDIRECT = 02FAh +META_CREATEFONTINDIRECT = 02FBh +META_CREATEBRUSHINDIRECT = 02FCh +META_CREATEBITMAPINDIRECT = 02FDh +META_CREATEBITMAP = 06FEh +META_CREATEREGION = 06FFh + +; /* Clipboard Metafile Picture Structure */ +HANDLETABLE struc + ht_objectHandle dw ? +HANDLETABLE ends + +METARECORD struc + mr_rdSize dd ? + mr_rdFunction dw ? + mr_rdParm dw ? +METARECORD ends + +METAFILEPICT struc + mfp_mm dw ? + mfp_xExt dw ? + mfp_yExt dw ? + mfp_hMF dw ? +METAFILEPICT ends + +METAHEADER struc + mtType dw ? + mtHeaderSize dw ? + mtVersion dw ? + mtSize dd ? + mtNoObjects dw ? + mtMaxRecord dd ? + mtNoParameters dw ? +METAHEADER ends + +endif ; NOMETAFILE + +; GDI Escapes +NEWFRAME = 1 +ABORTDOC = 2 +NEXTBAND = 3 +SETCOLORTABLE = 4 +GETCOLORTABLE = 5 +FLUSHOUTPUT = 6 +DRAFTMODE = 7 +QUERYESCSUPPORT = 8 +SETABORTPROC = 9 +STARTDOC = 10 +;; This value conflicts with a std WIN386 MACRO definition +;;ENDDOC = 11 +GETPHYSPAGESIZE = 12 +GETPRINTINGOFFSET = 13 +GETSCALINGFACTOR = 14 +MFCOMMENT = 15 +GETPENWIDTH = 16 +SETCOPYCOUNT = 17 +SELECTPAPERSOURCE = 18 +DEVICEDATA = 19 +PASSTHROUGH = 19 +GETTECHNOLGY = 20 +GETTECHNOLOGY = 20 +SETENDCAP = 21 +SETLINEJOIN = 22 +SETMITERLIMIT = 23 +BANDINFO = 24 +DRAWPATTERNRECT = 25 +GETVECTORPENSIZE = 26 +GETVECTORBRUSHSIZE = 27 +ENABLEDUPLEX = 28 +ENABLEMANUALFEED = 29 +GETSETPAPERBINS = 29 +GETSETPRINTORIENT = 30 +ENUMPAPERBINS = 31 + +GETEXTENDEDTEXTMETRICS = 256 +GETEXTENTTABLE = 257 +GETPAIRKERNTABLE = 258 +GETTRACKKERNTABLE = 259 + +EXTTEXTOUT = 512 + +ENABLERELATIVEWIDTHS = 768 +ENABLEPAIRKERNING = 769 +SETKERNTRACK = 770 +SETALLJUSTVALUES = 771 +SETCHARSET = 772 + +STRETCHBLT = 2048 + + +; Spooler Error Codes +SP_NOTREPORTED = 4000h +SP_ERROR = (-1) +SP_APPABORT = (-2) +SP_USERABORT = (-3) +SP_OUTOFDISK = (-4) +SP_OUTOFMEMORY = (-5) + +PR_JOBSTATUS = 0000 + +; Object Definitions for EnumObjects() +OBJ_PEN = 1 +OBJ_BRUSH = 2 + +; +; Menu flags for Change/Check/Enable MenuItem +; +MF_INSERT = 0000h +MF_CHANGE = 0080h +MF_APPEND = 0100h +MF_DELETE = 0200h +MF_REMOVE = 1000h + +MF_BYCOMMAND = 0000h +MF_BYPOSITION = 0400h + +MF_SEPARATOR = 0800h + +MF_ENABLED = 0000h +MF_GRAYED = 0001h +MF_DISABLED = 0002h + +MF_UNCHECKED = 0000h +MF_CHECKED = 0008h +MF_USECHECKBITMAPS= 0200h + +MF_STRING = 0000h +MF_BITMAP = 0004h +MF_OWNERDRAW = 0100h + +MF_POPUP = 0010h +MF_MENUBARBREAK = 0020h +MF_MENUBREAK = 0040h + +MF_UNHILITE = 0000h +MF_HILITE = 0080h + +MF_SYSMENU = 2000h +MF_HELP = 4000h +MF_MOUSESELECT = 8000h + + +; +; System Menu Command Values +; +SC_SIZE = 0F000h +SC_MOVE = 0F010h +SC_MINIMIZE = 0F020h +SC_MAXIMIZE = 0F030h +SC_NEXTWINDOW = 0F040h +SC_PREVWINDOW = 0F050h +SC_CLOSE = 0F060h +SC_VSCROLL = 0F070h +SC_HSCROLL = 0F080h +SC_MOUSEMENU = 0F090h +SC_KEYMENU = 0F100h +SC_ARRANGE = 0F110h +SC_RESTORE = 0F120h +SC_TASKLIST = 0F130h + +SC_ICON = SC_MINIMIZE +SC_ZOOM = SC_MAXIMIZE + +; +; Window State Messages +; +IFNDEF NOWM +WM_STATE = 0000H + +WM_NULL = 0000h +WM_CREATE = 0001h +WM_DESTROY = 0002h +WM_MOVE = 0003h +WM_SIZE = 0005h +WM_ACTIVATE = 0006h +WM_SETFOCUS = 0007h +WM_KILLFOCUS = 0008h +WM_ENABLE = 000Ah +WM_SETREDRAW = 000Bh +WM_SETTEXT = 000Ch +WM_GETTEXT = 000Dh +WM_GETTEXTLENGTH = 000Eh +WM_PAINT = 000Fh +WM_CLOSE = 0010h +WM_QUERYENDSESSION = 0011h +WM_QUIT = 0012h +WM_QUERYOPEN = 0013h +WM_ERASEBKGND = 0014h +WM_SYSCOLORCHANGE = 0015h +WM_ENDSESSION = 0016h +WM_SHOWWINDOW = 0018h +WM_CTLCOLOR = 0019h +WM_WININICHANGE = 001Ah +WM_DEVMODECHANGE = 001Bh +WM_ACTIVATEAPP = 001Ch +WM_FONTCHANGE = 001Dh +WM_TIMECHANGE = 001Eh +WM_CANCELMODE = 001Fh +WM_SETCURSOR = 0020h +WM_MOUSEACTIVATE = 0021h +WM_CHILDACTIVATE = 0022h +WM_QUEUESYNC = 0023h +WM_GETMINMAXINFO = 0024h +WM_PAINTICON = 0026h +WM_ICONERASEBKGND = 0027h +WM_NEXTDLGCTL = 0028h +WM_SPOOLERSTATUS = 002Ah +WM_DRAWITEM = 002Bh +WM_MEASUREITEM = 002Ch +WM_DELETEITEM = 002Dh +WM_VKEYTOITEM = 002Eh +WM_CHARTOITEM = 002Fh +WM_SETFONT = 0030h +WM_GETFONT = 0031h +WM_QUERYDRAGICON = 0037h +WM_COMPAREITEM = 0039h +WM_COMPACTING = 0041h + +WM_NCCREATE = 0081h +WM_NCDESTROY = 0082h +WM_NCCALCSIZE = 0083h +WM_NCHITTEST = 0084h +WM_NCPAINT = 0085h +WM_NCACTIVATE = 0086h +WM_GETDLGCODE = 0087h +WM_NCMOUSEMOVE = 00A0h +WM_NCLBUTTONDOWN = 00A1h +WM_NCLBUTTONUP = 00A2h +WM_NCLBUTTONDBLCLK = 00A3h +WM_NCRBUTTONDOWN = 00A4h +WM_NCRBUTTONUP = 00A5h +WM_NCRBUTTONDBLCLK = 00A6h +WM_NCMBUTTONDOWN = 00A7h +WM_NCMBUTTONUP = 00A8h +WM_NCMBUTTONDBLCLK = 00A9h + +WM_KEYFIRST = 0100h +WM_KEYDOWN = 0100h +WM_KEYUP = 0101h +WM_CHAR = 0102h +WM_DEADCHAR = 0103h +WM_SYSKEYDOWN = 0104h +WM_SYSKEYUP = 0105h +WM_SYSCHAR = 0106h +WM_SYSDEADCHAR = 0107h +WM_KEYLAST = 0108h + +WM_INITDIALOG = 0110h +WM_COMMAND = 0111h +WM_SYSCOMMAND = 0112h +WM_TIMER = 0113h +WM_HSCROLL = 0114h +WM_VSCROLL = 0115h +WM_INITMENU = 0116h +WM_INITMENUPOPUP = 0117h +WM_MENUSELECT = 011Fh +WM_MENUCHAR = 0120h +WM_ENTERIDLE = 0121h + + +WM_MOUSEFIRST = 0200h +WM_MOUSEMOVE = 0200h +WM_LBUTTONDOWN = 0201h +WM_LBUTTONUP = 0202h +WM_LBUTTONDBLCLK = 0203h +WM_RBUTTONDOWN = 0204h +WM_RBUTTONUP = 0205h +WM_RBUTTONDBLCLK = 0206h +WM_MBUTTONDOWN = 0207h +WM_MBUTTONUP = 0208h +WM_MBUTTONDBLCLK = 0209h +WM_MOUSELAST = 0209h + +WM_PARENTNOTIFY = 0210h +WM_MDICREATE = 0220h +WM_MDIDESTROY = 0221h +WM_MDIACTIVATE = 0222h +WM_MDIRESTORE = 0223h +WM_MDINEXT = 0224h +WM_MDIMAXIMIZE = 0225h +WM_MDITILE = 0226h +WM_MDICASCADE = 0227h +WM_MDIICONARRANGE = 0228h +WM_MDIGETACTIVE = 0229h +WM_MDISETMENU = 0230h + + +WM_CUT = 0300h +WM_COPY = 0301h +WM_PASTE = 0302h +WM_CLEAR = 0303h +WM_UNDO = 0304h +WM_RENDERFORMAT = 0305h +WM_RENDERALLFORMATS = 0306h +WM_DESTROYCLIPBOARD = 0307h +WM_DRAWCLIPBOARD = 0308h +WM_PAINTCLIPBOARD = 0309h +WM_VSCROLLCLIPBOARD = 030Ah +WM_SIZECLIPBOARD = 030Bh +WM_ASKCBFORMATNAME = 030Ch +WM_CHANGECBCHAIN = 030Dh +WM_HSCROLLCLIPBOARD = 030Eh +WM_QUERYNEWPALETTE = 030Fh +WM_PALETTEISCHANGING = 0310h +WM_PALETTECHANGED = 0311h + + +; private window messages start here +WM_USER = 0400H +ENDIF ; NOWM + +; WM_MOUSEACTIVATE Return Codes +MA_ACTIVATE = 1 +MA_ACTIVATEANDEAT = 2 +MA_NOACTIVATE = 3 + +; Size message commands +SIZENORMAL = 0 +SIZEICONIC = 1 +SIZEFULLSCREEN = 2 +SIZEZOOMSHOW = 3 +SIZEZOOMHIDE = 4 + +; ShowWindow() Commands +SW_HIDE = 0 +SW_SHOWNORMAL = 1 +SW_NORMAL = 1 +SW_SHOWMINIMIZED = 2 +SW_SHOWMAXIMIZED = 3 +SW_MAXIMIZE = 3 +SW_SHOWNOACTIVATE = 4 +SW_SHOW = 5 +SW_MINIMIZE = 6 +SW_SHOWMINNOACTIVE = 7 +SW_SHOWNA = 8 +SW_RESTORE = 9 + +; Old ShowWindow() Commands +HIDE_WINDOW = 0 +SHOW_OPENWINDOW = 1 +SHOW_ICONWINDOW = 2 +SHOW_FULLSCREEN = 3 +SHOW_OPENNOACTIVATE= 4 + +; identifiers for the WM_SHOWWINDOW message +SW_PARENTCLOSING = 1 +SW_OTHERZOOM = 2 +SW_PARENTOPENING = 3 +SW_OTHERUNZOOM = 4 +; +; Key state masks for mouse messages +; +MK_LBUTTON = 0001h +MK_RBUTTON = 0002h +MK_SHIFT = 0004h +MK_CONTROL = 0008h +MK_MBUTTON = 0010h +; +; Class styles +; +CS_VREDRAW = 0001h +CS_HREDRAW = 0002h +CS_KEYCVTWINDOW = 0004H +CS_DBLCLKS = 0008h +; 0010h reserved +CS_OWNDC = 0020h +CS_CLASSDC = 0040h +CS_PARENTDC = 0080h +CS_NOKEYCVT = 0100h +CS_SAVEBITS = 0800h +CS_NOCLOSE = 0200h +CS_BYTEALIGNCLIENT = 1000h +CS_BYTEALIGNWINDOW = 2000h +CS_GLOBALCLASS = 4000h ; Global window class + +; +; Special CreateWindow position value +; +CW_USEDEFAULT EQU 8000h + +; +; Windows styles (the high words) +; +WS_OVERLAPPED = 00000h +WS_ICONICPOPUP = 0C000h +WS_POPUP = 08000h +WS_CHILD = 04000h +WS_MINIMIZE = 02000h +WS_VISIBLE = 01000h +WS_DISABLED = 00800h +WS_CLIPSIBLINGS = 00400h +WS_CLIPCHILDREN = 00200h +WS_MAXIMIZE = 00100h +WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME +WS_BORDER = 00080h +WS_DLGFRAME = 00040h +WS_VSCROLL = 00020h +WS_HSCROLL = 00010h +WS_SYSMENU = 00008h +WS_THICKFRAME = 00004h +WS_HREDRAW = 00002h +WS_VREDRAW = 00001h +WS_GROUP = 00002h +WS_TABSTOP = 00001h +WS_MINIMIZEBOX = 00002h +WS_MAXIMIZEBOX = 00001h + +; Common Window Styles + +WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX +WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU +WS_CHILDWINDOW = WS_CHILD +WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW + +WS_TILED = WS_OVERLAPPED +WS_ICONIC = WS_MINIMIZE +WS_SIZEBOX = WS_THICKFRAME + +; Extended Window Styles (low words) +WS_EX_DLGMODALFRAME = 0001 +WS_EX_DRAGOBJECT = 0002 +WS_EX_NOPARENTNOTIFY = 0004 + +; +; predefined clipboard formats +; +CF_TEXT = 1 +CF_BITMAP = 2 +CF_METAFILEPICT = 3 +CF_SYLK = 4 +CF_DIF = 5 +CF_TIFF = 6 +CF_OEMTEXT = 7 +CF_DIB = 8 +CF_PALETTE = 9 + +CF_OWNERDISPLAY = 80h ; owner display +CF_DSPTEXT = 81h ; display text +CF_DSPBITMAP = 82h ; display bitmap +CF_DSPMETAFILEPICT = 83h ; display metafile +; +; Private clipboard format range +; +CF_PRIVATEFIRST = 200h ; Anything in this range doesn't +CF_PRIVATELAST = 2ffh ; get GlobalFree'd +CF_GDIOBJFIRST = 300h ; Anything in this range gets +CF_GDIOBJLAST = 3ffh ; DeleteObject'ed + + +MAKEINTRESOURCE MACRO a + mov ax,a + xor dx,dx + ENDM +; +; Predefined resource types +; +RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE +RT_BITMAP = 2 +RT_ICON = 3 +RT_MENU = 4 +RT_DIALOG = 5 +RT_STRING = 6 +RT_FONTDIR = 7 +RT_FONT = 8 +RT_ACCELERATOR = 9 +RT_RCDATA = 10 + + + + +IFNDEF NOMDI +MDICREATESTRUCT struc + szClass dd ? + szTitle dd ? + hOwner dw ? + x dw ? + y dw ? + cxc dw ? + cyc dw ? + style dd ? +MDICREATESTRUCT ends + +CLIENTCREATESTRUCT struc + hWindowMenu dw ? + idFirstChild dw ? +CLIENTCREATESTRUCT ends +ENDIF + +; NOMDI + + +PALETTEENTRY struc + peRed db ? + peGreen db ? + peBlue db ? + peFlags db ? +PALETTEENTRY ends + +; Logical Palette +LOGPALETTE struc + palVersion dw ? + palNumEntries dw ? + palPalEntry db ? ; array of PALETTEENTRY +LOGPALETTE ends + +; DRAWITEMSTRUCT for ownerdraw +DRAWITEMSTRUCT struc + drCtlType dw ? + drCtlID dw ? + dritemID dw ? + dritemAction dw ? + dritemState dw ? + drhwndItem dw ? + drhDC dw ? + drrcItem DB size RECT dup(?) + dritemData dd ? +DRAWITEMSTRUCT ends + +; DELETEITEMSTRUCT for ownerdraw +DELETEITEMSTRUCT struc + deCtlType dw ? + deCtlID dw ? + deitemID dw ? + dehwndItem dw ? + deitemData dd ? +DELETEITEMSTRUCT ends + +; MEASUREITEMSTRUCT for ownerdraw +MEASUREITEMSTRUCT struc + meCtlType dw ? + meCtlID dw ? + meitemID dw ? + meitemWidth dw ? + meitemHeight dw ? + meitemData dd ? +MEASUREITEMSTRUCT ends + +; COMPAREITEMSTUCT for ownerdraw sorting +COMPAREITEMSTRUCT struc + coCtlType dw ? + coCtlID dw ? + cohwndItem dw ? + coitemID1 dw ? + coitemData1 dd ? + coitemID2 dw ? + coitemData2 dd ? +COMPAREITEMSTRUCT ends + +; Owner draw control types +ODT_MENU = 1 +ODT_LISTBOX = 2 +ODT_COMBOBOX = 3 +ODT_BUTTON = 4 + +; Owner draw actions +ODA_DRAWENTIRE = 1 +ODA_SELECT = 2 +ODA_FOCUS = 4 + +; Owner draw state +ODS_SELECTED = 0001h +ODS_GRAYED = 0002h +ODS_DISABLED = 0004h +ODS_CHECKED = 0008h +ODS_FOCUS = 0010h + +; PeekMessage() Options +PM_NOREMOVE = 0000h +PM_REMOVE = 0001h +PM_NOYIELD = 0002h + +; SetWindowPos Flags +SWP_NOSIZE = 0001h +SWP_NOMOVE = 0002h +SWP_NOZORDER = 0004h +SWP_NOREDRAW = 0008h +SWP_NOACTIVATE = 0010h +SWP_DRAWFRAME = 0020h +SWP_SHOWWINDOW = 0040h +SWP_HIDEWINDOW = 0080h +SWP_NOCOPYBITS = 0100h +SWP_NOREPOSITION = 0200h + + +IFNDEF NOWINMESSAGES + +; Listbox messages +LB_ADDSTRING = (WM_USER+1) +LB_INSERTSTRING = (WM_USER+2) +LB_DELETESTRING = (WM_USER+3) +LB_RESETCONTENT = (WM_USER+5) +LB_SETSEL = (WM_USER+6) +LB_SETCURSEL = (WM_USER+7) +LB_GETSEL = (WM_USER+8) +LB_GETCURSEL = (WM_USER+9) +LB_GETTEXT = (WM_USER+10) +LB_GETTEXTLEN = (WM_USER+11) +LB_GETCOUNT = (WM_USER+12) +LB_SELECTSTRING = (WM_USER+13) +LB_DIR = (WM_USER+14) +LB_GETTOPINDEX = (WM_USER+15) +LB_FINDSTRING = (WM_USER+16) +LB_GETSELCOUNT = (WM_USER+17) +LB_GETSELITEMS = (WM_USER+18) +LB_SETTABSTOPS = (WM_USER+19) +LB_GETHORIZONTALEXTENT = (WM_USER+20) +LB_SETHORIZONTALEXTENT = (WM_USER+21) +LB_SETTOPINDEX = (WM_USER+24) +LB_GETITEMRECT = (WM_USER+25) +LB_GETITEMDATA = (WM_USER+26) +LB_SETITEMDATA = (WM_USER+27) +LB_SELITEMRANGE = (WM_USER+28) +LB_MSGMAX = (WM_USER+33) + +ENDIF +; NOWINMESSAGES + +; Listbox Styles +LBS_NOTIFY = 0001h +LBS_SORT = 0002h +LBS_NOREDRAW = 0004h +LBS_MULTIPLESEL = 0008h +LBS_OWNERDRAWFIXED = 0010h +LBS_OWNERDRAWVARIABLE = 0020h +LBS_HASSTRINGS = 0040h +LBS_USETABSTOPS = 0080h +LBS_NOINTEGRALHEIGHT = 0100h +LBS_MULTICOLUMN = 0200h +LBS_WANTKEYBOARDINPUT = 0400h +LBS_EXTENDEDSEL = 0800h +LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER + +; Listbox Notification Codes +LBN_ERRSPACE = (-2) +LBN_SELCHANGE = 1 +LBN_DBLCLK = 2 +LBN_SELCANCEL = 3 +LBN_SETFOCUS = 4 +LBN_KILLFOCUS = 5 + +IFNDEF NOWINMESSAGES + +; Edit Control Messages +EM_GETSEL = (WM_USER+0) +EM_SETSEL = (WM_USER+1) +EM_GETRECT = (WM_USER+2) +EM_SETRECT = (WM_USER+3) +EM_SETRECTNP = (WM_USER+4) +EM_SCROLL = (WM_USER+5) +EM_LINESCROLL = (WM_USER+6) +EM_GETMODIFY = (WM_USER+8) +EM_SETMODIFY = (WM_USER+9) +EM_GETLINECOUNT = (WM_USER+10) +EM_LINEINDEX = (WM_USER+11) +EM_SETHANDLE = (WM_USER+12) +EM_GETHANDLE = (WM_USER+13) +EM_GETTHUMB = (WM_USER+14) +EM_LINELENGTH = (WM_USER+17) +EM_REPLACESEL = (WM_USER+18) +EM_SETFONT = (WM_USER+19) +EM_GETLINE = (WM_USER+20) +EM_LIMITTEXT = (WM_USER+21) +EM_CANUNDO = (WM_USER+22) +EM_UNDO = (WM_USER+23) +EM_FMTLINES = (WM_USER+24) +EM_LINEFROMCHAR = (WM_USER+25) +EM_SETWORDBREAK = (WM_USER+26) +EM_SETTABSTOPS = (WM_USER+27) +EM_SETPASSWORDCHAR = (WM_USER+28) +EM_EMPTYUNDOBUFFER = (WM_USER+29) +EM_MSGMAX = (WM_USER+30) + +ENDIF +; NOWINMESSAGES + + +; Edit Control Styles (low word) +ES_LEFT = 0000h +ES_CENTER = 0001h +ES_RIGHT = 0002h +ES_MULTILINE = 0004h +ES_UPPERCASE = 0008h +ES_LOWERCASE = 0010h +ES_PASSWORD = 0020h +ES_AUTOVSCROLL = 0040h +ES_AUTOHSCROLL = 0080h +ES_NOHIDESEL = 0100h +ES_OEMCONVERT = 0400h + +; Edit Control Notification Codes +EN_SETFOCUS = 0100 +EN_KILLFOCUS = 0200 +EN_CHANGE = 0300 +EN_UPDATE = 0400 +EN_ERRSPACE = 0500 +EN_MAXTEXT = 0501 +EN_HSCROLL = 0601 +EN_VSCROLL = 0602 + +IFNDEF NOWINMESSAGES + +; Button Control Messages +BM_GETCHECK = (WM_USER+0) +BM_SETCHECK = (WM_USER+1) +BM_GETSTATE = (WM_USER+2) +BM_SETSTATE = (WM_USER+3) +BM_SETSTYLE = (WM_USER+4) + +ENDIF +; NOWINMESSAGES + +; Button Control Styles (low word) +BS_PUSHBUTTON = 00h +BS_DEFPUSHBUTTON = 01h +BS_CHECKBOX = 02h +BS_AUTOCHECKBOX = 03h +BS_RADIOBUTTON = 04h +BS_3STATE = 05h +BS_AUTO3STATE = 06h +BS_GROUPBOX = 07h +BS_USERBUTTON = 08h +BS_AUTORADIOBUTTON = 09h +BS_PUSHBOX = 0Ah +BS_OWNERDRAW = 0Bh +BS_LEFTTEXT = 20h + +; User Button Notification Codes +BN_CLICKED = 0 +BN_PAINT = 1 +BN_HILITE = 2 +BN_UNHILITE = 3 +BN_DISABLE = 4 +BN_DOUBLECLICKED = 5 + +; Dialog Styles (low words) +DS_ABSALIGN = 01h +DS_SYSMODAL = 02h +DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */ +DS_SETFONT = 40h ;/* User specified font for Dlg controls */ +DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */ +DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */ + +IFNDEF NOWINMESSAGES + +; Dialog box messages +DM_GETDEFID = (WM_USER+0) +DM_SETDEFID = (WM_USER+1) + +ENDIF ;NOWINMESSAGES + +; Dialog Codes +DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */ +DLGC_WANTTAB = 0002h ; /* Control wants tab keys */ +DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */ +DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */ +DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */ +DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */ +DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */ +DLGC_RADIOBUTTON = 0040h ; /* Radio button */ +DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */ +DLGC_STATIC = 0100h ; /* Static item: don't include */ +DLGC_BUTTON = 2000h ; /* Button item: can be checked */ + +; Combo Box return Values +CB_OKAY = 0 +CB_ERR = (-1) +CB_ERRSPACE = (-2) + +; Combo Box Notification Codes +CBN_ERRSPACE = (-1) +CBN_SELCHANGE = 1 +CBN_DBLCLK = 2 +CBN_SETFOCUS = 3 +CBN_KILLFOCUS = 4 +CBN_EDITCHANGE = 5 +CBN_EDITUPDATE = 6 +CBN_DROPDOWN = 7 + +; Combo Box styles (low words) +CBS_SIMPLE = 0001h +CBS_DROPDOWN = 0002h +CBS_DROPDOWNLIST = 0003h +CBS_OWNERDRAWFIXED = 0010h +CBS_OWNERDRAWVARIABLE= 0020h +CBS_AUTOHSCROLL = 0040h +CBS_OEMCONVERT = 0080h +CBS_SORT = 0100h +CBS_HASSTRINGS = 0200h +CBS_NOINTEGRALHEIGHT = 0400h + +IFNDEF NOWINMESSAGES + +; Combo Box messages +CB_GETEDITSEL = (WM_USER+0) +CB_LIMITTEXT = (WM_USER+1) +CB_SETEDITSEL = (WM_USER+2) +CB_ADDSTRING = (WM_USER+3) +CB_DELETESTRING = (WM_USER+4) +CB_DIR = (WM_USER+5) +CB_GETCOUNT = (WM_USER+6) +CB_GETCURSEL = (WM_USER+7) +CB_GETLBTEXT = (WM_USER+8) +CB_GETLBTEXTLEN = (WM_USER+9) +CB_INSERTSTRING = (WM_USER+10) +CB_RESETCONTENT = (WM_USER+11) +CB_FINDSTRING = (WM_USER+12) +CB_SELECTSTRING = (WM_USER+13) +CB_SETCURSEL = (WM_USER+14) +CB_SHOWDROPDOWN = (WM_USER+15) +CB_GETITEMDATA = (WM_USER+16) +CB_SETITEMDATA = (WM_USER+17) +CB_GETDROPPEDCONTROLRECT = (WM_USER+18) +CB_MSGMAX = (WM_USER+19) + +ENDIF ; NOWINMESSAGES + +; Static Control styles (low word) +SS_LEFT = 00h +SS_CENTER = 01h +SS_RIGHT = 02h +SS_ICON = 03h +SS_BLACKRECT = 04h +SS_GRAYRECT = 05h +SS_WHITERECT = 06h +SS_BLACKFRAME = 07h +SS_GRAYFRAME = 08h +SS_WHITEFRAME = 09h +SS_USERITEM = 0Ah +SS_SIMPLE = 0Bh +SS_LEFTNOWORDWRAP = 0Ch +SS_NOPREFIX = 80h ; Don't do "&" character translation + +; Scroll Bar Styles (low word) +SBS_HORZ = 0000h +SBS_VERT = 0001h +SBS_TOPALIGN = 0002h +SBS_LEFTALIGN = 0002h +SBS_BOTTOMALIGN = 0004h +SBS_RIGHTALIGN = 0004h +SBS_SIZEBOXTOPLEFTALIGN = 0002h +SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h +SBS_SIZEBOX = 0008h + +IFNDEF NOSYSMETRICS + +; GetSystemMetrics() codes +SM_CXSCREEN = 0 +SM_CYSCREEN = 1 +SM_CXVSCROLL = 2 +SM_CYHSCROLL = 3 +SM_CYCAPTION = 4 +SM_CXBORDER = 5 +SM_CYBORDER = 6 +SM_CXDLGFRAME = 7 +SM_CYDLGFRAME = 8 +SM_CYVTHUMB = 9 +SM_CXHTHUMB = 10 +SM_CXICON = 11 +SM_CYICON = 12 +SM_CXCURSOR = 13 +SM_CYCURSOR = 14 +SM_CYMENU = 15 +SM_CXFULLSCREEN = 16 +SM_CYFULLSCREEN = 17 +SM_CYKANJIWINDOW = 18 +SM_MOUSEPRESENT = 19 +SM_CYVSCROLL = 20 +SM_CXHSCROLL = 21 +SM_DEBUG = 22 +SM_SWAPBUTTON = 23 +SM_RESERVED1 = 24 +SM_RESERVED2 = 25 +SM_RESERVED3 = 26 +SM_RESERVED4 = 27 +SM_CXMIN = 28 +SM_CYMIN = 29 +SM_CXSIZE = 30 +SM_CYSIZE = 31 +SM_CXFRAME = 32 +SM_CYFRAME = 33 +SM_CXMINTRACK = 34 +SM_CYMINTRACK = 35 +SM_CMETRICS = 36 + +ENDIF ;NOSYSMETRICS + +IFNDEF NOCOLOR + +COLOR_SCROLLBAR = 0 +COLOR_BACKGROUND = 1 +COLOR_ACTIVECAPTION = 2 +COLOR_INACTIVECAPTION = 3 +COLOR_MENU = 4 +COLOR_WINDOW = 5 +COLOR_WINDOWFRAME = 6 +COLOR_MENUTEXT = 7 +COLOR_WINDOWTEXT = 8 +COLOR_CAPTIONTEXT = 9 +COLOR_ACTIVEBORDER = 10 +COLOR_INACTIVEBORDER = 11 +COLOR_APPWORKSPACE = 12 +COLOR_HIGHLIGHT = 13 +COLOR_HIGHLIGHTTEXT = 14 +COLOR_BTNFACE = 15 +COLOR_BTNSHADOW = 16 +COLOR_GRAYTEXT = 17 +COLOR_BTNTEXT = 18 + +ENDIF ;NOCOLOR + +; Commands to pass WinHelp() +HELP_CONTEXT =0001h ;/* Display topic in ulTopic */ +HELP_QUIT =0002h ;/* Terminate help */ +HELP_INDEX =0003h ;/* Display index */ +HELP_HELPONHELP =0004h ;/* Display help on using help */ +HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */ +HELP_KEY =0101h ;/* Display topic for keyword in offabData */ + +IFNDEF NOCOMM + +NOPARITY = 0 +ODDPARITY = 1 +EVENPARITY = 2 +MARKPARITY = 3 +SPACEPARITY = 4 + +ONESTOPBIT = 0 +ONE5STOPBITS = 1 +TWOSTOPBITS = 2 + +IGNORE = 0 ; /* Ignore signal */ +INFINITE = 0FFFFh ; /* Infinite timeout */ + +; Error Flags +CE_RXOVER = 0001h ; /* Receive Queue overflow */ +CE_OVERRUN = 0002h ; /* Receive Overrun Error */ +CE_RXPARITY = 0004h ; /* Receive Parity Error */ +CE_FRAME = 0008h ; /* Receive Framing error */ +CE_BREAK = 0010h ; /* Break Detected */ +CE_CTSTO = 0020h ; /* CTS Timeout */ +CE_DSRTO = 0040h ; /* DSR Timeout */ +CE_RLSDTO = 0080h ; /* RLSD Timeout */ +CE_TXFULL = 0100h ; /* TX Queue is full */ +CE_PTO = 0200h ; /* LPTx Timeout */ +CE_IOE = 0400h ; /* LPTx I/O Error */ +CE_DNS = 0800h ; /* LPTx Device not selected */ +CE_OOP = 1000h ; /* LPTx Out-Of-Paper */ +CE_MODE = 8000h ; /* Requested mode unsupported */ + +IE_BADID = (-1) ; /* Invalid or unsupported id */ +IE_OPEN = (-2) ; /* Device Already Open */ +IE_NOPEN = (-3) ; /* Device Not Open */ +IE_MEMORY = (-4) ; /* Unable to allocate queues */ +IE_DEFAULT = (-5) ; /* Error in default parameters */ +IE_HARDWARE = (-10) ; /* Hardware Not Present */ +IE_BYTESIZE = (-11) ; /* Illegal Byte Size */ +IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */ + +; Events +EV_RXCHAR = 0001h ; /* Any Character received */ +EV_RXFLAG = 0002h ; /* Received certain character */ +EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */ +EV_CTS = 0008h ; /* CTS changed state */ +EV_DSR = 0010h ; /* DSR changed state */ +EV_RLSD = 0020h ; /* RLSD changed state */ +EV_BREAK = 0040h ; /* BREAK received */ +EV_ERR = 0080h ; /* Line status error occurred */ +EV_RING = 0100h ; /* Ring signal detected */ +EV_PERR = 0200h ; /* Printer error occured */ + +; Escape Functions +SETXOFF = 1 ; /* Simulate XOFF received */ +SETXON = 2 ; /* Simulate XON received */ +SETRTS = 3 ; /* Set RTS high */ +CLRRTS = 4 ; /* Set RTS low */ +SETDTR = 5 ; /* Set DTR high */ +CLRDTR = 6 ; /* Set DTR low */ +RESETDEV = 7 ; /* Reset device if possible */ + +LPTx = 80h ; /* Set if ID is for LPT device */ + +DCB struc + DCB_Id db ? ; /* Internal Device ID */ + DCB_BaudRate dw ? ; /* Baudrate at which runing */ + DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */ + DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */ + DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */ + DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */ + DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */ + DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */ + + DCB_BitMask1 db ? + + ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */ + ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */ + ; BYTE fParity: 1; /* Enable parity checking */ + ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */ + ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */ + ; BYTE fDummy: 2; /* Reserved */ + ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */ + + DCB_BitMask2 db ? + + ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */ + ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */ + ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */ + ; BYTE fNull: 1; /* Enable Null stripping */ + ; BYTE fChEvt: 1; /* Enable Rx character event. */ + ; BYTE fDtrflow: 1; /* DTR handshake on input */ + ; BYTE fRtsflow: 1; /* RTS handshake on input */ + ; BYTE fDummy2: 1; + + DCB_XonChar db ? ; /* Tx and Rx X-ON character */ + DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */ + DCB_XonLim dw ? ; /* Transmit X-ON threshold */ + DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */ + DCB_PeChar db ? ; /* Parity error replacement char */ + DCB_EofChar db ? ; /* End of Input character */ + DCB_EvtChar db ? ; /* Recieved Event character */ + DCB_TxDelay dw ? ; /* Amount of time between chars */ +DCB ends + +COMSTAT struc + COMS_BitMask1 db ? + +; BYTE fCtsHold: 1; /* Transmit is on CTS hold */ +; BYTE fDsrHold: 1; /* Transmit is on DSR hold */ +; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */ +; BYTE fXoffHold: 1; /* Received handshake */ +; BYTE fXoffSent: 1; /* Issued handshake */ +; BYTE fEof: 1; /* End of file character found */ +; BYTE fTxim: 1; /* Character being transmitted */ + + + COMS_cbInQue dw ? ; /* count of characters in Rx Queue */ + COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */ +COMSTAT ends + +ENDIF ;NOCOM diff --git a/private/oleauto/tools/win16/os2/inc/windowsx.h b/private/oleauto/tools/win16/os2/inc/windowsx.h new file mode 100644 index 000000000..ddbd5f393 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/windowsx.h @@ -0,0 +1,1212 @@ +/*****************************************************************************\ +* * +* windowsx.h - Macro APIs, window message crackers, and control APIs * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWSX +#define _INC_WINDOWSX + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** KERNEL Macro APIs ****************************************************/ + +#define GetInstanceModule(hInstance) \ + GetModuleHandle((LPCSTR)MAKELP(0, hInstance)) + +#define GlobalPtrHandle(lp) \ + ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp)))) + +#define GlobalLockPtr(lp) \ + ((BOOL)SELECTOROF(GlobalLock(GlobalPtrHandle(lp)))) +#define GlobalUnlockPtr(lp) \ + GlobalUnlock(GlobalPtrHandle(lp)) + +#define GlobalAllocPtr(flags, cb) \ + (GlobalLock(GlobalAlloc((flags), (cb)))) +#define GlobalReAllocPtr(lp, cbNew, flags) \ + (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) +#define GlobalFreePtr(lp) \ + (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) + +/****** GDI Macro APIs *******************************************************/ + +#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen)) +#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen))) +#define GetStockPen(i) ((HPEN)GetStockObject(i)) + +#define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr)) +#define SelectBrush(hdc, hbr) ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr))) +#define GetStockBrush(i) ((HBRUSH)GetStockObject(i)) + +#define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn)) + +#define CopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY) +#define IntersectRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_AND) +#define SubtractRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_DIFF) +#define UnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR) +#define XorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR) + +#define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal)) + +#define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont)) +#define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont))) +#define GetStockFont(i) ((HFONT)GetStockObject(i)) + +#define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm)) +#define SelectBitmap(hdc, hbm) ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm))) + +#define InsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy)) + +/****** USER Macro APIs ******************************************************/ + +#define GetWindowInstance(hwnd) ((HINSTANCE)GetWindowWord(hwnd, GWW_HINSTANCE)) + +#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE)) +#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE)) + +#define GetWindowOwner(hwnd) GetWindow(hwnd, GW_OWNER) + +#define GetFirstChild(hwnd) GetTopWindow(hwnd) +#define GetFirstSibling(hwnd) GetWindow(hwnd, GW_HWNDFIRST) +#define GetLastSibling(hwnd) GetWindow(hwnd, GW_HWNDLAST) +#define GetNextSibling(hwnd) GetWindow(hwnd, GW_HWNDNEXT) +#define GetPrevSibling(hwnd) GetWindow(hwnd, GW_HWNDPREV) + +#define GetWindowID(hwnd) GetDlgCtrlID(hwnd) + +#define SetWindowRedraw(hwnd, fRedraw) \ + ((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L)) + +#define SubclassWindow(hwnd, lpfn) \ + ((WNDPROC)SetWindowLong((hwnd), GWL_WNDPROC, (LPARAM)(WNDPROC)(lpfn))) + +#define IsMinimized(hwnd) IsIconic(hwnd) +#define IsMaximized(hwnd) IsZoomed(hwnd) +#define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0L) + +#define SetWindowFont(hwnd, hfont, fRedraw) FORWARD_WM_SETFONT((hwnd), (hfont), (fRedraw), SendMessage) + +#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd), SendMessage) + +#if (WINVER >= 0x030a) +#define MapWindowRect(hwndFrom, hwndTo, lprc) \ + MapWindowPoints((hwndFrom), (hwndTo), (POINT FAR*)(lprc), 2) +#endif /* WINVER >= 0x030a */ + +#define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0) +#define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0) +#define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0) + +#define SubclassDialog(hwndDlg, lpfn) \ + ((DLGPROC)SetWindowLong(hwndDlg, DWL_DLGPROC, (LPARAM)(DLGPROC)(lpfn))) + +#define SetDlgMsgResult(hwnd, msg, result) \ + (((msg) == WM_CTLCOLOR || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || \ + (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG) \ + ? (BOOL)LOWORD(result) : (SetWindowLong((hwnd), DWL_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE)) + +#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \ + (*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam)) + +#define CheckDefDlgRecursion(pfRecursion) \ + if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; } + +/****** Message crackers ****************************************************/ + +#define HANDLE_MSG(hwnd, message, fn) \ + case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) + +/* void Cls_OnCompacting(HWND hwnd, UINT compactRatio); */ +#define HANDLE_WM_COMPACTING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_COMPACTING(hwnd, compactRatio, fn) \ + (void)(fn)((hwnd), WM_COMPACTING, (WPARAM)(UINT)(compactRatio), 0L) + +/* void Cls_OnWinIniChange(HWND hwnd, LPCSTR lpszSectionName); */ +#define HANDLE_WM_WININICHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_WININICHANGE(hwnd, lpszSectionName, fn) \ + (void)(fn)((hwnd), WM_WININICHANGE, 0, (LPARAM)(LPCSTR)(lpszSectionName)) + +/* void Cls_OnSysColorChange(HWND hwnd); */ +#define HANDLE_WM_SYSCOLORCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_SYSCOLORCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_SYSCOLORCHANGE, 0, 0L) + +/* BOOL Cls_OnQueryNewPalette(HWND hwnd); */ +#define HANDLE_WM_QUERYNEWPALETTE(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYNEWPALETTE(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYNEWPALETTE, 0, 0L) + +/* void Cls_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTEISCHANGING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTEISCHANGING(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTEISCHANGING, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTECHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTECHANGED(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTECHANGED, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnFontChange(HWND hwnd); */ +#define HANDLE_WM_FONTCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_FONTCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_FONTCHANGE, 0, 0L) + +/* void Cls_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue); */ +#define HANDLE_WM_SPOOLERSTATUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SPOOLERSTATUS(hwnd, status, cJobInQueue, fn) \ + (void)(fn)((hwnd), WM_SPOOLERSTATUS, (WPARAM)(status), MAKELPARAM((UINT)(cJobInQueue), 0)) + +/* void Cls_OnDevModeChange(HWND hwnd, LPCSTR lpszDeviceName); */ +#define HANDLE_WM_DEVMODECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_DEVMODECHANGE(hwnd, lpszDeviceName, fn) \ + (void)(fn)((hwnd), WM_DEVMODECHANGE, 0,(LPARAM)(LPCSTR)(lpszDeviceName)) + +/* void Cls_OnTimeChange(HWND hwnd); */ +#define HANDLE_WM_TIMECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_TIMECHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_TIMECHANGE, 0, 0L) + +/* void Cls_OnPower(HWND hwnd, int code); */ +#define HANDLE_WM_POWER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_POWER(hwnd, code, fn) \ + (void)(fn)((hwnd), WM_POWER, (WPARAM)(code), 0L) + +/* BOOL Cls_OnQueryEndSession(HWND hwnd); */ +#define HANDLE_WM_QUERYENDSESSION(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYENDSESSION(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYENDSESSION, 0, 0L) + +/* void Cls_OnEndSession(HWND hwnd, BOOL fEnding); */ +#define HANDLE_WM_ENDSESSION(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENDSESSION(hwnd, fEnding, fn) \ + (void)(fn)((hwnd), WM_ENDSESSION, (WPARAM)(BOOL)(fEnding), 0L) + +/* void Cls_OnQuit(HWND hwnd, int exitCode); */ +#define HANDLE_WM_QUIT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_QUIT(hwnd, exitCode, fn) \ + (void)(fn)((hwnd), WM_QUIT, (WPARAM)(exitCode), 0L) + +/* void Cls_OnSystemError(HWND hwnd, int errCode); */ +#define HANDLE_WM_SYSTEMERROR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_SYSTEMERROR(hwnd, errCode, fn) \ + (void)(fn)((hwnd), WM_SYSTEMERROR, (WPARAM)(errCode), 0L) + +/* BOOL Cls_OnCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_CREATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) ? 0L : (LRESULT)-1L) +#define FORWARD_WM_CREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_CREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* BOOL Cls_OnNCCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_NCCREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_NCCREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCCREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* void Cls_OnDestroy(HWND hwnd); */ +#define HANDLE_WM_DESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROY, 0, 0L) + +/* void Cls_OnNCDestroy(HWND hwnd); */ +#define HANDLE_WM_NCDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_NCDESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_NCDESTROY, 0, 0L) + +/* void Cls_OnShowWindow(HWND hwnd, BOOL fShow, UINT status); */ +#define HANDLE_WM_SHOWWINDOW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_SHOWWINDOW(hwnd, fShow, status, fn) \ + (void)(fn)((hwnd), WM_SHOWWINDOW, (WPARAM)(BOOL)(fShow), MAKELPARAM((UINT)(status), 0)) + +/* void Cls_OnSetRedraw(HWND hwnd, BOOL fRedraw); */ +#define HANDLE_WM_SETREDRAW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_SETREDRAW(hwnd, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETREDRAW, (WPARAM)(fRedraw), 0L) + +/* void Cls_OnEnable(HWND hwnd, BOOL fEnable); */ +#define HANDLE_WM_ENABLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENABLE(hwnd, fEnable, fn) \ + (void)(fn)((hwnd), WM_ENABLE, (WPARAM)(BOOL)(fEnable), 0L) + +/* void Cls_OnSetText(HWND hwnd, LPCSTR lpszText); */ +#define HANDLE_WM_SETTEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_SETTEXT(hwnd, lpszText, fn) \ + (void)(fn)((hwnd), WM_SETTEXT, 0, (LPARAM)(LPCSTR)(lpszText)) + +/* INT Cls_OnGetText(HWND hwnd, int cchTextMax, LPSTR lpszText) */ +#define HANDLE_WM_GETTEXT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (int)(wParam), (LPSTR)(lParam)) +#define FORWARD_WM_GETTEXT(hwnd, cchTextMax, lpszText, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXT, (WPARAM)(int)(cchTextMax), (LPARAM)(LPSTR)(lpszText)) + +/* INT Cls_OnGetTextLength(HWND hwnd); */ +#define HANDLE_WM_GETTEXTLENGTH(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)(hwnd) +#define FORWARD_WM_GETTEXTLENGTH(hwnd, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXTLENGTH, 0, 0L) + +/* BOOL Cls_OnWindowPosChanging(HWND hwnd, WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (WINDOWPOS FAR*)(lParam)) +#define FORWARD_WM_WINDOWPOSCHANGING(hwnd, lpwpos, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_WINDOWPOSCHANGING, 0, (LPARAM)(WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnWindowPosChanged(HWND hwnd, const WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const WINDOWPOS FAR*)(lParam)), 0L) +#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn) \ + (void)(fn)((hwnd), WM_WINDOWPOSCHANGED, 0, (LPARAM)(const WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnMove(HWND hwnd, int x, int y); */ +#define HANDLE_WM_MOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_MOVE(hwnd, x, y, fn) \ + (void)(fn)((hwnd), WM_MOVE, 0, MAKELPARAM((int)(x), (int)(y))) + +/* void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy); */ +#define HANDLE_WM_SIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SIZE(hwnd, state, cx, cy, fn) \ + (void)(fn)((hwnd), WM_SIZE, (WPARAM)(UINT)(state), MAKELPARAM((int)(cx), (int)(cy))) + +/* void Cls_OnClose(HWND hwnd); */ +#define HANDLE_WM_CLOSE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLOSE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLOSE, 0, 0L) + +/* BOOL Cls_OnQueryOpen(HWND hwnd); */ +#define HANDLE_WM_QUERYOPEN(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYOPEN(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYOPEN, 0, 0L) + +/* void Cls_OnGetMinMaxInfo(HWND hwnd, MINMAXINFO FAR* lpMinMaxInfo); */ +#define HANDLE_WM_GETMINMAXINFO(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MINMAXINFO FAR*)(lParam)), 0L) +#define FORWARD_WM_GETMINMAXINFO(hwnd, lpMinMaxInfo, fn) \ + (void)(fn)((hwnd), WM_GETMINMAXINFO, 0, (LPARAM)(MINMAXINFO FAR*)(lpMinMaxInfo)) + +/* void Cls_OnPaint(HWND hwnd); */ +#define HANDLE_WM_PAINT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PAINT(hwnd, fn) \ + (void)(fn)((hwnd), WM_PAINT, 0, 0L) + +/* BOOL Cls_OnEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* BOOL Cls_OnIconEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ICONERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ICONERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ICONERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* void Cls_OnNCPaint(HWND hwnd, HRGN hrgn); */ +#define HANDLE_WM_NCPAINT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HRGN)(wParam)), 0L) +#define FORWARD_WM_NCPAINT(hwnd, hrgn, fn) \ + (void)(fn)((hwnd), WM_NCPAINT, (WPARAM)(HRGN)(hrgn), 0L) + +/* UINT Cls_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS FAR* lpcsp) */ +#define HANDLE_WM_NCCALCSIZE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (NCCALCSIZE_PARAMS FAR*)(lParam)) +#define FORWARD_WM_NCCALCSIZE(hwnd, fCalcValidRects, lpcsp, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCCALCSIZE, (WPARAM)(fCalcValidRects), (LPARAM)(NCCALCSIZE_PARAMS FAR*)(lpcsp)) + +/* UINT Cls_OnNCHitTest(HWND hwnd, int x, int y); */ +#define HANDLE_WM_NCHITTEST(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCHITTEST, 0, MAKELPARAM((int)(x), (int)(y))) + +/* HICON Cls_OnQueryDragIcon(HWND hwnd); */ +#define HANDLE_WM_QUERYDRAGICON(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_QUERYDRAGICON(hwnd, fn) \ + (HICON)(UINT)(DWORD)(fn)((hwnd), WM_QUERYDRAGICON, 0, 0L) + +#ifdef _INC_SHELLAPI +/* void Cls_OnDropFiles(HWND hwnd, HDROP hdrop); */ +#define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HDROP)(wParam)), 0L) +#define FORWARD_WM_DROPFILES(hwnd, hdrop, fn) \ + (void)(fn)((hwnd), WM_DROPFILES, (WPARAM)(hdrop), 0L) +#endif /* _INC_SHELLAPI */ + +/* void Cls_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_ACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATE(hwnd, state, hwndActDeact, fMinimized, fn) \ + (void)(fn)((hwnd), WM_ACTIVATE, (WPARAM)(UINT)(state), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnActivateApp(HWND hwnd, BOOL fActivate, HTASK htaskActDeact); */ +#define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HTASK)LOWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATEAPP(hwnd, fActivate, htaskActDeact, fn) \ + (void)(fn)((hwnd), WM_ACTIVATEAPP, (WPARAM)(BOOL)(fActivate), MAKELPARAM((htaskActDeact),0)) + +/* BOOL Cls_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_NCACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)) +#define FORWARD_WM_NCACTIVATE(hwnd, fActive, hwndActDeact, fMinimized, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCACTIVATE, (WPARAM)(BOOL)(fActive), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnSetFocus(HWND hwnd, HWND hwndOldFocus) */ +#define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_SETFOCUS(hwnd, hwndOldFocus, fn) \ + (void)(fn)((hwnd), WM_SETFOCUS, (WPARAM)(HWND)(hwndOldFocus), 0L) + +/* void Cls_OnKillFocus(HWND hwnd, HWND hwndNewFocus); */ +#define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_KILLFOCUS(hwnd, hwndNewFocus, fn) \ + (void)(fn)((hwnd), WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_CHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_DEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_DEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnSysDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSDEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSDEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MOUSEMOVE(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MOUSEMOVE, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnRButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_RBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnMButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMOUSEMOVE(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMOUSEMOVE, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCLBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCRBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* int Cls_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_MOUSEACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)) +#define FORWARD_WM_MOUSEACTIVATE(hwnd, hwndTopLevel, codeHitTest, msg, fn) \ + (int)(DWORD)(fn)((hwnd), WM_MOUSEACTIVATE, (WPARAM)(HWND)(hwndTopLevel), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnCancelMode(HWND hwnd); */ +#define HANDLE_WM_CANCELMODE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CANCELMODE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CANCELMODE, 0, 0L) + +/* void Cls_OnTimer(HWND hwnd, UINT id); */ +#define HANDLE_WM_TIMER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_TIMER(hwnd, id, fn) \ + (void)(fn)((hwnd), WM_TIMER, (WPARAM)(UINT)(id), 0L) + +/* void Cls_OnInitMenu(HWND hwnd, HMENU hMenu); */ +#define HANDLE_WM_INITMENU(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam)), 0L) +#define FORWARD_WM_INITMENU(hwnd, hMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENU, (WPARAM)(HMENU)(hMenu), 0L) + +/* void Cls_OnInitMenuPopup(HWND hwnd, HMENU hMenu, int item, BOOL fSystemMenu); */ +#define HANDLE_WM_INITMENUPOPUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam), (int)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_INITMENUPOPUP(hwnd, hMenu, item, fSystemMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENUPOPUP, (WPARAM)(HMENU)(hMenu), MAKELPARAM((item),(fSystemMenu))) + +/* void Cls_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags); */ +#define HANDLE_WM_MENUSELECT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)HIWORD(lParam), (LOWORD(lParam) & MF_POPUP) ? 0 : (int)(wParam), \ + (LOWORD(lParam) & MF_POPUP) ? (HMENU)(wParam) : 0, LOWORD(lParam)), 0L) +#define FORWARD_WM_MENUSELECT(hwnd, hmenu, item, hmenuPopup, flags, fn) \ + (void)(fn)((hwnd), WM_MENUSELECT, ((flags) & MF_POPUP) ? (WPARAM)(HMENU)(hmenuPopup) : (WPARAM)(int)(item), MAKELPARAM((flags), (hmenu))) + +/* DWORD Cls_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu); */ +#define HANDLE_WM_MENUCHAR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam), LOWORD(lParam), (HMENU)HIWORD(lParam)); +#define FORWARD_WM_MENUCHAR(hwnd, ch, flags, hmenu, fn) \ + (DWORD)(fn)((hwnd), WM_MENUCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((flags), (UINT)(hmenu))) + +/* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify); */ +#define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \ + (void)(fn)((hwnd), WM_COMMAND, (WPARAM)(int)(id), MAKELPARAM((UINT)(hwndCtl), (codeNotify))) + +/* void Cls_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnCut(HWND hwnd); */ +#define HANDLE_WM_CUT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CUT(hwnd, fn) \ + (void)(fn)((hwnd), WM_CUT, 0, 0L) + +/* void Cls_OnCopy(HWND hwnd); */ +#define HANDLE_WM_COPY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_COPY(hwnd, fn) \ + (void)(fn)((hwnd), WM_COPY, 0, 0L) + +/* void Cls_OnPaste(HWND hwnd); */ +#define HANDLE_WM_PASTE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PASTE(hwnd, fn) \ + (void)(fn)((hwnd), WM_PASTE, 0, 0L) + +/* void Cls_OnClear(HWND hwnd); */ +#define HANDLE_WM_CLEAR(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLEAR(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLEAR, 0, 0L) + +/* void Cls_OnUndo(HWND hwnd); */ +#define HANDLE_WM_UNDO(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_UNDO(hwnd, fn) \ + (void)(fn)((hwnd), WM_UNDO, 0, 0L) + +/* HANDLE Cls_OnRenderFormat(HWND hwnd, UINT fmt); */ +#define HANDLE_WM_RENDERFORMAT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HANDLE)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_RENDERFORMAT(hwnd, fmt, fn) \ + (HANDLE)(UINT)(DWORD)(fn)((hwnd), WM_RENDERFORMAT, (WPARAM)(UINT)(fmt), 0L) + +/* void Cls_OnRenderAllFormats(HWND hwnd); */ +#define HANDLE_WM_RENDERALLFORMATS(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_RENDERALLFORMATS(hwnd, fn) \ + (void)(fn)((hwnd), WM_RENDERALLFORMATS, 0, 0L) + +/* void Cls_OnDestroyClipboard(HWND hwnd); */ +#define HANDLE_WM_DESTROYCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROYCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROYCLIPBOARD, 0, 0L) + +/* void Cls_OnDrawClipboard(HWND hwnd); */ +#define HANDLE_WM_DRAWCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DRAWCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DRAWCLIPBOARD, 0, 0L) + +/* void Cls_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const PAINTSTRUCT FAR* lpPaintStruct) */ +#define HANDLE_WM_PAINTCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const PAINTSTRUCT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_PAINTCLIPBOARD(hwnd, hwndCBViewer, lpPaintStruct, fn) \ + (void)(fn)((hwnd), WM_PAINTCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lpPaintStruct)) + +/* void Cls_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const RECT FAR* lprc); */ +#define HANDLE_WM_SIZECLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const RECT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SIZECLIPBOARD(hwnd, hwndCBViewer, lprc, fn) \ + (void)(fn)((hwnd), WM_SIZECLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lprc)) + +/* void Cls_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_VSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_HSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnAskCBFormatName(HWND hwnd, int cchMax, LPSTR rgchName); */ +#define HANDLE_WM_ASKCBFORMATNAME(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (LPSTR)(lParam)), 0L) +#define FORWARD_WM_ASKCBFORMATNAME(hwnd, cchMax, rgchName, fn) \ + (void)(fn)((hwnd), WM_ASKCBFORMATNAME, (WPARAM)(int)(cchMax), (LPARAM)(rgchName)) + +/* void Cls_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext); */ +#define HANDLE_WM_CHANGECBCHAIN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHANGECBCHAIN(hwnd, hwndRemove, hwndNext, fn) \ + (void)(fn)((hwnd), WM_CHANGECBCHAIN, (WPARAM)(HWND)(hwndRemove), MAKELPARAM((UINT)(hwndNext), 0)) + +/* BOOL Cls_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_SETCURSOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); +#define FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_SETCURSOR, (WPARAM)(HWND)(hwndCursor), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnSysCommand(HWND hwnd, UINT cmd, int x, int y); */ +#define HANDLE_WM_SYSCOMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSCOMMAND(hwnd, cmd, x, y, fn) \ + (void)(fn)((hwnd), WM_SYSCOMMAND, (WPARAM)(UINT)(cmd), MAKELPARAM((x), (y))) + +/* HWND Cls_MDICreate(HWND hwnd, const MDICREATESTRUCT FAR* lpmcs); */ +#define HANDLE_WM_MDICREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (MDICREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_MDICREATE(hwnd, lpmcs, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDICREATE, 0, (LPARAM)(lpmcs)) + +/* void Cls_MDIDestroy(HWND hwnd, HWND hwndDestroy); */ +#define HANDLE_WM_MDIDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIDESTROY(hwnd, hwndDestroy, fn) \ + (void)(fn)((hwnd), WM_MDIDESTROY, (WPARAM)(hwndDestroy), 0L) + +/* NOTE: Usable only by MDI client windows */ +/* void Cls_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate); */ +#define HANDLE_WM_MDIACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (HWND)HIWORD(lParam)), 0L) +#define FORWARD_WM_MDIACTIVATE(hwnd, fActive, hwndActivate, hwndDeactivate, fn) \ + (void)(fn)(hwnd, WM_MDIACTIVATE, (WPARAM)(fActive), MAKELPARAM((hwndActivate), (hwndDeactivate))) + +/* void Cls_MDIRestore(HWND hwnd, HWND hwndRestore); */ +#define HANDLE_WM_MDIRESTORE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIRESTORE(hwnd, hwndRestore, fn) \ + (void)(fn)((hwnd), WM_MDIRESTORE, (WPARAM)(hwndRestore), 0L) + +/* HWND Cls_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev); */ +#define HANDLE_WM_MDINEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_MDINEXT(hwnd, hwndCur, fPrev, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDINEXT, (WPARAM)(hwndCur), MAKELPARAM((fPrev), 0)) + +/* void Cls_MDIMaximize(HWND hwnd, HWND hwndMaximize); */ +#define HANDLE_WM_MDIMAXIMIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIMAXIMIZE(hwnd, hwndMaximize, fn) \ + (void)(fn)((hwnd), WM_MDIMAXIMIZE, (WPARAM)(hwndMaximize), 0L) + +/* BOOL Cls_MDITile(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDITILE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDITILE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDITILE, (WPARAM)(cmd), 0L) + +/* BOOL Cls_MDICascade(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDICASCADE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDICASCADE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDICASCADE, (WPARAM)(cmd), 0L) + +/* void Cls_MDIIconArrange(HWND hwnd); */ +#define HANDLE_WM_MDIICONARRANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_MDIICONARRANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_MDIICONARRANGE, 0, 0L) + +/* HWND Cls_MDIGetActive(HWND hwnd); */ +#define HANDLE_WM_MDIGETACTIVE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_MDIGETACTIVE(hwnd, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDIGETACTIVE, 0, 0L) + +/* HMENU Cls_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow); */ +#define HANDLE_WM_MDISETMENU(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (HMENU)LOWORD(lParam), (HMENU)HIWORD(lParam)) +#define FORWARD_WM_MDISETMENU(hwnd, fRefresh, hmenuFrame, hmenuWindow, fn) \ + (HMENU)(UINT)(DWORD)(fn)((hwnd), WM_MDISETMENU, (WPARAM)(fRefresh), MAKELPARAM((hmenuFrame), (hmenuWindow))) + +/* void Cls_OnChildActivate(HWND hwnd); */ +#define HANDLE_WM_CHILDACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CHILDACTIVATE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CHILDACTIVATE, 0, 0L) + +/* BOOL Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam); */ +#define HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd), (HWND)(wParam), lParam); +#define FORWARD_WM_INITDIALOG(hwnd, hwndFocus, lParam, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_INITDIALOG, (WPARAM)(HWND)(hwndFocus), (lParam)) + +/* HWND Cls_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext) */ +#define HANDLE_WM_NEXTDLGCTL(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)) +#define FORWARD_WM_NEXTDLGCTL(hwnd, hwndSetFocus, fNext, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_NEXTDLGCTL, (WPARAM)(HWND)(hwndSetFocus), MAKELPARAM((fNext), 0)) + +/* void Cls_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild); */ +#define HANDLE_WM_PARENTNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_PARENTNOTIFY(hwnd, msg, hwndChild, idChild, fn) \ + (void)(fn)((hwnd), WM_PARENTNOTIFY, (WPARAM)(UINT)(msg), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(idChild))) + +/* void Cls_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource); */ +#define HANDLE_WM_ENTERIDLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_ENTERIDLE(hwnd, source, hwndSource, fn) \ + (void)(fn)((hwnd), WM_ENTERIDLE, (WPARAM)(UINT)(source), MAKELPARAM((UINT)(HWND)(hwndSource), 0)) + +/* UINT Cls_OnGetDlgCode(HWND hwnd, MSG FAR* lpmsg); */ +#define HANDLE_WM_GETDLGCODE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd, (MSG FAR*)(lParam)) +#define FORWARD_WM_GETDLGCODE(hwnd, lpmsg, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_GETDLGCODE, (SELECTOROF(lpmsg) ? lpmsg->wParam : 0), (LPARAM)(lpmsg)) + +/* HBRUSH Cls_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type); */ +#define HANDLE_WM_CTLCOLOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)LOWORD(lParam), (int)(HIWORD(lParam))) +#define FORWARD_WM_CTLCOLOR(hwnd, hdc, hwndChild, type, fn) \ + (HBRUSH)(UINT)(DWORD)(fn)((hwnd), WM_CTLCOLOR, (WPARAM)(HDC)(hdc), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(int)(type))) + +/* void Cls_OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw); */ +#define HANDLE_WM_SETFONT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HFONT)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SETFONT(hwnd, hfont, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETFONT, (WPARAM)(HFONT)(hfont), MAKELPARAM((UINT)(BOOL)(fRedraw), 0)) + +/* HFONT Cls_OnGetFont(HWND hwnd); */ +#define HANDLE_WM_GETFONT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HFONT)(fn)(hwnd) +#define FORWARD_WM_GETFONT(hwnd, fn) \ + (HFONT)(UINT)(DWORD)(fn)((hwnd), WM_GETFONT, 0, 0L) + +/* void Cls_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT FAR* lpDrawItem); */ +#define HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DRAWITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \ + (void)(fn)((hwnd), WM_DRAWITEM, 0, (LPARAM)(const DRAWITEMSTRUCT FAR*)(lpDrawItem)) + +/* void Cls_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT FAR* lpMeasureItem); */ +#define HANDLE_WM_MEASUREITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MEASUREITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_MEASUREITEM(hwnd, lpMeasureItem, fn) \ + (void)(fn)((hwnd), WM_MEASUREITEM, 0, (LPARAM)(MEASUREITEMSTRUCT FAR*)(lpMeasureItem)) + +/* void Cls_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT FAR* lpDeleteItem) */ +#define HANDLE_WM_DELETEITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DELETEITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DELETEITEM(hwnd, lpDeleteItem, fn) \ + (void)(fn)((hwnd), WM_DELETEITEM, 0, (LPARAM)(const DELETEITEMSTRUCT FAR*)(lpDeleteItem)) + +/* int Cls_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT FAR* lpCompareItem); */ +#define HANDLE_WM_COMPAREITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (const COMPAREITEMSTRUCT FAR*)(lParam)) +#define FORWARD_WM_COMPAREITEM(hwnd, lpCompareItem, fn) \ + (int)(DWORD)(fn)((hwnd), WM_COMPAREITEM, 0, (LPARAM)(const COMPAREITEMSTRUCT FAR*)(lpCompareItem)) + +/* int Cls_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_VKEYTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_VKEYTOITEM(hwnd, vk, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_VKEYTOITEM, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* int Cls_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_CHARTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_CHARTOITEM(hwnd, ch, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_CHARTOITEM, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* void Cls_OnQueueSync(HWND hwnd); */ +#define HANDLE_WM_QUEUESYNC(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_QUEUESYNC(hwnd, fn) \ + (void)(fn)((hwnd), WM_QUEUESYNC, 0, 0L) + +/* void Cls_OnCommNotify(HWND hwnd, int cid, UINT flags); */ +#define HANDLE_WM_COMMNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_COMMNOTIFY(hwnd, cid, flags, fn) \ + (void)(fn)((hwnd), WM_COMMNOTIFY, (WPARAM)(cid), MAKELPARAM((flags), 0)) + +/****** Static control message APIs ******************************************/ + +#define Static_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Static_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Static_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Static_SetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_SETICON, (WPARAM)(HICON)(hIcon), 0L)) +#define Static_GetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_GETICON, 0, 0L)) + +/****** Button control message APIs ******************************************/ + +#define Button_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Button_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Button_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETCHECK, 0, 0L)) +#define Button_SetCheck(hwndCtl, check) ((void)SendMessage((hwndCtl), BM_SETCHECK, (WPARAM)(int)(check), 0L)) + +#define Button_GetState(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETSTATE, 0, 0L)) +#define Button_SetState(hwndCtl, state) ((UINT)(DWORD)SendMessage((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L)) + +#define Button_SetStyle(hwndCtl, style, fRedraw) ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0))) + +/****** Edit control message APIs ********************************************/ + +#define Edit_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Edit_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Edit_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Edit_LimitText(hwndCtl, cchMax) ((void)SendMessage((hwndCtl), EM_LIMITTEXT, (WPARAM)(cchMax), 0L)) + +#define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINECOUNT, 0, 0L)) +#define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((int FAR*)(lpch)) = (cchMax)), ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPSTR)(lpch)))) + +#define Edit_GetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_GETRECT, 0, (LPARAM)(RECT FAR*)(lprc))) +#define Edit_SetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECT, 0, (LPARAM)(const RECT FAR*)(lprc))) +#define Edit_SetRectNoPaint(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECTNP, 0, (LPARAM)(const RECT FAR*)(lprc))) + +#define Edit_GetSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), EM_GETSEL, 0, 0L)) +#define Edit_SetSel(hwndCtl, ichStart, ichEnd) ((void)SendMessage((hwndCtl), EM_SETSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) +#define Edit_ReplaceSel(hwndCtl, lpszReplace) ((void)SendMessage((hwndCtl), EM_REPLACESEL, 0, (LPARAM)(LPCSTR)(lpszReplace))) + +#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_GETMODIFY, 0, 0L)) +#define Edit_SetModify(hwndCtl, fModified) ((void)SendMessage((hwndCtl), EM_SETMODIFY, (WPARAM)(UINT)(fModified), 0L)) + +#define Edit_LineFromChar(hwndCtl, ich) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEFROMCHAR, (WPARAM)(int)(ich), 0L)) +#define Edit_LineIndex(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEINDEX, (WPARAM)(int)(line), 0L)) +#define Edit_LineLength(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINELENGTH, (WPARAM)(int)(line), 0L)) + +#define Edit_Scroll(hwndCtl, dv, dh) ((void)SendMessage((hwndCtl), EM_LINESCROLL, 0, MAKELPARAM((dv), (dh)))) + +#define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_CANUNDO, 0, 0L)) +#define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_UNDO, 0, 0L)) +#define Edit_EmptyUndoBuffer(hwndCtl) ((void)SendMessage((hwndCtl), EM_EMPTYUNDOBUFFER, 0, 0L)) + +#define Edit_SetPasswordChar(hwndCtl, ch) ((void)SendMessage((hwndCtl), EM_SETPASSWORDCHAR, (WPARAM)(UINT)(ch), 0L)) + +#define Edit_SetTabStops(hwndCtl, cTabs, lpTabs) ((void)SendMessage((hwndCtl), EM_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(const int FAR*)(lpTabs))) + +#define Edit_FmtLines(hwndCtl, fAddEOL) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_FMTLINES, (WPARAM)(BOOL)(fAddEOL), 0L)) + +#define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl), EM_GETHANDLE, 0, 0L)) +#define Edit_SetHandle(hwndCtl, h) ((void)SendMessage((hwndCtl), EM_SETHANDLE, (WPARAM)(UINT)(HLOCAL)(h), 0L)) + +#if (WINVER >= 0x030a) +#define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETFIRSTVISIBLELINE, 0, 0L)) + +#define Edit_SetReadOnly(hwndCtl, fReadOnly) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_SETREADONLY, (WPARAM)(BOOL)(fReadOnly), 0L)) + +#define Edit_GetPasswordChar(hwndCtl) ((char)(DWORD)SendMessage((hwndCtl), EM_GETPASSWORDCHAR, 0, 0L)) + +#define Edit_SetWordBreakProc(hwndCtl, lpfnWordBreak) ((void)SendMessage((hwndCtl), EM_SETWORDBREAKPROC, 0, (LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak))) +#define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SendMessage((hwndCtl), EM_GETWORDBREAKPROC, 0, 0L)) +#endif /* WINVER >= 0x030a */ + +/****** ScrollBar control message APIs ***************************************/ + +/* NOTE: flags parameter is a collection of ESB_* values, NOT a boolean! */ +#define ScrollBar_Enable(hwndCtl, flags) EnableScrollBar((hwndCtl), SB_CTL, (flags)) + +#define ScrollBar_Show(hwndCtl, fShow) ShowWindow((hwndCtl), (fShow) ? SW_SHOWNORMAL : SW_HIDE) + +#define ScrollBar_SetPos(hwndCtl, pos, fRedraw) SetScrollPos((hwndCtl), SB_CTL, (pos), (fRedraw)) +#define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl), SB_CTL) + +#define ScrollBar_SetRange(hwndCtl, posMin, posMax, fRedraw) SetScrollRange((hwndCtl), SB_CTL, (posMin), (posMax), (fRedraw)) +#define ScrollBar_GetRange(hwndCtl, lpposMin, lpposMax) GetScrollRange((hwndCtl), SB_CTL, (lpposMin), (lpposMax)) + +/****** ListBox control message APIs *****************************************/ + +#define ListBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ListBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCOUNT, 0, 0L)) +#define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_RESETCONTENT, 0, 0L)) + +#define ListBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ListBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ListBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(data))) +#define ListBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ListBox_GetTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ListBox_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ListBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ListBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETSEL, (WPARAM)(BOOL)(fSelect), MAKELPARAM((index), 0))) +#define ListBox_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SendMessage((hwndCtl), LB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last)))) + +#define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCURSEL, 0, 0L)) +#define ListBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ListBox_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_GetSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSEL, (WPARAM)(int)(index), 0L)) +#define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0, 0L)) +#define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTOPINDEX, 0, 0L)) +#define ListBox_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int FAR*)(lpItems))) + +#define ListBox_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SendMessage((hwndCtl), LB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L)) + +#define ListBox_SetColumnWidth(hwndCtl, cxColumn) ((void)SendMessage((hwndCtl), LB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L)) +#define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0, 0L)) +#define ListBox_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SendMessage((hwndCtl), LB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L)) + +#define ListBox_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int FAR*)(lpTabs))) + +#define ListBox_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT FAR*)(lprc))) + +#define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L)) +#define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCARETINDEX, 0, 0L)) + +#define ListBox_SetAnchorIndex(hwndCtl, index) ((void)SendMessage((hwndCtl), LB_SETANCHORINDEX, (WPARAM)(int)(index), 0L)) /* ;Internal */ +#define ListBox_GetAnchorIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETANCHORINDEX, 0, 0L)) /* ;Internal */ + +#if (WINVER >= 0x030a) +#define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0))) +#define ListBox_GetItemHeight(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L)) +#endif /* WINVER >= 0x030a */ + +#define ListBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), LB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) +#define ListBox_AddFile(hwndCtl, lpszFilename) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDFILE, 0, (LPARAM)(LPCSTR)(lpszFilename))) /* ;Internal */ + +/****** ComboBox control message APIs ****************************************/ + +#define ComboBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ComboBox_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define ComboBox_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define ComboBox_LimitText(hwndCtl, cchLimit) ((int)(DWORD)SendMessage((hwndCtl), CB_LIMITTEXT, (WPARAM)(int)(cchLimit), 0L)) + +#define ComboBox_GetEditSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), CB_GETEDITSEL, 0, 0L)) +#define ComboBox_SetEditSel(hwndCtl, ichStart, ichEnd) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEDITSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) + +#define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCOUNT, 0, 0L)) +#define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_RESETCONTENT, 0, 0L)) + +#define ComboBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ComboBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ComboBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(data))) +#define ComboBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetLBTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ComboBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), CB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ComboBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ComboBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCURSEL, 0, 0L)) +#define ComboBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ComboBox_SelectString(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszSelect))) +#define ComboBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), CB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +#define ComboBox_ShowDropdown(hwndCtl, fShow) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_SHOWDROPDOWN, (WPARAM)(BOOL)(fShow), 0L)) + +#if (WINVER >= 0x030a) +#define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_GETDROPPEDSTATE, 0, 0L)) +#define ComboBox_GetDroppedControlRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)(RECT FAR*)(lprc))) + +#define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETITEMHEIGHT, 0, 0L)) +#define ComboBox_SetItemHeight(hwndCtl, cyItem) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMHEIGHT, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SendMessage((hwndCtl), CB_GETEXTENDEDUI, 0, 0L)) +#define ComboBox_SetExtendedUI(hwndCtl, flags) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEXTENDEDUI, (WPARAM)(UINT)(flags), 0L)) +#endif /* WINVER >= 0x030a */ + +/****** Alternate porting layer macros ****************************************/ + +/* USER MESSAGES: */ + +#define GET_WPARAM(wp, lp) (wp) +#define GET_LPARAM(wp, lp) (lp) + +#define GET_WM_ACTIVATE_STATE(wp, lp) (wp) +#define GET_WM_ACTIVATE_FMINIMIZED(wp, lp) (BOOL)HIWORD(lp) +#define GET_WM_ACTIVATE_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_ACTIVATE_MPS(s, fmin, hwnd) \ + (WPARAM)(s), MAKELONG(hwnd, fmin) + +#define GET_WM_CHARTOITEM_CHAR(wp, lp) (CHAR)(wp) +#define GET_WM_CHARTOITEM_POS(wp, lp) HIWORD(lp) +#define GET_WM_CHARTOITEM_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_CHARTOITEM_MPS(ch, pos, hwnd) \ + (WPARAM)(ch), MAKELONG(hwnd, pos) + +#define GET_WM_COMMAND_ID(wp, lp) (wp) +#define GET_WM_COMMAND_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(lp) +#define GET_WM_COMMAND_MPS(id, hwnd, cmd) \ + (WPARAM)(id), MAKELONG(hwnd, cmd) + +#define WM_CTLCOLORMSGBOX 0x0132 +#define WM_CTLCOLOREDIT 0x0133 +#define WM_CTLCOLORLISTBOX 0x0134 +#define WM_CTLCOLORBTN 0x0135 +#define WM_CTLCOLORDLG 0x0136 +#define WM_CTLCOLORSCROLLBAR 0x0137 +#define WM_CTLCOLORSTATIC 0x0138 + +#define GET_WM_CTLCOLOR_HDC(wp, lp, msg) (HDC)(wp) +#define GET_WM_CTLCOLOR_HWND(wp, lp, msg) (HWND)LOWORD(lp) +#define GET_WM_CTLCOLOR_TYPE(wp, lp, msg) HIWORD(lp) +#define GET_WM_CTLCOLOR_MPS(hdc, hwnd, type) \ + (WPARAM)(hdc), MAKELONG(hwnd, type) + + +#define GET_WM_MENUSELECT_CMD(wp, lp) (wp) +#define GET_WM_MENUSELECT_FLAGS(wp, lp) LOWORD(lp) +#define GET_WM_MENUSELECT_HMENU(wp, lp) (HMENU)HIWORD(lp) +#define GET_WM_MENUSELECT_MPS(cmd, f, hmenu) \ + (WPARAM)(cmd), MAKELONG(f, hmenu) + +// Note: the following are for interpreting MDIclient to MDI child messages. +#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (BOOL)(wp) +#define GET_WM_MDIACTIVATE_HWNDDEACT(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_MDIACTIVATE_HWNDACTIVATE(wp, lp) (HWND)LOWORD(lp) +// Note: the following is for sending to the MDI client window. +#define GET_WM_MDIACTIVATE_MPS(f, hwndD, hwndA)\ + (WPARAM)(hwndA), 0 + +#define GET_WM_MDISETMENU_MPS(hmenuF, hmenuW) 0, MAKELONG(hmenuF, hmenuW) + +#define GET_WM_MENUCHAR_CHAR(wp, lp) (CHAR)(wp) +#define GET_WM_MENUCHAR_HMENU(wp, lp) (HMENU)LOWORD(lp) +#define GET_WM_MENUCHAR_FMENU(wp, lp) (BOOL)HIWORD(lp) +#define GET_WM_MENUCHAR_MPS(ch, hmenu, f) \ + (WPARAM)(ch), MAKELONG(hmenu, f) + +#define GET_WM_PARENTNOTIFY_MSG(wp, lp) (wp) +#define GET_WM_PARENTNOTIFY_ID(wp, lp) HIWORD(lp) +#define GET_WM_PARENTNOTIFY_HWNDCHILD(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_PARENTNOTIFY_X(wp, lp) (INT)LOWORD(lp) +#define GET_WM_PARENTNOTIFY_Y(wp, lp) (INT)HIWORD(lp) +#define GET_WM_PARENTNOTIFY_MPS(msg, id, hwnd) \ + (WPARAM)(msg), MAKELONG(hwnd, id) +#define GET_WM_PARENTNOTIFY2_MPS(msg, x, y) \ + (WPARAM)(msg), MAKELONG(x, y) + +#define GET_WM_VKEYTOITEM_CODE(wp, lp) (wp) +#define GET_WM_VKEYTOITEM_ITEM(wp, lp) (INT)HIWORD(lp) +#define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) \ + (WPARAM)(code), MAKELONG(hwnd, item) + +#define GET_EM_SETSEL_START(wp, lp) LOWORD(lp) +#define GET_EM_SETSEL_END(wp, lp) HIWORD(lp) +#define GET_EM_SETSEL_MPS(iStart, iEnd) \ + 0, MAKELONG(iStart, iEnd) + +#define GET_EM_LINESCROLL_MPS(vert, horz) \ + 0, MAKELONG(vert, horz) + +#define GET_WM_CHANGECBCHAIN_HWNDNEXT(wp, lp) (HWND)LOWORD(lp) + +#define GET_WM_HSCROLL_CODE(wp, lp) (wp) +#define GET_WM_HSCROLL_POS(wp, lp) LOWORD(lp) +#define GET_WM_HSCROLL_HWND(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_HSCROLL_MPS(code, pos, hwnd) \ + (WPARAM)(code), MAKELONG(pos, hwnd) + +#define GET_WM_VSCROLL_CODE(wp, lp) (wp) +#define GET_WM_VSCROLL_POS(wp, lp) LOWORD(lp) +#define GET_WM_VSCROLL_HWND(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_VSCROLL_MPS(code, pos, hwnd) \ + (WPARAM)(code), MAKELONG(pos, hwnd) + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* !_INC_WINDOWSX */ diff --git a/private/oleauto/tools/win16/os2/inc/windowsx.h16 b/private/oleauto/tools/win16/os2/inc/windowsx.h16 new file mode 100644 index 000000000..90d57bc48 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/windowsx.h16 @@ -0,0 +1,1213 @@ +/*****************************************************************************\ +* * +* windowsx.h - Macro APIs, window message crackers, and control APIs * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWSX +#define _INC_WINDOWSX + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** KERNEL Macro APIs ****************************************************/ + +#define GetInstanceModule(hInstance) \ + GetModuleHandle((LPCSTR)MAKELP(0, hInstance)) + +#define GlobalPtrHandle(lp) \ + ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp)))) + +#define GlobalLockPtr(lp) \ + ((BOOL)SELECTOROF(GlobalLock(GlobalPtrHandle(lp)))) +#define GlobalUnlockPtr(lp) \ + GlobalUnlock(GlobalPtrHandle(lp)) + +#define GlobalAllocPtr(flags, cb) \ + (GlobalLock(GlobalAlloc((flags), (cb)))) +#define GlobalReAllocPtr(lp, cbNew, flags) \ + (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) +#define GlobalFreePtr(lp) \ + (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) + +/****** GDI Macro APIs *******************************************************/ + +#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen)) +#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen))) +#define GetStockPen(i) ((HPEN)GetStockObject(i)) + +#define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr)) +#define SelectBrush(hdc, hbr) ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr))) +#define GetStockBrush(i) ((HBRUSH)GetStockObject(i)) + +#define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn)) + +#define CopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY) +#define IntersectRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_AND) +#define SubtractRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_DIFF) +#define UnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR) +#define XorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR) + +#define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal)) + +#define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont)) +#define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont))) +#define GetStockFont(i) ((HFONT)GetStockObject(i)) + +#define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm)) +#define SelectBitmap(hdc, hbm) ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm))) + +#define InsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy)) + +/****** USER Macro APIs ******************************************************/ + +#define GetWindowInstance(hwnd) ((HINSTANCE)GetWindowWord(hwnd, GWW_HINSTANCE)) + +#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE)) +#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE)) + +#define GetWindowOwner(hwnd) GetWindow(hwnd, GW_OWNER) + +#define GetFirstChild(hwnd) GetTopWindow(hwnd) +#define GetFirstSibling(hwnd) GetWindow(hwnd, GW_HWNDFIRST) +#define GetLastSibling(hwnd) GetWindow(hwnd, GW_HWNDLAST) +#define GetNextSibling(hwnd) GetWindow(hwnd, GW_HWNDNEXT) +#define GetPrevSibling(hwnd) GetWindow(hwnd, GW_HWNDPREV) + +#define GetWindowID(hwnd) GetDlgCtrlID(hwnd) + +#define SetWindowRedraw(hwnd, fRedraw) \ + ((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L)) + +#define SubclassWindow(hwnd, lpfn) \ + ((WNDPROC)SetWindowLong((hwnd), GWL_WNDPROC, (LPARAM)(WNDPROC)(lpfn))) + +#define IsMinimized(hwnd) IsIconic(hwnd) +#define IsMaximized(hwnd) IsZoomed(hwnd) +#define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0L) + +#define SetWindowFont(hwnd, hfont, fRedraw) FORWARD_WM_SETFONT((hwnd), (hfont), (fRedraw), SendMessage) + +#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd), SendMessage) + +#if (WINVER >= 0x030a) +#define MapWindowRect(hwndFrom, hwndTo, lprc) \ + MapWindowPoints((hwndFrom), (hwndTo), (POINT FAR*)(lprc), 2) +#endif /* WINVER >= 0x030a */ + +#define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0) +#define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0) +#define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0) + +#define SubclassDialog(hwndDlg, lpfn) \ + ((DLGPROC)SetWindowLong(hwndDlg, DWL_DLGPROC, (LPARAM)(DLGPROC)(lpfn))) + +#define SetDlgMsgResult(hwnd, msg, result) \ + (((msg) == WM_CTLCOLOR || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || \ + (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG) \ + ? (BOOL)LOWORD(result) : (SetWindowLong((hwnd), DWL_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE)) + +#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \ + (*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam)) + +#define CheckDefDlgRecursion(pfRecursion) \ + if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; } + +/****** Message crackers ****************************************************/ + +#define HANDLE_MSG(hwnd, message, fn) \ + case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) + +/* void Cls_OnCompacting(HWND hwnd, UINT compactRatio); */ +#define HANDLE_WM_COMPACTING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_COMPACTING(hwnd, compactRatio, fn) \ + (void)(fn)((hwnd), WM_COMPACTING, (WPARAM)(UINT)(compactRatio), 0L) + +/* void Cls_OnWinIniChange(HWND hwnd, LPCSTR lpszSectionName); */ +#define HANDLE_WM_WININICHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_WININICHANGE(hwnd, lpszSectionName, fn) \ + (void)(fn)((hwnd), WM_WININICHANGE, 0, (LPARAM)(LPCSTR)(lpszSectionName)) + +/* void Cls_OnSysColorChange(HWND hwnd); */ +#define HANDLE_WM_SYSCOLORCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_SYSCOLORCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_SYSCOLORCHANGE, 0, 0L) + +/* BOOL Cls_OnQueryNewPalette(HWND hwnd); */ +#define HANDLE_WM_QUERYNEWPALETTE(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYNEWPALETTE(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYNEWPALETTE, 0, 0L) + +/* void Cls_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTEISCHANGING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTEISCHANGING(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTEISCHANGING, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTECHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTECHANGED(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTECHANGED, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnFontChange(HWND hwnd); */ +#define HANDLE_WM_FONTCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_FONTCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_FONTCHANGE, 0, 0L) + +/* void Cls_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue); */ +#define HANDLE_WM_SPOOLERSTATUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SPOOLERSTATUS(hwnd, status, cJobInQueue, fn) \ + (void)(fn)((hwnd), WM_SPOOLERSTATUS, (WPARAM)(status), MAKELPARAM((UINT)(cJobInQueue), 0)) + +/* void Cls_OnDevModeChange(HWND hwnd, LPCSTR lpszDeviceName); */ +#define HANDLE_WM_DEVMODECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_DEVMODECHANGE(hwnd, lpszDeviceName, fn) \ + (void)(fn)((hwnd), WM_DEVMODECHANGE, 0,(LPARAM)(LPCSTR)(lpszDeviceName)) + +/* void Cls_OnTimeChange(HWND hwnd); */ +#define HANDLE_WM_TIMECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_TIMECHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_TIMECHANGE, 0, 0L) + +/* void Cls_OnPower(HWND hwnd, int code); */ +#define HANDLE_WM_POWER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_POWER(hwnd, code, fn) \ + (void)(fn)((hwnd), WM_POWER, (WPARAM)(code), 0L) + +/* BOOL Cls_OnQueryEndSession(HWND hwnd); */ +#define HANDLE_WM_QUERYENDSESSION(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYENDSESSION(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYENDSESSION, 0, 0L) + +/* void Cls_OnEndSession(HWND hwnd, BOOL fEnding); */ +#define HANDLE_WM_ENDSESSION(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENDSESSION(hwnd, fEnding, fn) \ + (void)(fn)((hwnd), WM_ENDSESSION, (WPARAM)(BOOL)(fEnding), 0L) + +/* void Cls_OnQuit(HWND hwnd, int exitCode); */ +#define HANDLE_WM_QUIT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_QUIT(hwnd, exitCode, fn) \ + (void)(fn)((hwnd), WM_QUIT, (WPARAM)(exitCode), 0L) + +/* void Cls_OnSystemError(HWND hwnd, int errCode); */ +#define HANDLE_WM_SYSTEMERROR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_SYSTEMERROR(hwnd, errCode, fn) \ + (void)(fn)((hwnd), WM_SYSTEMERROR, (WPARAM)(errCode), 0L) + +/* BOOL Cls_OnCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_CREATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) ? 0L : (LRESULT)-1L) +#define FORWARD_WM_CREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_CREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* BOOL Cls_OnNCCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_NCCREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_NCCREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCCREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* void Cls_OnDestroy(HWND hwnd); */ +#define HANDLE_WM_DESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROY, 0, 0L) + +/* void Cls_OnNCDestroy(HWND hwnd); */ +#define HANDLE_WM_NCDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_NCDESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_NCDESTROY, 0, 0L) + +/* void Cls_OnShowWindow(HWND hwnd, BOOL fShow, UINT status); */ +#define HANDLE_WM_SHOWWINDOW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_SHOWWINDOW(hwnd, fShow, status, fn) \ + (void)(fn)((hwnd), WM_SHOWWINDOW, (WPARAM)(BOOL)(fShow), MAKELPARAM((UINT)(status), 0)) + +/* void Cls_OnSetRedraw(HWND hwnd, BOOL fRedraw); */ +#define HANDLE_WM_SETREDRAW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_SETREDRAW(hwnd, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETREDRAW, (WPARAM)(fRedraw), 0L) + +/* void Cls_OnEnable(HWND hwnd, BOOL fEnable); */ +#define HANDLE_WM_ENABLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENABLE(hwnd, fEnable, fn) \ + (void)(fn)((hwnd), WM_ENABLE, (WPARAM)(BOOL)(fEnable), 0L) + +/* void Cls_OnSetText(HWND hwnd, LPCSTR lpszText); */ +#define HANDLE_WM_SETTEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_SETTEXT(hwnd, lpszText, fn) \ + (void)(fn)((hwnd), WM_SETTEXT, 0, (LPARAM)(LPCSTR)(lpszText)) + +/* INT Cls_OnGetText(HWND hwnd, int cchTextMax, LPSTR lpszText) */ +#define HANDLE_WM_GETTEXT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (int)(wParam), (LPSTR)(lParam)) +#define FORWARD_WM_GETTEXT(hwnd, cchTextMax, lpszText, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXT, (WPARAM)(int)(cchTextMax), (LPARAM)(LPSTR)(lpszText)) + +/* INT Cls_OnGetTextLength(HWND hwnd); */ +#define HANDLE_WM_GETTEXTLENGTH(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)(hwnd) +#define FORWARD_WM_GETTEXTLENGTH(hwnd, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXTLENGTH, 0, 0L) + +/* BOOL Cls_OnWindowPosChanging(HWND hwnd, WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (WINDOWPOS FAR*)(lParam)) +#define FORWARD_WM_WINDOWPOSCHANGING(hwnd, lpwpos, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_WINDOWPOSCHANGING, 0, (LPARAM)(WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnWindowPosChanged(HWND hwnd, const WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const WINDOWPOS FAR*)(lParam)), 0L) +#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn) \ + (void)(fn)((hwnd), WM_WINDOWPOSCHANGED, 0, (LPARAM)(const WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnMove(HWND hwnd, int x, int y); */ +#define HANDLE_WM_MOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_MOVE(hwnd, x, y, fn) \ + (void)(fn)((hwnd), WM_MOVE, 0, MAKELPARAM((int)(x), (int)(y))) + +/* void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy); */ +#define HANDLE_WM_SIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SIZE(hwnd, state, cx, cy, fn) \ + (void)(fn)((hwnd), WM_SIZE, (WPARAM)(UINT)(state), MAKELPARAM((int)(cx), (int)(cy))) + +/* void Cls_OnClose(HWND hwnd); */ +#define HANDLE_WM_CLOSE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLOSE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLOSE, 0, 0L) + +/* BOOL Cls_OnQueryOpen(HWND hwnd); */ +#define HANDLE_WM_QUERYOPEN(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYOPEN(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYOPEN, 0, 0L) + +/* void Cls_OnGetMinMaxInfo(HWND hwnd, MINMAXINFO FAR* lpMinMaxInfo); */ +#define HANDLE_WM_GETMINMAXINFO(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MINMAXINFO FAR*)(lParam)), 0L) +#define FORWARD_WM_GETMINMAXINFO(hwnd, lpMinMaxInfo, fn) \ + (void)(fn)((hwnd), WM_GETMINMAXINFO, 0, (LPARAM)(MINMAXINFO FAR*)(lpMinMaxInfo)) + +/* void Cls_OnPaint(HWND hwnd); */ +#define HANDLE_WM_PAINT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PAINT(hwnd, fn) \ + (void)(fn)((hwnd), WM_PAINT, 0, 0L) + +/* BOOL Cls_OnEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* BOOL Cls_OnIconEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ICONERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ICONERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ICONERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* void Cls_OnNCPaint(HWND hwnd, HRGN hrgn); */ +#define HANDLE_WM_NCPAINT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HRGN)(wParam)), 0L) +#define FORWARD_WM_NCPAINT(hwnd, hrgn, fn) \ + (void)(fn)((hwnd), WM_NCPAINT, (WPARAM)(HRGN)(hrgn), 0L) + +/* UINT Cls_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS FAR* lpcsp) */ +#define HANDLE_WM_NCCALCSIZE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (NCCALCSIZE_PARAMS FAR*)(lParam)) +#define FORWARD_WM_NCCALCSIZE(hwnd, fCalcValidRects, lpcsp, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCCALCSIZE, (WPARAM)(fCalcValidRects), (LPARAM)(NCCALCSIZE_PARAMS FAR*)(lpcsp)) + +/* UINT Cls_OnNCHitTest(HWND hwnd, int x, int y); */ +#define HANDLE_WM_NCHITTEST(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCHITTEST, 0, MAKELPARAM((int)(x), (int)(y))) + +/* HICON Cls_OnQueryDragIcon(HWND hwnd); */ +#define HANDLE_WM_QUERYDRAGICON(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_QUERYDRAGICON(hwnd, fn) \ + (HICON)(UINT)(DWORD)(fn)((hwnd), WM_QUERYDRAGICON, 0, 0L) + +#ifdef _INC_SHELLAPI +/* void Cls_OnDropFiles(HWND hwnd, HDROP hdrop); */ +#define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HDROP)(wParam)), 0L) +#define FORWARD_WM_DROPFILES(hwnd, hdrop, fn) \ + (void)(fn)((hwnd), WM_DROPFILES, (WPARAM)(hdrop), 0L) +#endif /* _INC_SHELLAPI */ + +/* void Cls_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_ACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATE(hwnd, state, hwndActDeact, fMinimized, fn) \ + (void)(fn)((hwnd), WM_ACTIVATE, (WPARAM)(UINT)(state), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnActivateApp(HWND hwnd, BOOL fActivate, HTASK htaskActDeact); */ +#define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HTASK)LOWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATEAPP(hwnd, fActivate, htaskActDeact, fn) \ + (void)(fn)((hwnd), WM_ACTIVATEAPP, (WPARAM)(BOOL)(fActivate), MAKELPARAM((htaskActDeact),0)) + +/* BOOL Cls_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_NCACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)) +#define FORWARD_WM_NCACTIVATE(hwnd, fActive, hwndActDeact, fMinimized, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCACTIVATE, (WPARAM)(BOOL)(fActive), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnSetFocus(HWND hwnd, HWND hwndOldFocus) */ +#define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_SETFOCUS(hwnd, hwndOldFocus, fn) \ + (void)(fn)((hwnd), WM_SETFOCUS, (WPARAM)(HWND)(hwndOldFocus), 0L) + +/* void Cls_OnKillFocus(HWND hwnd, HWND hwndNewFocus); */ +#define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_KILLFOCUS(hwnd, hwndNewFocus, fn) \ + (void)(fn)((hwnd), WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_CHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_DEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_DEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnSysDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSDEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSDEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MOUSEMOVE(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MOUSEMOVE, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnRButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_RBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnMButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMOUSEMOVE(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMOUSEMOVE, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCLBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCRBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* int Cls_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_MOUSEACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)) +#define FORWARD_WM_MOUSEACTIVATE(hwnd, hwndTopLevel, codeHitTest, msg, fn) \ + (int)(DWORD)(fn)((hwnd), WM_MOUSEACTIVATE, (WPARAM)(HWND)(hwndTopLevel), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnCancelMode(HWND hwnd); */ +#define HANDLE_WM_CANCELMODE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CANCELMODE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CANCELMODE, 0, 0L) + +/* void Cls_OnTimer(HWND hwnd, UINT id); */ +#define HANDLE_WM_TIMER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_TIMER(hwnd, id, fn) \ + (void)(fn)((hwnd), WM_TIMER, (WPARAM)(UINT)(id), 0L) + +/* void Cls_OnInitMenu(HWND hwnd, HMENU hMenu); */ +#define HANDLE_WM_INITMENU(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam)), 0L) +#define FORWARD_WM_INITMENU(hwnd, hMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENU, (WPARAM)(HMENU)(hMenu), 0L) + +/* void Cls_OnInitMenuPopup(HWND hwnd, HMENU hMenu, int item, BOOL fSystemMenu); */ +#define HANDLE_WM_INITMENUPOPUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam), (int)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_INITMENUPOPUP(hwnd, hMenu, item, fSystemMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENUPOPUP, (WPARAM)(HMENU)(hMenu), MAKELPARAM((item),(fSystemMenu))) + +/* void Cls_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags); */ +#define HANDLE_WM_MENUSELECT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)HIWORD(lParam), (LOWORD(lParam) & MF_POPUP) ? 0 : (int)(wParam), \ + (LOWORD(lParam) & MF_POPUP) ? (HMENU)(wParam) : 0, LOWORD(lParam)), 0L) +#define FORWARD_WM_MENUSELECT(hwnd, hmenu, item, hmenuPopup, flags, fn) \ + (void)(fn)((hwnd), WM_MENUSELECT, ((flags) & MF_POPUP) ? (WPARAM)(HMENU)(hmenuPopup) : (WPARAM)(int)(item), MAKELPARAM((flags), (hmenu))) + +/* DWORD Cls_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu); */ +#define HANDLE_WM_MENUCHAR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam), LOWORD(lParam), (HMENU)HIWORD(lParam)); +#define FORWARD_WM_MENUCHAR(hwnd, ch, flags, hmenu, fn) \ + (DWORD)(fn)((hwnd), WM_MENUCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((flags), (UINT)(hmenu))) + +/* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify); */ +#define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \ + (void)(fn)((hwnd), WM_COMMAND, (WPARAM)(int)(id), MAKELPARAM((UINT)(hwndCtl), (codeNotify))) + +/* void Cls_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnCut(HWND hwnd); */ +#define HANDLE_WM_CUT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CUT(hwnd, fn) \ + (void)(fn)((hwnd), WM_CUT, 0, 0L) + +/* void Cls_OnCopy(HWND hwnd); */ +#define HANDLE_WM_COPY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_COPY(hwnd, fn) \ + (void)(fn)((hwnd), WM_COPY, 0, 0L) + +/* void Cls_OnPaste(HWND hwnd); */ +#define HANDLE_WM_PASTE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PASTE(hwnd, fn) \ + (void)(fn)((hwnd), WM_PASTE, 0, 0L) + +/* void Cls_OnClear(HWND hwnd); */ +#define HANDLE_WM_CLEAR(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLEAR(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLEAR, 0, 0L) + +/* void Cls_OnUndo(HWND hwnd); */ +#define HANDLE_WM_UNDO(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_UNDO(hwnd, fn) \ + (void)(fn)((hwnd), WM_UNDO, 0, 0L) + +/* HANDLE Cls_OnRenderFormat(HWND hwnd, UINT fmt); */ +#define HANDLE_WM_RENDERFORMAT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HANDLE)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_RENDERFORMAT(hwnd, fmt, fn) \ + (HANDLE)(UINT)(DWORD)(fn)((hwnd), WM_RENDERFORMAT, (WPARAM)(UINT)(fmt), 0L) + +/* void Cls_OnRenderAllFormats(HWND hwnd); */ +#define HANDLE_WM_RENDERALLFORMATS(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_RENDERALLFORMATS(hwnd, fn) \ + (void)(fn)((hwnd), WM_RENDERALLFORMATS, 0, 0L) + +/* void Cls_OnDestroyClipboard(HWND hwnd); */ +#define HANDLE_WM_DESTROYCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROYCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROYCLIPBOARD, 0, 0L) + +/* void Cls_OnDrawClipboard(HWND hwnd); */ +#define HANDLE_WM_DRAWCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DRAWCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DRAWCLIPBOARD, 0, 0L) + +/* void Cls_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const PAINTSTRUCT FAR* lpPaintStruct) */ +#define HANDLE_WM_PAINTCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const PAINTSTRUCT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_PAINTCLIPBOARD(hwnd, hwndCBViewer, lpPaintStruct, fn) \ + (void)(fn)((hwnd), WM_PAINTCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lpPaintStruct)) + +/* void Cls_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const RECT FAR* lprc); */ +#define HANDLE_WM_SIZECLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const RECT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SIZECLIPBOARD(hwnd, hwndCBViewer, lprc, fn) \ + (void)(fn)((hwnd), WM_SIZECLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lprc)) + +/* void Cls_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_VSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_HSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnAskCBFormatName(HWND hwnd, int cchMax, LPSTR rgchName); */ +#define HANDLE_WM_ASKCBFORMATNAME(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (LPSTR)(lParam)), 0L) +#define FORWARD_WM_ASKCBFORMATNAME(hwnd, cchMax, rgchName, fn) \ + (void)(fn)((hwnd), WM_ASKCBFORMATNAME, (WPARAM)(int)(cchMax), (LPARAM)(rgchName)) + +/* void Cls_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext); */ +#define HANDLE_WM_CHANGECBCHAIN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHANGECBCHAIN(hwnd, hwndRemove, hwndNext, fn) \ + (void)(fn)((hwnd), WM_CHANGECBCHAIN, (WPARAM)(HWND)(hwndRemove), MAKELPARAM((UINT)(hwndNext), 0)) + +/* BOOL Cls_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_SETCURSOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); +#define FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_SETCURSOR, (WPARAM)(HWND)(hwndCursor), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnSysCommand(HWND hwnd, UINT cmd, int x, int y); */ +#define HANDLE_WM_SYSCOMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSCOMMAND(hwnd, cmd, x, y, fn) \ + (void)(fn)((hwnd), WM_SYSCOMMAND, (WPARAM)(UINT)(cmd), MAKELPARAM((x), (y))) + +/* HWND Cls_MDICreate(HWND hwnd, const MDICREATESTRUCT FAR* lpmcs); */ +#define HANDLE_WM_MDICREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (MDICREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_MDICREATE(hwnd, lpmcs, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDICREATE, 0, (LPARAM)(lpmcs)) + +/* void Cls_MDIDestroy(HWND hwnd, HWND hwndDestroy); */ +#define HANDLE_WM_MDIDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIDESTROY(hwnd, hwndDestroy, fn) \ + (void)(fn)((hwnd), WM_MDIDESTROY, (WPARAM)(hwndDestroy), 0L) + +/* NOTE: Usable only by MDI client windows */ +/* void Cls_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate); */ +#define HANDLE_WM_MDIACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (HWND)HIWORD(lParam)), 0L) +#define FORWARD_WM_MDIACTIVATE(hwnd, fActive, hwndActivate, hwndDeactivate, fn) \ + (void)(fn)(hwnd, WM_MDIACTIVATE, (WPARAM)(fActive), MAKELPARAM((hwndActivate), (hwndDeactivate))) + +/* void Cls_MDIRestore(HWND hwnd, HWND hwndRestore); */ +#define HANDLE_WM_MDIRESTORE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIRESTORE(hwnd, hwndRestore, fn) \ + (void)(fn)((hwnd), WM_MDIRESTORE, (WPARAM)(hwndRestore), 0L) + +/* HWND Cls_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev); */ +#define HANDLE_WM_MDINEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_MDINEXT(hwnd, hwndCur, fPrev, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDINEXT, (WPARAM)(hwndCur), MAKELPARAM((fPrev), 0)) + +/* void Cls_MDIMaximize(HWND hwnd, HWND hwndMaximize); */ +#define HANDLE_WM_MDIMAXIMIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIMAXIMIZE(hwnd, hwndMaximize, fn) \ + (void)(fn)((hwnd), WM_MDIMAXIMIZE, (WPARAM)(hwndMaximize), 0L) + +/* BOOL Cls_MDITile(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDITILE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDITILE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDITILE, (WPARAM)(cmd), 0L) + +/* BOOL Cls_MDICascade(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDICASCADE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDICASCADE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDICASCADE, (WPARAM)(cmd), 0L) + +/* void Cls_MDIIconArrange(HWND hwnd); */ +#define HANDLE_WM_MDIICONARRANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_MDIICONARRANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_MDIICONARRANGE, 0, 0L) + +/* HWND Cls_MDIGetActive(HWND hwnd); */ +#define HANDLE_WM_MDIGETACTIVE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_MDIGETACTIVE(hwnd, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDIGETACTIVE, 0, 0L) + +/* HMENU Cls_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow); */ +#define HANDLE_WM_MDISETMENU(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (HMENU)LOWORD(lParam), (HMENU)HIWORD(lParam)) +#define FORWARD_WM_MDISETMENU(hwnd, fRefresh, hmenuFrame, hmenuWindow, fn) \ + (HMENU)(UINT)(DWORD)(fn)((hwnd), WM_MDISETMENU, (WPARAM)(fRefresh), MAKELPARAM((hmenuFrame), (hmenuWindow))) + +/* void Cls_OnChildActivate(HWND hwnd); */ +#define HANDLE_WM_CHILDACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CHILDACTIVATE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CHILDACTIVATE, 0, 0L) + +/* BOOL Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam); */ +#define HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd), (HWND)(wParam), lParam); +#define FORWARD_WM_INITDIALOG(hwnd, hwndFocus, lParam, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_INITDIALOG, (WPARAM)(HWND)(hwndFocus), (lParam)) + +/* HWND Cls_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext) */ +#define HANDLE_WM_NEXTDLGCTL(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)) +#define FORWARD_WM_NEXTDLGCTL(hwnd, hwndSetFocus, fNext, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_NEXTDLGCTL, (WPARAM)(HWND)(hwndSetFocus), MAKELPARAM((fNext), 0)) + +/* void Cls_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild); */ +#define HANDLE_WM_PARENTNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_PARENTNOTIFY(hwnd, msg, hwndChild, idChild, fn) \ + (void)(fn)((hwnd), WM_PARENTNOTIFY, (WPARAM)(UINT)(msg), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(idChild))) + +/* void Cls_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource); */ +#define HANDLE_WM_ENTERIDLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_ENTERIDLE(hwnd, source, hwndSource, fn) \ + (void)(fn)((hwnd), WM_ENTERIDLE, (WPARAM)(UINT)(source), MAKELPARAM((UINT)(HWND)(hwndSource), 0)) + +/* UINT Cls_OnGetDlgCode(HWND hwnd, MSG FAR* lpmsg); */ +#define HANDLE_WM_GETDLGCODE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd, (MSG FAR*)(lParam)) +#define FORWARD_WM_GETDLGCODE(hwnd, lpmsg, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_GETDLGCODE, (SELECTOROF(lpmsg) ? lpmsg->wParam : 0), (LPARAM)(lpmsg)) + +/* HBRUSH Cls_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type); */ +#define HANDLE_WM_CTLCOLOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)LOWORD(lParam), (int)(HIWORD(lParam))) +#define FORWARD_WM_CTLCOLOR(hwnd, hdc, hwndChild, type, fn) \ + (HBRUSH)(UINT)(DWORD)(fn)((hwnd), WM_CTLCOLOR, (WPARAM)(HDC)(hdc), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(int)(type))) + +/* void Cls_OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw); */ +#define HANDLE_WM_SETFONT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HFONT)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SETFONT(hwnd, hfont, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETFONT, (WPARAM)(HFONT)(hfont), MAKELPARAM((UINT)(BOOL)(fRedraw), 0)) + +/* HFONT Cls_OnGetFont(HWND hwnd); */ +#define HANDLE_WM_GETFONT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HFONT)(fn)(hwnd) +#define FORWARD_WM_GETFONT(hwnd, fn) \ + (HFONT)(UINT)(DWORD)(fn)((hwnd), WM_GETFONT, 0, 0L) + +/* void Cls_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT FAR* lpDrawItem); */ +#define HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DRAWITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \ + (void)(fn)((hwnd), WM_DRAWITEM, 0, (LPARAM)(const DRAWITEMSTRUCT FAR*)(lpDrawItem)) + +/* void Cls_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT FAR* lpMeasureItem); */ +#define HANDLE_WM_MEASUREITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MEASUREITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_MEASUREITEM(hwnd, lpMeasureItem, fn) \ + (void)(fn)((hwnd), WM_MEASUREITEM, 0, (LPARAM)(MEASUREITEMSTRUCT FAR*)(lpMeasureItem)) + +/* void Cls_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT FAR* lpDeleteItem) */ +#define HANDLE_WM_DELETEITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DELETEITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DELETEITEM(hwnd, lpDeleteItem, fn) \ + (void)(fn)((hwnd), WM_DELETEITEM, 0, (LPARAM)(const DELETEITEMSTRUCT FAR*)(lpDeleteItem)) + +/* int Cls_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT FAR* lpCompareItem); */ +#define HANDLE_WM_COMPAREITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (const COMPAREITEMSTRUCT FAR*)(lParam)) +#define FORWARD_WM_COMPAREITEM(hwnd, lpCompareItem, fn) \ + (int)(DWORD)(fn)((hwnd), WM_COMPAREITEM, 0, (LPARAM)(const COMPAREITEMSTRUCT FAR*)(lpCompareItem)) + +/* int Cls_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_VKEYTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_VKEYTOITEM(hwnd, vk, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_VKEYTOITEM, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* int Cls_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_CHARTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_CHARTOITEM(hwnd, ch, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_CHARTOITEM, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* void Cls_OnQueueSync(HWND hwnd); */ +#define HANDLE_WM_QUEUESYNC(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_QUEUESYNC(hwnd, fn) \ + (void)(fn)((hwnd), WM_QUEUESYNC, 0, 0L) + +/* void Cls_OnCommNotify(HWND hwnd, int cid, UINT flags); */ +#define HANDLE_WM_COMMNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_COMMNOTIFY(hwnd, cid, flags, fn) \ + (void)(fn)((hwnd), WM_COMMNOTIFY, (WPARAM)(cid), MAKELPARAM((flags), 0)) + +/****** Static control message APIs ******************************************/ + +#define Static_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Static_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Static_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Static_SetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_SETICON, (WPARAM)(HICON)(hIcon), 0L)) +#define Static_GetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_GETICON, 0, 0L)) + +/****** Button control message APIs ******************************************/ + +#define Button_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Button_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Button_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETCHECK, 0, 0L)) +#define Button_SetCheck(hwndCtl, check) ((void)SendMessage((hwndCtl), BM_SETCHECK, (WPARAM)(int)(check), 0L)) + +#define Button_GetState(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETSTATE, 0, 0L)) +#define Button_SetState(hwndCtl, state) ((UINT)(DWORD)SendMessage((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L)) + +#define Button_SetStyle(hwndCtl, style, fRedraw) ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0))) + +/****** Edit control message APIs ********************************************/ + +#define Edit_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Edit_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Edit_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Edit_LimitText(hwndCtl, cchMax) ((void)SendMessage((hwndCtl), EM_LIMITTEXT, (WPARAM)(cchMax), 0L)) + +#define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINECOUNT, 0, 0L)) +#define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((int FAR*)(lpch)) = (cchMax)), ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPSTR)(lpch)))) + +#define Edit_GetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_GETRECT, 0, (LPARAM)(RECT FAR*)(lprc))) +#define Edit_SetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECT, 0, (LPARAM)(const RECT FAR*)(lprc))) +#define Edit_SetRectNoPaint(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECTNP, 0, (LPARAM)(const RECT FAR*)(lprc))) + +#define Edit_GetSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), EM_GETSEL, 0, 0L)) +#define Edit_SetSel(hwndCtl, ichStart, ichEnd) ((void)SendMessage((hwndCtl), EM_SETSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) +#define Edit_ReplaceSel(hwndCtl, lpszReplace) ((void)SendMessage((hwndCtl), EM_REPLACESEL, 0, (LPARAM)(LPCSTR)(lpszReplace))) + +#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_GETMODIFY, 0, 0L)) +#define Edit_SetModify(hwndCtl, fModified) ((void)SendMessage((hwndCtl), EM_SETMODIFY, (WPARAM)(UINT)(fModified), 0L)) + +#define Edit_LineFromChar(hwndCtl, ich) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEFROMCHAR, (WPARAM)(int)(ich), 0L)) +#define Edit_LineIndex(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEINDEX, (WPARAM)(int)(line), 0L)) +#define Edit_LineLength(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINELENGTH, (WPARAM)(int)(line), 0L)) + +#define Edit_Scroll(hwndCtl, dv, dh) ((void)SendMessage((hwndCtl), EM_LINESCROLL, 0, MAKELPARAM((dv), (dh)))) + +#define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_CANUNDO, 0, 0L)) +#define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_UNDO, 0, 0L)) +#define Edit_EmptyUndoBuffer(hwndCtl) ((void)SendMessage((hwndCtl), EM_EMPTYUNDOBUFFER, 0, 0L)) + +#define Edit_SetPasswordChar(hwndCtl, ch) ((void)SendMessage((hwndCtl), EM_SETPASSWORDCHAR, (WPARAM)(UINT)(ch), 0L)) + +#define Edit_SetTabStops(hwndCtl, cTabs, lpTabs) ((void)SendMessage((hwndCtl), EM_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(const int FAR*)(lpTabs))) + +#define Edit_FmtLines(hwndCtl, fAddEOL) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_FMTLINES, (WPARAM)(BOOL)(fAddEOL), 0L)) + +#define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl), EM_GETHANDLE, 0, 0L)) +#define Edit_SetHandle(hwndCtl, h) ((void)SendMessage((hwndCtl), EM_SETHANDLE, (WPARAM)(UINT)(HLOCAL)(h), 0L)) + +#if (WINVER >= 0x030a) +#define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETFIRSTVISIBLELINE, 0, 0L)) + +#define Edit_SetReadOnly(hwndCtl, fReadOnly) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_SETREADONLY, (WPARAM)(BOOL)(fReadOnly), 0L)) + +#define Edit_GetPasswordChar(hwndCtl) ((char)(DWORD)SendMessage((hwndCtl), EM_GETPASSWORDCHAR, 0, 0L)) + +#define Edit_SetWordBreakProc(hwndCtl, lpfnWordBreak) ((void)SendMessage((hwndCtl), EM_SETWORDBREAKPROC, 0, (LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak))) +#define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SendMessage((hwndCtl), EM_GETWORDBREAKPROC, 0, 0L)) +#endif /* WINVER >= 0x030a */ + +/****** ScrollBar control message APIs ***************************************/ + +/* NOTE: flags parameter is a collection of ESB_* values, NOT a boolean! */ +#define ScrollBar_Enable(hwndCtl, flags) EnableScrollBar((hwndCtl), SB_CTL, (flags)) + +#define ScrollBar_Show(hwndCtl, fShow) ShowWindow((hwndCtl), (fShow) ? SW_SHOWNORMAL : SW_HIDE) + +#define ScrollBar_SetPos(hwndCtl, pos, fRedraw) SetScrollPos((hwndCtl), SB_CTL, (pos), (fRedraw)) +#define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl), SB_CTL) + +#define ScrollBar_SetRange(hwndCtl, posMin, posMax, fRedraw) SetScrollRange((hwndCtl), SB_CTL, (posMin), (posMax), (fRedraw)) +#define ScrollBar_GetRange(hwndCtl, lpposMin, lpposMax) GetScrollRange((hwndCtl), SB_CTL, (lpposMin), (lpposMax)) + +/****** ListBox control message APIs *****************************************/ + +#define ListBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ListBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCOUNT, 0, 0L)) +#define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_RESETCONTENT, 0, 0L)) + +#define ListBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ListBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ListBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(data))) +#define ListBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ListBox_GetTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ListBox_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ListBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ListBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETSEL, (WPARAM)(BOOL)(fSelect), MAKELPARAM((index), 0))) +#define ListBox_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SendMessage((hwndCtl), LB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last)))) + +#define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCURSEL, 0, 0L)) +#define ListBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ListBox_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_GetSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSEL, (WPARAM)(int)(index), 0L)) +#define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0, 0L)) +#define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTOPINDEX, 0, 0L)) +#define ListBox_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int FAR*)(lpItems))) + +#define ListBox_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SendMessage((hwndCtl), LB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L)) + +#define ListBox_SetColumnWidth(hwndCtl, cxColumn) ((void)SendMessage((hwndCtl), LB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L)) +#define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0, 0L)) +#define ListBox_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SendMessage((hwndCtl), LB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L)) + +#define ListBox_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int FAR*)(lpTabs))) + +#define ListBox_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT FAR*)(lprc))) + +#define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L)) +#define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCARETINDEX, 0, 0L)) + +#define ListBox_SetAnchorIndex(hwndCtl, index) ((void)SendMessage((hwndCtl), LB_SETANCHORINDEX, (WPARAM)(int)(index), 0L)) /* ;Internal */ +#define ListBox_GetAnchorIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETANCHORINDEX, 0, 0L)) /* ;Internal */ + +#if (WINVER >= 0x030a) +#define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0))) +#define ListBox_GetItemHeight(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L)) +#endif /* WINVER >= 0x030a */ + +#define ListBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), LB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) +#define ListBox_AddFile(hwndCtl, lpszFilename) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDFILE, 0, (LPARAM)(LPCSTR)(lpszFilename))) /* ;Internal */ + +/****** ComboBox control message APIs ****************************************/ + +#define ComboBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ComboBox_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define ComboBox_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define ComboBox_LimitText(hwndCtl, cchLimit) ((int)(DWORD)SendMessage((hwndCtl), CB_LIMITTEXT, (WPARAM)(int)(cchLimit), 0L)) + +#define ComboBox_GetEditSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), CB_GETEDITSEL, 0, 0L)) +#define ComboBox_SetEditSel(hwndCtl, ichStart, ichEnd) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEDITSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) + +#define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCOUNT, 0, 0L)) +#define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_RESETCONTENT, 0, 0L)) + +#define ComboBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ComboBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ComboBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(data))) +#define ComboBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetLBTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ComboBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), CB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ComboBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ComboBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCURSEL, 0, 0L)) +#define ComboBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ComboBox_SelectString(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszSelect))) +#define ComboBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), CB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +#define ComboBox_ShowDropdown(hwndCtl, fShow) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_SHOWDROPDOWN, (WPARAM)(BOOL)(fShow), 0L)) + +#if (WINVER >= 0x030a) +#define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_GETDROPPEDSTATE, 0, 0L)) +#define ComboBox_GetDroppedControlRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)(RECT FAR*)(lprc))) + +#define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETITEMHEIGHT, 0, 0L)) +#define ComboBox_SetItemHeight(hwndCtl, cyItem) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMHEIGHT, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SendMessage((hwndCtl), CB_GETEXTENDEDUI, 0, 0L)) +#define ComboBox_SetExtendedUI(hwndCtl, flags) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEXTENDEDUI, (WPARAM)(UINT)(flags), 0L)) +#endif /* WINVER >= 0x030a */ + +/****** Alternate porting layer macros ****************************************/ + +/* USER MESSAGES: */ + +#define GET_WPARAM(wp, lp) (wp) +#define GET_LPARAM(wp, lp) (lp) + +#define GET_WM_ACTIVATE_STATE(wp, lp) (wp) +#define GET_WM_ACTIVATE_FMINIMIZED(wp, lp) (BOOL)HIWORD(lp) +#define GET_WM_ACTIVATE_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_ACTIVATE_MPS(s, fmin, hwnd) \ + (WPARAM)(s), MAKELONG(hwnd, fmin) + +#define GET_WM_CHARTOITEM_CHAR(wp, lp) (CHAR)(wp) +#define GET_WM_CHARTOITEM_POS(wp, lp) HIWORD(lp) +#define GET_WM_CHARTOITEM_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_CHARTOITEM_MPS(ch, pos, hwnd) \ + (WPARAM)(ch), MAKELONG(hwnd, pos) + +#define GET_WM_COMMAND_ID(wp, lp) (wp) +#define GET_WM_COMMAND_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(lp) +#define GET_WM_COMMAND_MPS(id, hwnd, cmd) \ + (WPARAM)(id), MAKELONG(hwnd, cmd) + +#define WM_CTLCOLORMSGBOX 0x0132 +#define WM_CTLCOLOREDIT 0x0133 +#define WM_CTLCOLORLISTBOX 0x0134 +#define WM_CTLCOLORBTN 0x0135 +#define WM_CTLCOLORDLG 0x0136 +#define WM_CTLCOLORSCROLLBAR 0x0137 +#define WM_CTLCOLORSTATIC 0x0138 + +#define GET_WM_CTLCOLOR_HDC(wp, lp, msg) (HDC)(wp) +#define GET_WM_CTLCOLOR_HWND(wp, lp, msg) (HWND)LOWORD(lp) +#define GET_WM_CTLCOLOR_TYPE(wp, lp, msg) HIWORD(lp) +#define GET_WM_CTLCOLOR_MPS(hdc, hwnd, type) \ + (WPARAM)(hdc), MAKELONG(hwnd, type) + + +#define GET_WM_MENUSELECT_CMD(wp, lp) (wp) +#define GET_WM_MENUSELECT_FLAGS(wp, lp) LOWORD(lp) +#define GET_WM_MENUSELECT_HMENU(wp, lp) (HMENU)HIWORD(lp) +#define GET_WM_MENUSELECT_MPS(cmd, f, hmenu) \ + (WPARAM)(cmd), MAKELONG(f, hmenu) + +// Note: the following are for interpreting MDIclient to MDI child messages. +#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (BOOL)(wp) +#define GET_WM_MDIACTIVATE_HWNDDEACT(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_MDIACTIVATE_HWNDACTIVATE(wp, lp) (HWND)LOWORD(lp) +// Note: the following is for sending to the MDI client window. +#define GET_WM_MDIACTIVATE_MPS(f, hwndD, hwndA)\ + (WPARAM)(hwndA), 0 + +#define GET_WM_MDISETMENU_MPS(hmenuF, hmenuW) 0, MAKELONG(hmenuF, hmenuW) + +#define GET_WM_MENUCHAR_CHAR(wp, lp) (CHAR)(wp) +#define GET_WM_MENUCHAR_HMENU(wp, lp) (HMENU)LOWORD(lp) +#define GET_WM_MENUCHAR_FMENU(wp, lp) (BOOL)HIWORD(lp) +#define GET_WM_MENUCHAR_MPS(ch, hmenu, f) \ + (WPARAM)(ch), MAKELONG(hmenu, f) + +#define GET_WM_PARENTNOTIFY_MSG(wp, lp) (wp) +#define GET_WM_PARENTNOTIFY_ID(wp, lp) HIWORD(lp) +#define GET_WM_PARENTNOTIFY_HWNDCHILD(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_PARENTNOTIFY_X(wp, lp) (INT)LOWORD(lp) +#define GET_WM_PARENTNOTIFY_Y(wp, lp) (INT)HIWORD(lp) +#define GET_WM_PARENTNOTIFY_MPS(msg, id, hwnd) \ + (WPARAM)(msg), MAKELONG(hwnd, id) +#define GET_WM_PARENTNOTIFY2_MPS(msg, x, y) \ + (WPARAM)(msg), MAKELONG(x, y) + +#define GET_WM_VKEYTOITEM_CODE(wp, lp) (wp) +#define GET_WM_VKEYTOITEM_ITEM(wp, lp) (INT)HIWORD(lp) +#define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)LOWORD(lp) +#define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) \ + (WPARAM)(code), MAKELONG(hwnd, item) + +#define GET_EM_SETSEL_START(wp, lp) LOWORD(lp) +#define GET_EM_SETSEL_END(wp, lp) HIWORD(lp) +#define GET_EM_SETSEL_MPS(iStart, iEnd) \ + 0, MAKELONG(iStart, iEnd) + +#define GET_EM_LINESCROLL_MPS(vert, horz) \ + 0, MAKELONG(vert, horz) + +#define GET_WM_CHANGECBCHAIN_HWNDNEXT(wp, lp) (HWND)LOWORD(lp) + +#define GET_WM_HSCROLL_CODE(wp, lp) (wp) +#define GET_WM_HSCROLL_POS(wp, lp) LOWORD(lp) +#define GET_WM_HSCROLL_HWND(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_HSCROLL_MPS(code, pos, hwnd) \ + (WPARAM)(code), MAKELONG(pos, hwnd) + +#define GET_WM_VSCROLL_CODE(wp, lp) (wp) +#define GET_WM_VSCROLL_POS(wp, lp) LOWORD(lp) +#define GET_WM_VSCROLL_HWND(wp, lp) (HWND)HIWORD(lp) +#define GET_WM_VSCROLL_MPS(code, pos, hwnd) \ + (WPARAM)(code), MAKELONG(pos, hwnd) + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* !_INC_WINDOWSX */ +
\ No newline at end of file diff --git a/private/oleauto/tools/win16/os2/inc/wnapidec.inc b/private/oleauto/tools/win16/os2/inc/wnapidec.inc new file mode 100644 index 000000000..dccb1cc16 --- /dev/null +++ b/private/oleauto/tools/win16/os2/inc/wnapidec.inc @@ -0,0 +1,68 @@ +' ------------------------------------------------------------------------ +' WNAPIDEC.TXT -- (Sample) Windows 3.0 API Declarations for TESTDrvr +' +' Copyright (C) 1991 Microsoft Corporation +' +' The following are provided for sample purposes only. You should only +' copy the ones you use into your code in order to save code space and +' parse time. +' +' You have a royalty-free right to use, modify, reproduce and distribute +' this file (and/or any modified version) in any way you find useful, +' provided that you agree Microsoft has no warranty, obligation or +' liability for its contents. Refer to the Microsoft Windows Programmer's +' Reference for further information. +' +' ------------------------------------------------------------------------ +'------------------------------------------------------------------------- + + +' General Purpose Defines + + Type RECT + left As Integer + top As Integer + right As Integer + bottom As Integer + End Type + + +' SAMPLE WINDOWS API DECLARATIONS, from USER.EXE and KERNEL.EXE + +Declare Sub GetClientRect Lib "User" (hWnd%, lpRect As RECT) +Declare Sub GetWindowRect Lib "User" (hWnd%, lpRect As RECT) + +Declare Function GetFocus Lib "User" () As Integer +Declare Function SetFocus Lib "User" (hWnd%) As Integer + +Declare Function SendMessage% Lib "User" (hWnd%,wMsg%,wParam%,lParam As Any) +Declare Function IsZoomed Lib "User" (hWnd%) As Integer +Declare Function WinExec Lib "Kernel" (lpCmdLine$, nCmdShow%) As Integer + +Declare Function FindWindow Lib "User" (lpClassName$, lpWindowName$) As Integer +Declare Function SetActiveWindow Lib "User" (hWnd%) As Integer +Declare Function GetActiveWindow Lib "User" () As Integer +Declare Function GetWindowText Lib "User" (hWnd%, lpBuffer$, wBufferLen%) As Integer +Declare Function GetDesktopWindow Lib "User" () As Integer + +Declare Function ShowWindow Lib "User" (hWnd%, nCmdShow%) As Integer +' ShowWindow() Commands (values for nCmdShow%) +Const SW_HIDE = 0 +Const SW_SHOWNORMAL = 1 +Const SW_NORMAL = 1 +Const SW_SHOWMINIMIZED = 2 +Const SW_SHOWMAXIMIZED = 3 +Const SW_MAXIMIZE = 3 +Const SW_SHOWNOACTIVATE = 4 +Const SW_SHOW = 5 +Const SW_MINIMIZE = 6 +Const SW_SHOWMINNOACTIVE = 7 +Const SW_SHOWNA = 8 +Const SW_RESTORE = 9 + + +Declare Function GetWindowLong Lib "User" (hWnd%, nIndex%) As Long +' Window field offsets (nIndex%) for GetWindowLong() +Const GWL_WNDPROC = (-4) +Const GWL_STYLE = (-16) +Const GWL_EXSTYLE = (-20) diff --git a/private/oleauto/tools/win16/os2/lib/wchkstk.asm b/private/oleauto/tools/win16/os2/lib/wchkstk.asm new file mode 100644 index 000000000..fa7628ea4 --- /dev/null +++ b/private/oleauto/tools/win16/os2/lib/wchkstk.asm @@ -0,0 +1,164 @@ + page ,132 + title wchkstk.asm - Stack checking for windows +;*** +;wchkstk.asm - Stack checking for windows +; +; Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +; +;Purpose: +; Windows versions of the C lib stack checking routines. +; +;Revision History: +; 09-19-89 JCR Broke these routines out of winstart.asm. +; 11-28-89 GJF Fixed copyright +; 01-25-90 JCR Moved _aaltstkovr here from windstart.asm +; 02-12-90 JCR Added __chkstk label for compatibility... +; 07-23-91 JCR Load dgroup on error, WIN DLL bug fix +; +;******************************************************************************* + +.xlist +include version.inc +?PLM = 1 +include cmacros.inc +include rterr.inc +.list + + externW pStackTop ; Windows stack values + externW pStackMin + externW pStackBot + + externNP __amsg_exit ; fatal error handler + +ifdef SS_NEQ_DGROUP +externP <__GetDGROUP> ; Function to recover DGROUP +endif + +sBegin data + assumes ds,data + +globalCP __aaltstkovr,-1 ; Holds alternate overflow handler + +sEnd data + + +sBegin code + assumes cs,code + +page +;*** +; _aNchkstk - Near check stack routine (windows version) +; +;Purpose: +; +;Entry: +; AX = size of local frame +; +;Exit: +; SP = new stackframe if successful +; +;Uses: +; +;Exceptions: +; Gives out of stack overflow error and aborts if there is not enough +; stack space for the routine. +; +;******************************************************************************* + +ife sizeC +labelP <PUBLIC,__chkstk> +endif + +labelP <PUBLIC, __aNchkstk> + pop bx ; get return address + inc ax + and al,0FEh ; round up to nearest even + sub ax,sp + jae astkovr + neg ax + cmp ss:[pStackTop],ax + ja astkovr + cmp ss:[pStackMin],ax + jbe nchkstk1 + mov ss:[pStackMin],ax +nchkstk1: + mov sp,ax + jmp bx ; jump to return address + + +page +;*** +; _aFchkstk - Far check stack routine (windows version) +; +;Purpose: +; +;Entry: +; AX = size of local frame +; +;Exit: +; SP = new stackframe if successful +; +;Uses: +; +;Exceptions: +; Gives out of stack overflow error and aborts if there is not enough +; stack space for the routine. +; +;******************************************************************************* + + +if sizeC +labelP <PUBLIC,__chkstk> +endif + +labelP <PUBLIC, __aFchkstk> + pop bx + pop dx ; get far return address + inc ax + and al,0FEh ; round up to nearest even + sub ax,sp + jae stkerr + neg ax + cmp ss:[pStackTop],ax + ja stkerr + cmp ss:[pStackMin],ax + jbe fchkstk1 + mov ss:[pStackMin],ax +fchkstk1: + mov sp,ax + push dx + push bx +ccc proc far + ret +ccc endp + +; +; Stack fault has occurred +; (common to both near and far check stack routines) +; + +stkerr: + +ifdef SS_NEQ_DGROUP + call __GetDGROUP + mov ds,ax ;set DS = DGROUP +endif + mov dx,word ptr [__aaltstkovr] + inc dx + jz astkovr + jmp [__aaltstkovr] ; alternate stack handler + +astkovr: + ;; *** HACK!!! *** + ;; Hammer the value to a low setting so FATALAPPEXIT will + ;; "work"... + mov ss:[pStackTop], 0 ; set it to a value + ;; *** EOH!!! *** + + mov ax,_RT_STACK ; stack overflow error + jmp __amsg_exit ; fatal error handler + + +sEnd code + + end |