office-gobmx/hwpfilter/source/hcode.h

86 lines
2.6 KiB
C
Raw Normal View History

2010-10-27 07:03:58 -05:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2003-10-15 08:44:37 -05:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2003-10-15 08:44:37 -05:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2003-10-15 08:44:37 -05:00
*
* OpenOffice.org - a multi-platform office productivity suite
2003-10-15 08:44:37 -05:00
*
* This file is part of OpenOffice.org.
2003-10-15 08:44:37 -05:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2003-10-15 08:44:37 -05:00
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2003-10-15 08:44:37 -05:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2003-10-15 08:44:37 -05:00
*
************************************************************************/
#ifndef _HCODE_H_
#define _HCODE_H_
#include "hwplib.h"
/**
* Codetype of Korean
* KSSM - Johap, KS - Wansung
*/
enum { KSSM, KS, UNICODE };
/**
* Transfer combination-code for internal using of hwp to ascii
*/
DLLEXPORT int hcharconv(hchar ch, hchar *dest, int codeType) ;
DLLEXPORT int kssm_hangul_to_ucs2(hchar ch, hchar *dest) ;
DLLEXPORT hchar ksc5601_han_to_ucs2 (hchar);
DLLEXPORT hchar ksc5601_sym_to_ucs2 (hchar);
DLLEXPORT hchar* hstr2ucsstr(hchar* hstr, hchar* ubuf);
/**
* <EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ϼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ<EFBFBD>Ѵ<EFBFBD>.
*/
DLLEXPORT int hstr2ksstr(hchar* hstr, char* buf);
/**
* <EFBFBD>ѱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>ִ<EFBFBD> char<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ<EFBFBD>Ѵ<EFBFBD>.
*/
DLLEXPORT hchar *kstr2hstr( uchar *src, hchar *dest );
/**
* hwp<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>θ<EFBFBD> unix<EFBFBD><EFBFBD><EFBFBD>·<EFBFBD> <EFBFBD>ٲ۴<EFBFBD>.
*/
DLLEXPORT char *urltounix(const char *src, char *buf );
/**
* hwp<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>θ<EFBFBD> windows<EFBFBD><EFBFBD><EFBFBD>·<EFBFBD> <EFBFBD>ٲ۴<EFBFBD>.
*/
#ifdef _WIN32
DLLEXPORT char *urltowin(const char *src, char *buf );
#endif
/**
* Transfer interger to string following format
*/
DLLEXPORT char* Int2Str(int value, const char *format, char *buf);
/**
* color<EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD><EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><EFBFBD><EFBFBD> color<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
*/
DLLEXPORT char *hcolor2str(uchar color, uchar shade, char *buf, bool bIsChar = false);
DLLEXPORT char *base64_encode_string( const uchar *buf, unsigned int len );
DLLEXPORT double calcAngle(int x1, int y1, int x2, int y2);
#endif /* _HCODE_H_ */
2010-10-27 07:03:58 -05:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */