2009-02-12 11:23 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

+ harbour/include/hbwapi.h

    As this header will be required fot many libraries in contrib
    I have placed it in core folder. It will pave me the way to 
    isolated WINAPI wrappers as discussed earlier. Before I begin to
    shift functions in harbour/contrib/hbwin please feel free to
    include in this header whatever you feel will be required
    for such transition.
This commit is contained in:
Pritpal Bedi
2009-02-12 19:27:56 +00:00
parent 86e84ba537
commit db9e9390e8
2 changed files with 99 additions and 0 deletions

View File

@@ -8,6 +8,16 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-02-12 11:23 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
+ harbour/include/hbwapi.h
As this header will be required fot many libraries in contrib
I have placed it in core folder. It will pave me the way to
isolated WINAPI wrappers as discussed earlier. Before I begin to
shift functions in harbour/contrib/hbwin please feel free to
include in this header whatever you feel will be required
for such transition.
2009-02-12 12:48 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* source/lang/msgrukoi.c
* source/lang/msgruwin.c

89
harbour/include/hbwapi.h Normal file
View File

@@ -0,0 +1,89 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* Compiler Expression Optimizer
*
* Copyright 2009 Development Team
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#ifndef __HBWAPI_H
#define __HBWAPI_H
#include "hbapi.h"
#include "hbapiitm.h"
/*
If we implement pointers than we need to return back pointers in all
those functions which return a handle. My existing code checks for the
return values and compare it against some numeric. So for time being
I am deferring the use of pointers till we come up with a common solution.
#define wapi_par_WPARAM( n ) ( ( WPARAM ) ( ISNUM( n ) ? ( HB_PTRDIFF ) hb_parnint( n ) : hb_parptr( n ) ) )
*/
#define wapi_par_WNDPROC( n ) ( ( WNDPROC ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_WPARAM( n ) ( ( WPARAM ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_LPARAM( n ) ( ( LPARAM ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HWND( n ) ( ( HWND ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HDC( n ) ( ( HDC ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HANDLE( n ) ( ( HANDLE ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HGDIOBJ( n ) ( ( HGDIOBJ ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HBITMAP( n ) ( ( HBITMAP ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HFONT( n ) ( ( HFONT ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_HINSTANCE( n ) ( ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_COLORREF( n ) ( ( COLORREF ) ( HB_PTRDIFF ) hb_parnint( n ) )
#define wapi_par_STRUCT( n ) ( hb_parc( n ) )
#define wapi_ret_HANDLE( n ) ( hb_retnint( ( HB_PTRDIFF ) n ) )
#define wapi_ret_HRESULT( hr ) ( hb_retnint( ( HB_PTRDIFF ) hr ) )
#endif //__HBWAPI_H