epoc32/include/stdapis/glib-2.0/glib/gwin32.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/gwin32.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/gwin32.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,103 @@
     1.4 -gwin32.h
     1.5 +/* GLIB - Library of useful routines for C programming
     1.6 + * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
     1.7 + *
     1.8 + * This library is free software; you can redistribute it and/or
     1.9 + * modify it under the terms of the GNU Lesser General Public
    1.10 + * License as published by the Free Software Foundation; either
    1.11 + * version 2 of the License, or (at your option) any later version.
    1.12 + *
    1.13 + * This library is distributed in the hope that it will be useful,
    1.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 + * Lesser General Public License for more details.
    1.17 + *
    1.18 + * You should have received a copy of the GNU Lesser General Public
    1.19 + * License along with this library; if not, write to the
    1.20 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.21 + * Boston, MA 02111-1307, USA.
    1.22 + */
    1.23 +
    1.24 +/*
    1.25 + * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
    1.26 + * file for a list of people on the GLib Team.  See the ChangeLog
    1.27 + * files for a list of changes.  These files are distributed with
    1.28 + * GLib at ftp://ftp.gtk.org/pub/gtk/. 
    1.29 + */
    1.30 +
    1.31 +#ifndef __G_WIN32_H__
    1.32 +#define __G_WIN32_H__
    1.33 +
    1.34 +#include <glib/gtypes.h>
    1.35 +
    1.36 +#ifdef G_PLATFORM_WIN32
    1.37 +
    1.38 +G_BEGIN_DECLS
    1.39 +
    1.40 +#ifndef MAXPATHLEN
    1.41 +#define MAXPATHLEN 1024
    1.42 +#endif
    1.43 +
    1.44 +#ifdef G_OS_WIN32
    1.45 +
    1.46 +/*
    1.47 + * To get prototypes for the following POSIXish functions, you have to
    1.48 + * include the indicated non-POSIX headers. The functions are defined
    1.49 + * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32).
    1.50 + *
    1.51 + * getcwd: <direct.h> (MSVC), <io.h> (mingw32)
    1.52 + * getpid: <process.h>
    1.53 + * access: <io.h>
    1.54 + * unlink: <stdio.h> or <io.h>
    1.55 + * open, read, write, lseek, close: <io.h>
    1.56 + * rmdir: <io.h>
    1.57 + * pipe: <io.h>
    1.58 + */
    1.59 +
    1.60 +/* pipe is not in OLDNAMES.LIB or -lmoldname-msvc. */
    1.61 +#define pipe(phandles)	_pipe (phandles, 4096, _O_BINARY)
    1.62 +
    1.63 +/* For some POSIX functions that are not provided by the MS runtime,
    1.64 + * we provide emulation functions in glib, which are prefixed with
    1.65 + * g_win32_. Or that was the idea at some time, but there is just one
    1.66 + * of those:
    1.67 + */
    1.68 +gint		g_win32_ftruncate	(gint		 f,
    1.69 +					 guint		 size);
    1.70 +#endif /* G_OS_WIN32 */
    1.71 +
    1.72 +/* The MS setlocale uses locale names of the form "English_United
    1.73 + * States.1252" etc. We want the Unixish standard form "en", "zh_TW"
    1.74 + * etc. This function gets the current thread locale from Windows and
    1.75 + * returns it as a string of the above form for use in forming file
    1.76 + * names etc. The returned string should be deallocated with g_free().
    1.77 + */
    1.78 +gchar* 		g_win32_getlocale  (void);
    1.79 +
    1.80 +/* Translate a Win32 error code (as returned by GetLastError()) into
    1.81 + * the corresponding message. The returned string should be deallocated
    1.82 + * with g_free().
    1.83 + */
    1.84 +gchar*          g_win32_error_message (gint error);
    1.85 +
    1.86 +#define g_win32_get_package_installation_directory g_win32_get_package_installation_directory_utf8
    1.87 +#define g_win32_get_package_installation_subdirectory g_win32_get_package_installation_subdirectory_utf8
    1.88 +
    1.89 +gchar*          g_win32_get_package_installation_directory (gchar *package,
    1.90 +							    gchar *dll_name);
    1.91 +
    1.92 +gchar*          g_win32_get_package_installation_subdirectory (gchar *package,
    1.93 +							       gchar *dll_name,
    1.94 +							       gchar *subdir);
    1.95 +
    1.96 +guint		g_win32_get_windows_version (void);
    1.97 +
    1.98 +gchar*          g_win32_locale_filename_from_utf8 (const gchar *utf8filename);
    1.99 +
   1.100 +#define G_WIN32_IS_NT_BASED() (g_win32_get_windows_version () < 0x80000000)
   1.101 +#define G_WIN32_HAVE_WIDECHAR_API() (G_WIN32_IS_NT_BASED ())
   1.102 +
   1.103 +G_END_DECLS
   1.104 +
   1.105 +#endif	 /* G_PLATFORM_WIN32 */
   1.106 +
   1.107 +#endif /* __G_WIN32_H__ */