/usr/include/vips/VDisplay.h is in libvips-dev 8.4.5-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | /* VIPS display class.
*
* Hide details of im_col_display API.
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef IM_VDISPLAY_H
#define IM_VDISPLAY_H
/* SWIG includes this file directly rather than going through vipscpp.h ... so
* we have to define these macros here as well.
*/
#ifdef SWIG
#define VIPS_NAMESPACE_START namespace vips {
#define VIPS_NAMESPACE_END }
#endif /*SWIG*/
/* Wrap pointers to these, but we don't want to import all the old C API. Just
* declare them.
*/
extern "C" {
struct im_col_display;
struct im_col_tab_disp;
}
VIPS_NAMESPACE_START
// Wrapper over im_col_display with ref counting
class VDisplay {
struct refblock {
im_col_display *disp; // im_col_display struct
im_col_tab_disp *luts; // luts built from this display
int priv; // disp is ours, or system
int nrefs; // Refs to us
// Invalidate lut
void cleanlut();
// Break attached stuff
void cleanref();
// Get ready to write
void wready() throw( VError );
// Check that luts are up-to-date
void cluts() throw( VError );
refblock() : disp(0), luts(0), priv(0), nrefs(1) {}
~refblock() { cleanref(); }
};
refblock *ref;
public:
enum VDisplayType {
BARCO, // Does many corrections for us
DUMB // Needs many corrections
};
// Get named display
VDisplay( const char *name ) throw( VError );
// Get default display
VDisplay();
// Copy constructor
VDisplay( const VDisplay &a ) { ref = a.ref; ref->nrefs++; }
// Assignment
VDisplay &operator=( const VDisplay &a );
// Destructor
virtual ~VDisplay();
// The matrix type we use
typedef float matrix[3][3];
// Extract display pointer
void *disp() const { return( ref->disp ); }
// Extract luts pointer, rebuilding luts if necessary
im_col_tab_disp *luts() const throw( VError )
{ ref->cluts(); return( ref->luts ); }
};
VIPS_NAMESPACE_END
#endif /*IM_VDISPLAY_H*/
|