… | |
… | |
789 | // compose chars are used to represent composite characters |
789 | // compose chars are used to represent composite characters |
790 | // that are not representable in unicode, as well as characters |
790 | // that are not representable in unicode, as well as characters |
791 | // not fitting in the BMP. |
791 | // not fitting in the BMP. |
792 | struct compose_char |
792 | struct compose_char |
793 | { |
793 | { |
794 | // c1 can be any chaarcter != NOCHAR, including another compose character |
794 | // c1 can be any character != NOCHAR, including another compose character |
795 | // c2 must always be a zero-width character or NOCHAR, in case |
795 | // c2 must always be a zero-width character or NOCHAR, in case |
796 | // this just extends beyondthe BMP. |
796 | // this just extends beyond the BMP. |
797 | unicode_t c1, c2; |
797 | unicode_t c1, c2; |
798 | |
798 | |
799 | compose_char (unicode_t c1, unicode_t c2) |
799 | compose_char (unicode_t c1, unicode_t c2) |
800 | : c1(c1), c2(c2) |
800 | : c1(c1), c2(c2) |
801 | { } |
801 | { } |
… | |
… | |
817 | }; |
817 | }; |
818 | |
818 | |
819 | extern class rxvt_composite_vec rxvt_composite; |
819 | extern class rxvt_composite_vec rxvt_composite; |
820 | #endif |
820 | #endif |
821 | |
821 | |
|
|
822 | #if 0 |
822 | // expand the sequence into a static array |
823 | // expand the sequence into a static array |
823 | // works even without ENABLE_COMBINING |
824 | // works even without ENABLE_COMBINING |
824 | template<typename T> |
825 | template<typename T, int max_size_ = 48> |
825 | struct rxvt_compose_expand_static |
826 | struct rxvt_compose_expand_static |
826 | { |
827 | { |
827 | #if ENABLE_COMBINING |
828 | #if ENABLE_COMBINING |
828 | // we arbitrarily limit the maximum number of compose sequences |
|
|
829 | // so we can store them in a static array on the stack. |
|
|
830 | enum { max_size = 48 }; |
829 | enum { max_size = max_size_ }; |
831 | |
830 | |
832 | T chrs[max_size]; |
831 | T chrs[max_size]; |
833 | |
832 | |
834 | // expand sequence and return start ptr |
833 | // expand sequence and return start ptr |
835 | // guarantees at least one output |
834 | // guarantees at least one output |
… | |
… | |
875 | { |
874 | { |
876 | return 1; |
875 | return 1; |
877 | } |
876 | } |
878 | #endif |
877 | #endif |
879 | }; |
878 | }; |
|
|
879 | #endif |
880 | |
880 | |
881 | /****************************************************************************/ |
881 | /****************************************************************************/ |
882 | |
882 | |
883 | #ifdef KEYSYM_RESOURCE |
883 | #ifdef KEYSYM_RESOURCE |
884 | class keyboard_manager; |
884 | class keyboard_manager; |