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 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef CPL_PROGRESS_H_INCLUDED
15#define CPL_PROGRESS_H_INCLUDED
16
17#include "cpl_port.h"
18
19 CPL_C_START
20
21 typedef int(CPL_STDCALL *GDALProgressFunc)(double dfComplete,
22 const char *pszMessage,
23 void *pProgressArg);
24
25 int CPL_DLL CPL_STDCALL GDALDummyProgress(double, const char *, void *);
26 int CPL_DLL CPL_STDCALL GDALTermProgress(double, const char *, void *);
27 int CPL_DLL CPL_STDCALL GDALScaledProgress(double, const char *, void *);
28 void CPL_DLL *CPL_STDCALL GDALCreateScaledProgress(double, double,
29 GDALProgressFunc, void *);
30 void CPL_DLL CPL_STDCALL GDALDestroyScaledProgress(void *);
31 CPL_C_END
32
33#if defined(__cplusplus) && defined(GDAL_COMPILATION)
34 extern "C++"
35{
37 struct CPL_DLL GDALScaledProgressReleaser
38 {
39 void operator()(void *p) const
40 {
41 GDALDestroyScaledProgress(p);
42 }
43 };
44
46}
47#endif
48
49#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:283
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:279