GDAL

cpl_progress.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: CPL - Common Portability Library
5 * Author: Frank Warmerdam, warmerdam@pobox.com
6 * Purpose: Prototypes and definitions for progress functions.
7 *
8 ******************************************************************************
9 * Copyright (c) 2013, Frank Warmerdam
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 ****************************************************************************/
29
30#ifndef CPL_PROGRESS_H_INCLUDED
31#define CPL_PROGRESS_H_INCLUDED
32
33#include "cpl_port.h"
34
35 CPL_C_START
36
37typedef int(CPL_STDCALL *GDALProgressFunc)(double dfComplete,
38 const char *pszMessage,
39 void *pProgressArg);
40
41int CPL_DLL CPL_STDCALL GDALDummyProgress(double, const char *, void *);
42int CPL_DLL CPL_STDCALL GDALTermProgress(double, const char *, void *);
43int CPL_DLL CPL_STDCALL GDALScaledProgress(double, const char *, void *);
44void CPL_DLL *CPL_STDCALL GDALCreateScaledProgress(double, double,
45 GDALProgressFunc, void *);
46void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress(void *);
47 CPL_C_END
48
49#if defined(__cplusplus) && defined(GDAL_COMPILATION)
50extern "C++"
51{
53 struct CPL_DLL GDALScaledProgressReleaser
54 {
55 void operator()(void *p) const
56 {
57 GDALDestroyScaledProgress(p);
58 }
59 };
60
62}
63#endif
64
65#endif /* ndef CPL_PROGRESS_H_INCLUDED */
cpl_port.h
Core portability definitions for CPL.
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:299
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:295