All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bytedeco.javacpp.presets.tesseract Maven / Gradle / Ivy

There is a newer version: 4.0.0-1.4.4
Show newest version
/*
 * Copyright (C) 2014-2015 Samuel Audet
 *
 * Licensed either under the Apache License, Version 2.0, or (at your option)
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation (subject to the "Classpath" exception),
 * either version 2, or any later version (collectively, the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     http://www.gnu.org/licenses/
 *     http://www.gnu.org/software/classpath/license.html
 *
 * or as provided in the LICENSE.txt file that accompanied this code.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.bytedeco.javacpp.presets;

import org.bytedeco.javacpp.annotation.Platform;
import org.bytedeco.javacpp.annotation.Properties;
import org.bytedeco.javacpp.tools.Info;
import org.bytedeco.javacpp.tools.InfoMap;
import org.bytedeco.javacpp.tools.InfoMapper;

/**
 *
 * @author Samuel Audet
 */
@Properties(target="org.bytedeco.javacpp.tesseract", inherit=lept.class, value={
    @Platform(define="TESS_CAPI_INCLUDE_BASEAPI", include={"tesseract/platform.h", "tesseract/apitypes.h", "tesseract/unichar.h", "tesseract/host.h",
        "tesseract/tesscallback.h", "tesseract/publictypes.h", "tesseract/thresholder.h", "tesseract/pageiterator.h", "tesseract/ltrresultiterator.h",
        "tesseract/resultiterator.h", "tesseract/strngs.h", "tesseract/genericvector.h", "tesseract/baseapi.h", "tesseract/capi.h"}, link="[email protected]"),
    @Platform(value="android", link="tesseract"),
    @Platform(value="windows", link="libtesseract", preload="libtesseract-3") })
public class tesseract implements InfoMapper {
    public void map(InfoMap infoMap) {
        infoMap.put(new Info("__NATIVE__", "ultoa", "snprintf", "vsnprintf", "SIGNED",
                             "TESS_API", "TESS_LOCAL", "_TESS_FILE_BASENAME_", "TESS_CALL").cppTypes().annotations().cppText(""))
               .put(new Info("STRING_IS_PROTECTED").define(false))
               .put(new Info("BOOL").cast().valueTypes("boolean").pointerTypes("BoolPointer").define())
               .put(new Info("TESS_CAPI_INCLUDE_BASEAPI").define())
               .put(new Info("MIN_INT32").javaText("public static final int MIN_INT32 = 0x80000000;"))

               .put(new Info("Pix").pointerTypes("PIX").skip())
               .put(new Info("Pta").pointerTypes("PTA").skip())
               .put(new Info("Box").pointerTypes("BOX").skip())
               .put(new Info("Pixa").pointerTypes("PIXA").skip())
               .put(new Info("Boxa").pointerTypes("BOXA").skip())

               .put(new Info("TessResultCallback1").pointerTypes("DeleteCallback").define().virtualize())

               .put(new Info("TessCallback1").pointerTypes("CharClearCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("CharCompareCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("CharWriteCallback").define().virtualize())
               .put(new Info("TessResultCallback3").pointerTypes("CharReadCallback").define().virtualize())
               .put(new Info("GenericVector").pointerTypes("CharGenericVector").define())

               .put(new Info("TessCallback1").pointerTypes("StringClearCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("StringCompareCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("StringWriteCallback").define().virtualize())
               .put(new Info("TessResultCallback3").pointerTypes("StringReadCallback").define().virtualize())
               .put(new Info("GenericVector").pointerTypes("StringGenericVector").define())
               .put(new Info("GenericVector::WithinBounds").skip())

               .put(new Info("TessCallback1").pointerTypes("IntClearCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("IntCompareCallback").define().virtualize())
               .put(new Info("TessResultCallback2").pointerTypes("IntWriteCallback").define().virtualize())
               .put(new Info("TessResultCallback3").pointerTypes("IntReadCallback").define().virtualize())
               .put(new Info("GenericVector").pointerTypes("IntGenericVector").define())
               .put(new Info("GenericVector").cast().pointerTypes("IntGenericVector"))
               .put(new Info("GenericVectorEqEq").pointerTypes("IntGenericVectorEqEq").define())

               .put(new Info("GenericVector::delete_data_pointers", "GenericVector::SerializeClasses", "GenericVector::DeSerializeClasses",
                             "GenericVector::delete_data_pointers", "GenericVector::SerializeClasses", "GenericVector::DeSerializeClasses",
                             "GenericVector::contains_index", "GenericVector::delete_data_pointers", "GenericVector::binary_search",
                             "GenericVector::bool_binary_search", "GenericVector::choose_nth_item", "GenericVector::dot_product",
                             "GenericVector::sort", "GenericVectorEqEq::GenericVectorEqEq(int)").skip())

               .put(new Info("TessCallback3").pointerTypes("TruthCallback3").define().virtualize())
               .put(new Info("TessCallback4").pointerTypes("TruthCallback4").define().virtualize())

               .put(new Info("list_rec").cppText("#define list_rec LIST"))
               .put(new Info("INT_FEATURE_ARRAY").valueTypes("INT_FEATURE_STRUCT"))

               .put(new Info("tesseract::ImageThresholder()").javaText(""))

               .put(new Info("TessBaseAPISetFillLatticeFunc", "TessBaseGetBlockTextOrientations", "TessBaseAPIInit", "TessCallbackUtils_::FailIsRepeatable", "LPBLOB", "kPolyBlockNames",
                             "tesseract::TessBaseAPI::SetFillLatticeFunc", "tesseract::ImageThresholder::GetPixRectGrey", "tesseract::ImageThresholder::GetPixRect",
                             "tesseract::ImageThresholder::SetRectangle", "tesseract::ImageThresholder::SetImage", "tesseract::ImageThresholder::IsEmpty",
                             "tesseract::ResultIterator::kComplexWord", "tesseract::ResultIterator::kMinorRunEnd", "tesseract::ResultIterator::kMinorRunStart",
                             "UNICHAR::utf8_step", "UNICHAR::utf8_str", "UNICHAR::first_uni", "UNICHAR::UNICHAR(char*, int)", "UNICHAR::UNICHAR(int)").skip());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy