nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* GLIB - Library of useful routines for C programming |
2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
||
3 | * |
||
4 | * This library is free software; you can redistribute it and/or |
||
5 | * modify it under the terms of the GNU Lesser General Public |
||
6 | * License as published by the Free Software Foundation; either |
||
7 | * version 2 of the License, or (at your option) any later version. |
||
8 | * |
||
9 | * This library is distributed in the hope that it will be useful, |
||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||
12 | * Lesser General Public License for more details. |
||
13 | * |
||
14 | * You should have received a copy of the GNU Lesser General Public |
||
15 | * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
||
16 | */ |
||
17 | |||
18 | /* |
||
19 | * Modified by the GLib Team and others 1997-2000. See the AUTHORS |
||
20 | * file for a list of people on the GLib Team. See the ChangeLog |
||
21 | * files for a list of changes. These files are distributed with |
||
22 | * GLib at ftp://ftp.gtk.org/pub/gtk/. |
||
23 | */ |
||
24 | |||
25 | #ifndef __G_WIN32_H__ |
||
26 | #define __G_WIN32_H__ |
||
27 | |||
28 | #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) |
||
29 | #error "Only <glib.h> can be included directly." |
||
30 | #endif |
||
31 | |||
32 | #include <glib/gtypes.h> |
||
33 | |||
34 | #ifdef G_PLATFORM_WIN32 |
||
35 | |||
36 | G_BEGIN_DECLS |
||
37 | |||
38 | #ifndef MAXPATHLEN |
||
39 | #define MAXPATHLEN 1024 |
||
40 | #endif |
||
41 | |||
42 | #ifdef G_OS_WIN32 |
||
43 | |||
44 | /* |
||
45 | * To get prototypes for the following POSIXish functions, you have to |
||
46 | * include the indicated non-POSIX headers. The functions are defined |
||
47 | * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). But note that |
||
48 | * for POSIX functions that take or return file names in the system |
||
49 | * codepage, in many cases you would want to use the GLib wrappers in |
||
50 | * gstdio.h and UTF-8 instead. |
||
51 | * |
||
52 | * getcwd: <direct.h> (MSVC), <io.h> (mingw32) |
||
53 | * getpid: <process.h> |
||
54 | * access: <io.h> |
||
55 | * unlink: <stdio.h> or <io.h> |
||
56 | * open, read, write, lseek, close: <io.h> |
||
57 | * rmdir: <io.h> |
||
58 | * pipe: <io.h> (actually, _pipe()) |
||
59 | */ |
||
60 | |||
61 | /* For some POSIX functions that are not provided by the MS runtime, |
||
62 | * we provide emulation functions in glib, which are prefixed with |
||
63 | * g_win32_. Or that was the idea at some time, but there is just one |
||
64 | * of those: |
||
65 | */ |
||
66 | GLIB_AVAILABLE_IN_ALL |
||
67 | gint g_win32_ftruncate (gint f, |
||
68 | guint size); |
||
69 | #endif /* G_OS_WIN32 */ |
||
70 | |||
71 | /* The MS setlocale uses locale names of the form "English_United |
||
72 | * States.1252" etc. We want the Unixish standard form "en", "zh_TW" |
||
73 | * etc. This function gets the current thread locale from Windows and |
||
74 | * returns it as a string of the above form for use in forming file |
||
75 | * names etc. The returned string should be deallocated with g_free(). |
||
76 | */ |
||
77 | GLIB_AVAILABLE_IN_ALL |
||
78 | gchar* g_win32_getlocale (void); |
||
79 | |||
80 | /* Translate a Win32 error code (as returned by GetLastError()) into |
||
81 | * the corresponding message. The returned string should be deallocated |
||
82 | * with g_free(). |
||
83 | */ |
||
84 | GLIB_AVAILABLE_IN_ALL |
||
85 | gchar* g_win32_error_message (gint error); |
||
86 | |||
87 | #ifndef _WIN64 |
||
88 | GLIB_DEPRECATED |
||
89 | gchar* g_win32_get_package_installation_directory (const gchar *package, |
||
90 | const gchar *dll_name); |
||
91 | |||
92 | GLIB_DEPRECATED |
||
93 | gchar* g_win32_get_package_installation_subdirectory (const gchar *package, |
||
94 | const gchar *dll_name, |
||
95 | const gchar *subdir); |
||
96 | #endif |
||
97 | |||
98 | GLIB_AVAILABLE_IN_ALL |
||
99 | gchar* g_win32_get_package_installation_directory_of_module (gpointer hmodule); |
||
100 | |||
101 | GLIB_DEPRECATED_IN_2_44_FOR(g_win32_check_windows_version) |
||
102 | guint g_win32_get_windows_version (void); |
||
103 | |||
104 | GLIB_AVAILABLE_IN_ALL |
||
105 | gchar* g_win32_locale_filename_from_utf8 (const gchar *utf8filename); |
||
106 | |||
107 | GLIB_AVAILABLE_IN_2_40 |
||
108 | gchar ** g_win32_get_command_line (void); |
||
109 | |||
110 | /* As of GLib 2.14 we only support NT-based Windows */ |
||
111 | #define G_WIN32_IS_NT_BASED() TRUE |
||
112 | #define G_WIN32_HAVE_WIDECHAR_API() TRUE |
||
113 | |||
114 | #ifndef __GTK_DOC_IGNORE__ |
||
115 | #ifdef G_OS_WIN32 |
||
116 | #ifdef _WIN64 |
||
117 | #define g_win32_get_package_installation_directory g_win32_get_package_installation_directory_utf8 |
||
118 | #define g_win32_get_package_installation_subdirectory g_win32_get_package_installation_subdirectory_utf8 |
||
119 | #endif |
||
120 | |||
121 | GLIB_AVAILABLE_IN_ALL |
||
122 | gchar *g_win32_get_package_installation_directory_utf8 (const gchar *package, |
||
123 | const gchar *dll_name); |
||
124 | GLIB_AVAILABLE_IN_ALL |
||
125 | gchar *g_win32_get_package_installation_subdirectory_utf8 (const gchar *package, |
||
126 | const gchar *dll_name, |
||
127 | const gchar *subdir); |
||
128 | #endif /* G_OS_WIN32 */ |
||
129 | #endif /* __GTK_DOC_IGNORE__ */ |
||
130 | |||
131 | /** |
||
132 | * GWin32OSType: |
||
133 | * @G_WIN32_OS_ANY: The running system can be a workstation or a server edition of |
||
134 | * Windows. The type of the running system is therefore not checked. |
||
135 | * @G_WIN32_OS_WORKSTATION: The running system is a workstation edition of Windows, |
||
136 | * such as Windows 7 Professional. |
||
137 | * @G_WIN32_OS_SERVER: The running system is a server edition of Windows, such as |
||
138 | * Windows Server 2008 R2. |
||
139 | * |
||
140 | * Type of Windows edition to check for at run-time. |
||
141 | **/ |
||
142 | typedef enum |
||
143 | { |
||
144 | G_WIN32_OS_ANY, |
||
145 | G_WIN32_OS_WORKSTATION, |
||
146 | G_WIN32_OS_SERVER, |
||
147 | } GWin32OSType; |
||
148 | |||
149 | GLIB_AVAILABLE_IN_2_44 |
||
150 | gboolean g_win32_check_windows_version (const gint major, |
||
151 | const gint minor, |
||
152 | const gint spver, |
||
153 | const GWin32OSType os_type); |
||
154 | |||
155 | G_END_DECLS |
||
156 | |||
157 | #endif /* G_PLATFORM_WIN32 */ |
||
158 | |||
159 | #endif /* __G_WIN32_H__ */ |