mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-23 18:45:56 +01:00
Added old libPropList compatibility through proplist-compat.h
This commit is contained in:
@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS = no-dependencies
|
||||
# is this a kluge? if so, how should i do it?
|
||||
includedir = @includedir@/WINGs
|
||||
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h proplist-compat.h
|
||||
|
||||
|
||||
@@ -757,6 +757,10 @@ WMPropList* WMCreatePLArray(WMPropList *elem, ...);
|
||||
|
||||
WMPropList* WMCreatePLDictionary(WMPropList *key, WMPropList *value, ...);
|
||||
|
||||
WMPropList* WMRetainPropList(WMPropList *plist);
|
||||
|
||||
void WMReleasePropList(WMPropList *plist);
|
||||
|
||||
void WMInsertInPLArray(WMPropList *plist, int index, WMPropList *item);
|
||||
|
||||
void WMAddToPLArray(WMPropList *plist, WMPropList *item);
|
||||
@@ -771,9 +775,7 @@ void WMRemoveFromPLDictionary(WMPropList *plist, WMPropList *key);
|
||||
|
||||
WMPropList* WMMergePLDictionaries(WMPropList *dest, WMPropList *source);
|
||||
|
||||
WMPropList* WMRetainPropList(WMPropList *plist);
|
||||
|
||||
void WMReleasePropList(WMPropList *plist);
|
||||
int WMGetPropListItemCount(WMPropList *plist);
|
||||
|
||||
Bool WMIsPLString(WMPropList *plist);
|
||||
|
||||
@@ -785,8 +787,6 @@ Bool WMIsPLDictionary(WMPropList *plist);
|
||||
|
||||
Bool WMIsPropListEqualTo(WMPropList *plist, WMPropList *other);
|
||||
|
||||
int WMGetPropListItemCount(WMPropList *plist);
|
||||
|
||||
char* WMGetFromPLString(WMPropList *plist);
|
||||
|
||||
WMData* WMGetFromPLData(WMPropList *plist);
|
||||
@@ -805,10 +805,10 @@ WMPropList* WMShallowCopyPropList(WMPropList *plist);
|
||||
|
||||
WMPropList* WMDeepCopyPropList(WMPropList *plist);
|
||||
|
||||
char* WMGetPropListDescription(WMPropList *plist, Bool indented);
|
||||
|
||||
WMPropList* WMCreatePropListFromDescription(char *desc);
|
||||
|
||||
char* WMGetPropListDescription(WMPropList *plist, Bool indented);
|
||||
|
||||
WMPropList* WMReadPropListFromFile(char *file);
|
||||
|
||||
Bool WMWritePropListToFile(WMPropList *plist, char *path, Bool atomically);
|
||||
|
||||
74
WINGs/WINGs/proplist-compat.h
Normal file
74
WINGs/WINGs/proplist-compat.h
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
#ifndef _PROPLIST_COMPAT_H_
|
||||
#define _PROPLIST_COMPAT_H_
|
||||
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
|
||||
typedef WMPropList* proplist_t;
|
||||
|
||||
#define PLSetCaseSensitive(c) WMPLSetCaseSensitive(c)
|
||||
|
||||
#define PLMakeString(bytes) WMCreatePLString(bytes)
|
||||
#define PLMakeData(bytes, length) WMCreatePLDataFromBytes(bytes, length)
|
||||
#define PLMakeArrayFromElements(pl, ...) WMCreatePLArray(pl, ...)
|
||||
#define PLMakeDictionaryFromEntries(key, value, ...) WMCreatePLDictionary(key, value, ...)
|
||||
|
||||
#define PLRetain(pl) WMRetainPropList(pl)
|
||||
#define PLRelease(pl) WMReleasePropList(pl)
|
||||
|
||||
#define PLInsertArrayElement(array, pl, pos) WMInsertInPLArray(array, pos, pl)
|
||||
#define PLAppendArrayElement(array, pl) WMAddToPLArray(array, pl)
|
||||
#define PLRemoveArrayElement(array, pos) WMDeleteFromPLArray(array, pos)
|
||||
#define PLInsertDictionaryEntry(dict, key, value) WMPutInPLDictionary(dict, key, value)
|
||||
#define PLRemoveDictionaryEntry(dict, key) WMRemoveFromPLDictionary(dict, key)
|
||||
#define PLMergeDictionaries(dest, source) WMMergePLDictionaries(dest, source)
|
||||
|
||||
#define PLGetNumberOfElements(pl) WMGetPropListItemCount(pl)
|
||||
|
||||
#define PLIsString(pl) WMIsPLString(pl)
|
||||
#define PLIsData(pl) WMIsPLData(pl)
|
||||
#define PLIsArray(pl) WMIsPLArray(pl)
|
||||
#define PLIsDictionary(pl) WMIsPLDictionary(pl)
|
||||
#define PLIsSimple(pl) (WMIsPLString(pl) || WMIsPLData(pl))
|
||||
#define PLIsCompound(pl) (WMIsPLArray(pl) || WMIsPLDictionary(pl))
|
||||
#define PLIsEqual(pl1, pl2) WMIsPropListEqualTo(pl1, pl2)
|
||||
|
||||
#define PLGetString(pl) WMGetFromPLString(pl)
|
||||
#define PLGetDataBytes(pl) WMGetPLDataBytes(pl)
|
||||
#define PLGetDataLength(pl) WMGetPLDataLength(pl)
|
||||
#define PLGetArrayElement(pl, index) WMGetFromArray(pl, index)
|
||||
#define PLGetDictionaryEntry(pl, key) WMGetFromPLDictionary(pl, key)
|
||||
#define PLGetAllDictionaryKeys(pl) WMGetPLDictionaryKeys(pl)
|
||||
|
||||
#define PLShallowCopy(pl) WMShallowCopyPropList(pl)
|
||||
#define PLDeepCopy(pl) WMDeepCopyPropList(pl)
|
||||
|
||||
#define PLGetProplistWithDescription(desc) WMCreatePropListFromDescription(desc)
|
||||
#define PLGetDescriptionIndent(pl, level) WMGetPropListDescription(pl, True)
|
||||
#define PLGetDescription(pl) WMGetPropListDescription(pl, False)
|
||||
#define PLGetStringDescription(pl) WMGetPropListDescription(pl, False)
|
||||
#define PLGetDataDescription(pl) WMGetPropListDescription(pl, False)
|
||||
|
||||
#define PLGetProplistWithPath(file) WMReadPropListFromFile(file)
|
||||
#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file, atm)
|
||||
|
||||
|
||||
|
||||
//#define PLSetStringCmpHook(fn)
|
||||
//#define PLDeepSynchronize(pl) PLDeepSynchronize_is_not_supported
|
||||
//#define PLSynchronize(pl) PLSynchronize_is_not_supported
|
||||
//#define PLShallowSynchronize(pl) error_PLShallowSynchronize_is_not_supported
|
||||
//#define PLSetFilename(pl, filename) error_PLSetFilename_is_not_supported
|
||||
//#define PLGetFilename(pl, filename) error_PLGetFilename_is_not_supported
|
||||
//#define PLGetDomainNames()
|
||||
//#define PLGetDomain(name)
|
||||
//#define PLSetDomain(name, value, kickme)
|
||||
//#define PLDeleteDomain(name, kickme)
|
||||
//#define PLRegister(name, callback)
|
||||
//#define PLUnregister(name)
|
||||
//#define PLGetContainer(pl)
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user