libs-base/Headers/Additions/GNUstepBase/Win32_Utilities.h
Adam Fedor 6292a363bc * Continuation of NSPathUtilities patches
* configure.ac: Add config-file option
* Headers/Foundation/NSPathUtilities.h: Add GSFindNamedFile, more
NSSearchPathDirectory enums.
* Source/GNUmakefile: Don't install Win32 headers.
* Source/NSPathUtilities.m (InitializePathUtilities, ...): Add
support for reading standard path locations from a configuration
file. Various support functions added/removed to fit.
(GSFindNamedFile): New function.
(GSSetUserName): Do nothing if the user is the same.
(NSHomeDirectoryForUser): Use Windows utilities to get user name
(on Windows, of course).
(NSFullUserName): Default to NSUserName on Windows.
(GSSystemRootDirectory): Mark as deprecated.
(GSDefaultsRootForUser): Correctly return the actual defaults
directory, not the user directory.
(GSStandardPathPrefixes): Mark as deprecated.
(NSSearchPathForDirectoriesInDomains): Add platform paths and
additional search directories.
* Source/NSUserDefaults (pathForUser): Correct use of
GSDefaultsRootForUser. Remove obsolete path checking and
defaults location checking. (Patches from Sheldon Gill
with some modifications).

* Documentation/Base.gsdoc: Update documentation.
* Headers/Additions/GNUstepBase/Win32_Utilities.h,
Source/win32/Win32_Utilities.m: Fix function arguments.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20908 72102866-910b-0410-8b05-ffd578937521
2005-03-15 04:24:26 +00:00

61 lines
2.1 KiB
C

/** Win32 Utility support functions for GNUStep
Copyright (C) 2004 Free Software Foundation, Inc.
Written by: Sheldon Gill <address@hidden>
Date: 2004
This file is part of the GNUstep Base Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
AutogsdocSource: Win32_Utilities.m
*/
#ifndef __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
#define __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
#include <Foundation/NSString.h>
/* TODO:
- Win32GetUserProfileDirectory()
Find profile directory for non-current user.
- Win32FindDirectory()
NOT IMPLEMENTED YET!
-Win32NSNumberFromRegistry()
NOT IMPLEMENTED YET!
-Win32NSDataFromRegistry()
NOT IMPLEMENTED YET!
*/
#if defined(__WIN32__)
/* ---- Init Functions ---- */
void Win32_Utilities_init(void);
void Win32_Utilities_fini(void);
/* ---- Environment Functions ---- */
NSString *Win32NSStringFromEnvironmentVariable(const char * envVar);
/* ---- Registry Functions ---- */
HKEY Win32OpenRegistry(HKEY hive, const char *key);
NSString *Win32NSStringFromRegistry(HKEY regkey, NSString *regValue);
// NSNumber *Win32NSNumberFromRegistry(HKEY regkey, NSString *regValue);
// NSData *Win32NSDataFromRegistry(HKEY regkey, NSString *regValue);
/* ---- Path Functions ---- */
NSString *Win32GetUserProfileDirectory(NSString *userName);
NSString *Win32FindDirectory(DWORD DirCLSID);
#endif /* defined(__WIN32__) */
#endif /* */