| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 1 | /* |
| cristy | b56bb24 | 2014-11-25 17:12:48 +0000 | [diff] [blame^] | 2 | Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 3 | dedicated to making software imaging solutions freely available. |
| 4 | |
| 5 | You may not use this file except in compliance with the License. |
| 6 | obtain a copy of the License at |
| 7 | |
| 8 | http://www.imagemagick.org/script/license.php |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | MagickCore Windows NT private methods. |
| 17 | */ |
| 18 | #ifndef _MAGICKCORE_NT_BASE_PRIVATE_H |
| 19 | #define _MAGICKCORE_NT_BASE_PRIVATE_H |
| 20 | |
| cristy | 6398ec7 | 2013-11-28 02:00:27 +0000 | [diff] [blame] | 21 | #include "MagickCore/delegate.h" |
| 22 | #include "MagickCore/delegate-private.h" |
| 23 | #include "MagickCore/exception.h" |
| 24 | #include "MagickCore/splay-tree.h" |
| 25 | |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 26 | #if defined(__cplusplus) || defined(c_plusplus) |
| 27 | extern "C" { |
| 28 | #endif |
| 29 | |
| cristy | 3a745a2 | 2011-10-08 13:17:57 +0000 | [diff] [blame] | 30 | #if defined(MAGICKCORE_WINDOWS_SUPPORT) |
| 31 | |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 32 | #if !defined(XS_VERSION) |
| 33 | struct dirent |
| 34 | { |
| 35 | char |
| 36 | d_name[2048]; |
| 37 | |
| 38 | int |
| 39 | d_namlen; |
| 40 | }; |
| 41 | |
| 42 | typedef struct _DIR |
| 43 | { |
| 44 | HANDLE |
| 45 | hSearch; |
| 46 | |
| dirk | 33cccbb | 2013-11-15 15:06:30 +0000 | [diff] [blame] | 47 | WIN32_FIND_DATAW |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 48 | Win32FindData; |
| 49 | |
| 50 | BOOL |
| 51 | firsttime; |
| 52 | |
| 53 | struct dirent |
| 54 | file_info; |
| 55 | } DIR; |
| 56 | |
| 57 | typedef struct _NTMEMORYSTATUSEX |
| 58 | { |
| 59 | DWORD |
| 60 | dwLength, |
| 61 | dwMemoryLoad; |
| 62 | |
| 63 | DWORDLONG |
| 64 | ullTotalPhys, |
| 65 | ullAvailPhys, |
| 66 | ullTotalPageFile, |
| 67 | ullAvailPageFile, |
| 68 | ullTotalVirtual, |
| 69 | ullAvailVirtual, |
| 70 | ullAvailExtendedVirtual; |
| 71 | } NTMEMORYSTATUSEX; |
| 72 | |
| cristy | 277f3a2 | 2012-12-10 13:18:45 +0000 | [diff] [blame] | 73 | #if !defined(__MINGW32__) && !defined(__MINGW64__) |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 74 | struct timezone |
| 75 | { |
| 76 | int |
| 77 | tz_minuteswest, |
| 78 | tz_dsttime; |
| 79 | }; |
| 80 | #endif |
| 81 | |
| 82 | typedef UINT |
| 83 | (CALLBACK *LPFNDLLFUNC1)(DWORD,UINT); |
| 84 | |
| 85 | typedef UINT |
| 86 | (CALLBACK *LPFNDLLFUNC2)(NTMEMORYSTATUSEX *); |
| 87 | |
| 88 | #endif |
| 89 | |
| 90 | #if defined(MAGICKCORE_BZLIB_DELEGATE) |
| 91 | # if defined(_WIN32) |
| 92 | # define BZ_IMPORT 1 |
| 93 | # endif |
| 94 | #endif |
| 95 | |
| 96 | extern MagickPrivate char |
| cristy | daeba5e | 2011-10-13 17:32:44 +0000 | [diff] [blame] | 97 | *NTGetLastError(void); |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 98 | |
| 99 | #if !defined(MAGICKCORE_LTDL_DELEGATE) |
| 100 | extern MagickPrivate const char |
| 101 | *NTGetLibraryError(void); |
| 102 | #endif |
| 103 | |
| 104 | #if !defined(XS_VERSION) |
| 105 | extern MagickPrivate const char |
| 106 | *NTGetLibraryError(void); |
| 107 | |
| 108 | extern MagickPrivate DIR |
| 109 | *NTOpenDirectory(const char *); |
| 110 | |
| 111 | extern MagickPrivate double |
| 112 | NTElapsedTime(void), |
| 113 | NTUserTime(void); |
| 114 | |
| 115 | extern MagickPrivate int |
| 116 | Exit(int), |
| cristy | 277f3a2 | 2012-12-10 13:18:45 +0000 | [diff] [blame] | 117 | #if !defined(__MINGW32__) && !defined(__MINGW64__) |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 118 | gettimeofday(struct timeval *,struct timezone *), |
| 119 | #endif |
| 120 | IsWindows95(void), |
| 121 | NTCloseDirectory(DIR *), |
| 122 | NTCloseLibrary(void *), |
| 123 | NTControlHandler(void), |
| 124 | NTExitLibrary(void), |
| 125 | NTTruncateFile(int,off_t), |
| 126 | NTGhostscriptDLL(char *,int), |
| 127 | NTGhostscriptEXE(char *,int), |
| 128 | NTGhostscriptFonts(char *,int), |
| 129 | NTGhostscriptLoadDLL(void), |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 130 | NTInitializeLibrary(void), |
| 131 | NTSetSearchPath(const char *), |
| 132 | NTSyncMemory(void *,size_t,int), |
| 133 | NTUnmapMemory(void *,size_t), |
| dirk | 4dd7567 | 2014-10-12 12:52:42 +0000 | [diff] [blame] | 134 | NTSystemCommand(const char *,char *); |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 135 | |
| 136 | extern MagickPrivate ssize_t |
| 137 | NTSystemConfiguration(int), |
| 138 | NTTellDirectory(DIR *); |
| 139 | |
| 140 | extern MagickPrivate MagickBooleanType |
| 141 | NTGatherRandomData(const size_t,unsigned char *), |
| 142 | NTGetExecutionPath(char *,const size_t), |
| 143 | NTGetModulePath(const char *,char *), |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 144 | NTReportEvent(const char *,const MagickBooleanType), |
| 145 | NTReportException(const char *,const MagickBooleanType); |
| 146 | |
| 147 | extern MagickPrivate struct dirent |
| 148 | *NTReadDirectory(DIR *); |
| 149 | |
| 150 | extern MagickPrivate unsigned char |
| 151 | *NTRegistryKeyLookup(const char *), |
| 152 | *NTResourceToBlob(const char *); |
| 153 | |
| 154 | extern MagickPrivate void |
| cristy | 9f3b4fc | 2014-02-08 14:56:20 +0000 | [diff] [blame] | 155 | NTWindowsGenesis(void), |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 156 | *NTGetLibrarySymbol(void *,const char *), |
| 157 | *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType), |
| 158 | *NTOpenLibrary(const char *), |
| cristy | 417d845 | 2011-10-13 17:09:49 +0000 | [diff] [blame] | 159 | NTSeekDirectory(DIR *,ssize_t); |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 160 | |
| 161 | #endif /* !XS_VERSION */ |
| 162 | |
| cristy | 3a745a2 | 2011-10-08 13:17:57 +0000 | [diff] [blame] | 163 | #endif /* MAGICKCORE_WINDOWS_SUPPORT */ |
| 164 | |
| cristy | 72bdba3 | 2011-10-08 00:16:18 +0000 | [diff] [blame] | 165 | #if defined(__cplusplus) || defined(c_plusplus) |
| 166 | } |
| 167 | #endif /* !C++ */ |
| 168 | |
| 169 | #endif /* !_MAGICKCORE_NT_BASE_H */ |