commonMain.people_body.hands._allHands.kt Maven / Gradle / Ivy
package org.kodein.emoji.people_body.hands
import org.kodein.emoji.Emoji
import org.kodein.emoji.EmojiFinder
import org.kodein.emoji.addSt1Variations
import org.kodein.emoji.addSt2Variations
internal fun EmojiFinder.addAllHands() {
add(intArrayOf(0x1f44f), _ClappingHands)
addVariations(intArrayOf(0x1f44f, 0x0), _ClappingHands, 1)
add(intArrayOf(0x1f64c), _RaisingHands)
addVariations(intArrayOf(0x1f64c, 0x0), _RaisingHands, 1)
add(intArrayOf(0x1faf6), _HeartHands)
addVariations(intArrayOf(0x1faf6, 0x0), _HeartHands, 1)
add(intArrayOf(0x1f450), _OpenHands)
addVariations(intArrayOf(0x1f450, 0x0), _OpenHands, 1)
add(intArrayOf(0x1f932), _PalmsUpTogether)
addVariations(intArrayOf(0x1f932, 0x0), _PalmsUpTogether, 1)
add(intArrayOf(0x1f91d), _Handshake)
addVariations(intArrayOf(0x1f91d, 0x0), _Handshake, 1)
addVariations(intArrayOf(0x1faf1, 0x0, 0x200d, 0x1faf2, 0x0), _Handshake, 1, 4)
add(intArrayOf(0x1f64f), _FoldedHands)
addVariations(intArrayOf(0x1f64f, 0x0), _FoldedHands, 1)
}
internal suspend fun SequenceScope.yieldAllHands() {
yield(_ClappingHands)
yield(_RaisingHands)
yield(_HeartHands)
yield(_OpenHands)
yield(_PalmsUpTogether)
yield(_Handshake)
yield(_FoldedHands)
}
internal val countHands = 7
/**
* All Emoji of the People & Body: hands subgroup.
*/
public fun Emoji.Companion.sequenceHands(): Sequence =
sequence { yieldAllHands() }
/**
* All Emoji of the People & Body: hands subgroup.
*
* WARNING: This can be quite heavy to construct.
* This method should be called in background and its result should be cached.
*/
public fun Emoji.Companion.listHands(): List =
ArrayList(countHands).also { list -> sequenceHands().forEach { list.add(it) } }
@Deprecated("Renamed listHands.", replaceWith = ReplaceWith("listHands()"), level = DeprecationLevel.WARNING)
public fun Emoji.Companion.allHands(): List =
listHands()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy