source: trunk/include/winos2def.h

Last change on this file was 21916, checked in by dmik, 14 years ago

Merge branch gcc-kmk to trunk.

File size: 2.5 KB
RevLine 
[223]1/* $Id: winos2def.h,v 1.6 1999-06-26 18:24:23 sandervl Exp $ */
[4]2
3/*
4 *
5 * OS/2 declarations when including os2win.h
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11#ifndef __WINOS2DEF_H__
12#define __WINOS2DEF_H__
13
[17]14#define APIENTRY_OS2 _System
[4]15
[17]16/*
17typedef unsigned long HMODULE;
[4]18typedef unsigned long HINSTANCE;
[17]19//typedef unsigned long ULONG;
20typedef char * PSZ;
21typedef ULONG MPARAM;
22typedef ULONG APIRET;
23*/
[4]24
[17]25#ifndef MPARAM
26# define MPARAM void*
27#endif
28
29#ifndef APIRET
30# define APIRET ULONG
31#endif
32
[21916]33typedef char *PSZ;
34typedef const char *PCSZ;
[17]35
[18]36
[4]37extern "C" {
38 BOOL APIENTRY_OS2 WinPostMsg(HWND hwnd,
39 ULONG msg,
40 MPARAM mp1,
41 MPARAM mp2);
42
43 APIRET APIENTRY_OS2 DosSleep(ULONG msec);
44
45}
46
[175]47inline BOOL _WinPostMsg(HWND a, ULONG b, MPARAM c, MPARAM d)
48{
49 BOOL yyrc;
[223]50 USHORT sel = RestoreOS2FS();
[175]51
52 yyrc = WinPostMsg(a, b, c, d);
53 SetFS(sel);
54
55 return yyrc;
[21916]56}
[175]57
58#undef WinPostMsg
59#define WinPostMsg _WinPostMsg
60
61inline ULONG _DosSleep(ULONG a)
62{
63 ULONG yyrc;
[223]64 USHORT sel = RestoreOS2FS();
[175]65
66 yyrc = DosSleep(a);
67 SetFS(sel);
68
69 return yyrc;
[21916]70}
[175]71
72#undef DosSleep
73#define DosSleep _DosSleep
74
75
76 typedef struct _COUNTRYCODE /* ctryc */
77 {
78 ULONG country;
79 ULONG codepage;
80 } COUNTRYCODE;
81 typedef COUNTRYCODE *PCOUNTRYCODE;
82
83 typedef struct _COUNTRYINFO /* ctryi */
84 {
85 ULONG country;
86 ULONG codepage;
87 ULONG fsDateFmt;
88 CHAR szCurrency[5];
89 CHAR szThousandsSeparator[2];
90 CHAR szDecimal[2];
91 CHAR szDateSeparator[2];
92 CHAR szTimeSeparator[2];
93 UCHAR fsCurrencyFmt;
94 UCHAR cDecimalPlace;
95 UCHAR fsTimeFmt;
96 USHORT abReserved1[2];
97 CHAR szDataSeparator[2];
98 USHORT abReserved2[5];
99 } COUNTRYINFO, *PCOUNTRYINFO;
100
101extern "C" {
102 APIRET APIENTRY_OS2 DosQueryCtryInfo(ULONG cb,
103 PCOUNTRYCODE pcc,
104 PCOUNTRYINFO pci,
105 PULONG pcbActual);
106}
107
108inline ULONG _DosQueryCtryInfo(ULONG a, PCOUNTRYCODE b, PCOUNTRYINFO c, PULONG d)
109{
110 ULONG yyrc;
[223]111 USHORT sel = RestoreOS2FS();
[175]112
113 yyrc = DosQueryCtryInfo(a, b, c, d);
114 SetFS(sel);
115
116 return yyrc;
[21916]117}
[175]118
119#undef DosQueryCtryInfo
120#define DosQueryCtryInfo _DosQueryCtryInfo
121
122
123
[17]124#endif //__WINOS2DEF_H__
Note: See TracBrowser for help on using the repository browser.