notepad-plus-plus/scintilla/cocoa/DictionaryForCF.h
Christian Grasser ad79718fc8 Update to scintilla 5.5.2 & Lexilla 5.4.0
Release 5.5.2 ( https://www.scintilla.org/scintilla552.zip )

    Released 21 August 2024.
    Add SCI_SETCOPYSEPARATOR for separator between parts of a multiple selection when copied to the clipboard. Feature #1530.
    Add SCI_GETUNDOSEQUENCE to determine whether an undo sequence is active and its nesting depth.
    Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.
    Add SCI_LINEINDENT and SCI_LINEDEDENT. Feature #1524.
    Fix bug on Cocoa where double-click stopped working when system had been running for a long time.
    On Cocoa implement more values of font weight and stretch.

Release 5.4.0 ( https://www.scintilla.org/lexilla540.zip )

    Released 21 August 2024.
    Inside Lexilla, LexerModule instances are now const. This will require changes to applications that modify Lexilla.cxx, which may be done to add custom lexers.
    Lexer added for TOML "toml".
    Bash: Handle backslash in heredoc delimiter. Issue #257.
    Progress: Fix lexing of nested comments. Pull request #258.
    Force lower-casing of case-insensitive keyword lists so keywords match in some lexers. Issue #259.

Close #15564
2024-08-23 02:59:58 +02:00

37 lines
1011 B
C++

/**
* Scintilla source code edit control
* @file DictionaryForCF.h - Wrapper for CFMutableDictionary
*
* Copyright 2024 Neil Hodgson.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#ifndef DICTIONARYFORCF_H
#define DICTIONARYFORCF_H
class DictionaryForCF {
CFMutableDictionaryRef dict;
public:
DictionaryForCF() noexcept :
dict(::CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)) {
}
~DictionaryForCF() {
::CFRelease(dict);
}
CFMutableDictionaryRef get() const noexcept {
return dict;
}
void SetValue(const void *key, const void *value) noexcept {
::CFDictionarySetValue(dict, key, value);
}
void SetItem(const void *key, CFNumberType theType, const void *valuePtr) noexcept {
CFNumberRef number = ::CFNumberCreate(kCFAllocatorDefault, theType, valuePtr);
::CFDictionarySetValue(dict, key, number);
::CFRelease(number);
}
};
#endif