/usr/include/klftools/klfdefs.h is in libklatexformula4-dev 4.0.0-3.
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | /***************************************************************************
* file klfdefs.h
* This file is part of the KLatexFormula Project.
* Copyright (C) 2011 by Philippe Faist
* philippe.faist at bluewin.ch
* *
* 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 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/* $Id: klfdefs.h 971 2016-12-30 04:24:56Z phfaist $ */
#ifndef KLFDEFS_H_
#define KLFDEFS_H_
#include <QObject>
#include <QString>
#include <QVariant>
// EXPORTING SYMBOLS TO E.G. PLUGINS ...
#ifndef KLF_EXPORT
# if defined(Q_OS_WIN)
# if defined(KLF_SRC_BUILD)
# define KLF_EXPORT __declspec(dllexport)
# else
# define KLF_EXPORT __declspec(dllimport)
# endif
# else
# define KLF_EXPORT __attribute__((visibility("default")))
# endif
#endif
// VERSION INFORMATION
KLF_EXPORT const char * klfVersion();
KLF_EXPORT int klfVersionMaj();
KLF_EXPORT int klfVersionMin();
KLF_EXPORT int klfVersionRelease();
KLF_EXPORT QByteArray klfFmt(const char * fmt, ...)
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
#define klfFmtCC (const char*)klfFmt
KLF_EXPORT QByteArray klfFmt(const char * fmt, va_list pp) ;
KLF_EXPORT QByteArray klfFmtDouble(double num, char fmt = 'g', int precision = 6);
#define klfFmtDoubleCC (const char*)klfFmtDouble
#define KLF_FUNC_SINGLE_RUN \
{ static bool first_run = true; if ( ! first_run ) return; first_run = false; }
#define KLF_DECLARE_PRIVATE(ClassName) \
private: \
ClassName##Private *d; \
friend struct ClassName##Private; \
inline ClassName##Private * d_func() { return d; } \
inline const ClassName##Private * d_func() const { return d; }
#define KLF_PRIVATE_HEAD(ClassName) \
private: ClassName *K; \
public: ClassName * parentClass() const { return K; } \
public: ClassName##Private (ClassName * ptr) : K(ptr)
#define KLF_PRIVATE_INHERIT_HEAD(ClassName, BaseInit) \
private: ClassName *K; \
public: ClassName * parentClass() const { return K; } \
public: ClassName##Private (ClassName * ptr) BaseInit, K(ptr)
#define KLF_PRIVATE_QOBJ_HEAD(ClassName, QObj) \
private: ClassName *K; \
public: ClassName * parentClass() const { return K; } \
public: ClassName##Private (ClassName * ptr) : QObj(ptr), K(ptr)
#define KLF_INIT_PRIVATE(ClassName) \
do { d = new ClassName##Private(this); } while (0)
#define KLF_DELETE_PRIVATE \
do { if (d != NULL) { delete d; } } while (0)
#define KLF_BLOCK \
for (bool _klf_block_first = true; _klf_block_first; _klf_block_first = false)
#define KLF_TRY(expr, msg, failaction) \
if ( !(expr) ) { \
klfWarning(msg); \
failaction; \
}
#define KLF_DEFINE_PROPERTY_GET(ClassName, type, prop) \
type ClassName::prop() const { return d_func()->prop; }
#define KLF_DEFINE_PROPERTY_GETSET(ClassName, type, prop, Prop) \
KLF_DEFINE_PROPERTY_GET(ClassName, type, prop) \
void ClassName::set##Prop(type value) { d_func()->prop = value; }
#define KLF_DEFINE_PROPERTY_GETSET_C(ClassName, type, prop, Prop) \
KLF_DEFINE_PROPERTY_GET(ClassName, type, prop) \
void ClassName::set##Prop(const type& value) { d_func()->prop = value; }
// utility functions
KLF_EXPORT bool klfIsValidVersion(const QString& v);
KLF_EXPORT int klfVersionCompare(const QString& v1, const QString& v2);
KLF_EXPORT bool klfVersionCompareLessThan(const QString& v1, const QString& v2);
// Import debugging utilities
#include <klfdebug.h>
#endif
|