/* Copyright (C) 2011-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk3wxs.cpt */ /** @file dk3wxs.h Header file for the dk3wxs module. */ #ifndef DK3WXS_H_INCLUDED /** Avoid multiple inclusions. */ #define DK3WXS_H_INCLUDED 1 #line 9 "dk3wxs.cpt" #ifdef DK3_USE_WX #undef DK3_USE_WX #endif /** Use wxWidgets libraries to build GUI programs. */ #define DK3_USE_WX 1 #if 0 #include #else #include #include #include #endif #ifndef WX_WXPREC_H_INCLUDED #include #define WX_WXPREC_H_INCLUDED 1 #endif #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #if DK4_HAVE_WX_CHARTYPE_H #if DK4_HAVE_WX_DEFS_H #ifndef WX_DEFS_H_INCLUDED #include #define WX_DEFS_H_INCLUDED #endif #endif #ifndef WX_CHARTYPE_H_INCLUDED #include #define WX_CHARTYPE_H_INCLUDED 1 #endif #else #if DK4_HAVE_WX_WXCHAR_H #if DK4_HAVE_WX_DEFS_H #ifndef WX_DEFS_H_INCLUDED #include #define WX_DEFS_H_INCLUDED #endif #endif #ifndef WX_WXCHAR_H_INCLUDED #include #define WX_WXCHAR_H_INCLUDED 1 #endif #else #ifndef WX_WX_H_INCLUDED #include #define WX_WX_H_INCLUDED #endif #endif #endif #endif /** Pointer to wxChar string. */ typedef wxChar *DK3_PWXCHAR; /** Pointer to constant wxChar string. */ typedef wxChar const *DK3_PCWXCHAR; #if DK3_ON_WINDOWS || DK3_HAVE_BACKSLASH /** File name separator. */ #define DK3_WX_CHAR_SEP wxT('\\') #else /** File name separator. */ #define DK3_WX_CHAR_SEP wxT('/') #endif #ifdef __cplusplus extern "C" { #endif /** Copy string. * @param d Destination pointer. * @param s Source pointer. */ void dk3wxs_cpy(wxChar *d, wxChar const *s); /** Copy string, cut to buffer size if necessary. * @param d Destination pointer. * @param s Source pointer. * @param n Size of \a d (number of characters). */ void dk3wxs_ncpy(wxChar *d, wxChar const *s, size_t n); /** Concatenate two strings. * @param d Destination pointer. * @param s Source pointer. */ void dk3wxs_cat(wxChar *d, wxChar const *s); /** Convert to lower-case character. * @param c Character to convert. * @return Conversion result. */ wxChar dk3wxs_tolower(wxChar c); /** Convert to upper-case character. * @param c Character to convert. * @return Conversion result. */ wxChar dk3wxs_toupper(wxChar c); /** Find left-most orrucance of character in string. * @param s String probably containing the character. * @param c Character to search for. * @return Pointer to character position on success, NULL on error. */ wxChar * dk3wxs_chr(wxChar const *s, wxChar c); /** Find right-most orrucance of character in string. * @param s String probably containing the character. * @param c Character to search for. * @return Pointer to character position on success, NULL on error. */ wxChar * dk3wxs_rchr(wxChar const *s, wxChar c); /** Calculate string length. * @param s String to process. * @return String length (number of characters). */ size_t dk3wxs_len(wxChar const *s); /** Duplicate string into dynamically allocated memory. * Use dk3_delete() to release the memory when done. * @param s String to duplicate. * @return Pointer to new string on success, NULL on error. */ wxChar * dk3wxs_dup(wxChar const *s); /** Duplicate string into dynamically allocated memory. * Use dk3_delete() to release the memory when done. * @param s String to duplicate. * @param app Application structure for diagnostics, may be NULL. * @return Pointer to new string on success, NULL on error. */ wxChar * dk3wxs_dup_app(wxChar const *s, dk3_app_t *app); /** Compare two strings, use only the first \a n characters. * @param l Left side string. * @param r Right side string. * @param n Number of characters to use in comparison. * @return 1 for l>r, 0 for l=r, -1 for lr, 0 for l=r, -1 for lr, 0 for l=r, -1 for l