├── COPYING ├── COPYING.GFDL ├── COPYING.UNICODE ├── Makefile.meson ├── README.md ├── TODO ├── data ├── gucharmap-1.png ├── gucharmap-2.png ├── gucharmap.desktop.in.in ├── gucharmap.metainfo.xml.in ├── meson.build ├── meson_desktopfile.py └── metainfo.its ├── docs └── reference │ ├── gucharmap-docs.sgml │ └── meson.build ├── gucharmap.doap ├── gucharmap ├── Gucharmap-2.90.metadata ├── gen-guch-unicode-tables.pl ├── gucharmap-block-chapters-model.c ├── gucharmap-block-chapters-model.h ├── gucharmap-block-codepoint-list.c ├── gucharmap-block-codepoint-list.h ├── gucharmap-chapters-model.c ├── gucharmap-chapters-model.h ├── gucharmap-chapters-view.c ├── gucharmap-chapters-view.h ├── gucharmap-charmap.c ├── gucharmap-charmap.h ├── gucharmap-chartable-accessible.c ├── gucharmap-chartable-accessible.h ├── gucharmap-chartable-cell-accessible.c ├── gucharmap-chartable-cell-accessible.h ├── gucharmap-chartable.c ├── gucharmap-chartable.h ├── gucharmap-codepoint-list.c ├── gucharmap-codepoint-list.h ├── gucharmap-init.c ├── gucharmap-macros.h ├── gucharmap-marshal.list ├── gucharmap-menus.ui ├── gucharmap-mini-fontsel.c ├── gucharmap-mini-fontsel.h ├── gucharmap-print-operation.c ├── gucharmap-print-operation.h ├── gucharmap-private.h ├── gucharmap-script-chapters-model.c ├── gucharmap-script-chapters-model.h ├── gucharmap-script-codepoint-list.c ├── gucharmap-script-codepoint-list.h ├── gucharmap-search-dialog.c ├── gucharmap-search-dialog.h ├── gucharmap-settings.c ├── gucharmap-settings.h ├── gucharmap-type-builtins.c.template ├── gucharmap-type-builtins.h.template ├── gucharmap-unicode-info.c ├── gucharmap-unicode-info.h ├── gucharmap-version.h.in ├── gucharmap-window.c ├── gucharmap-window.h ├── gucharmap.gresource.xml ├── gucharmap.h ├── gucharmap.pc.in ├── main.c ├── meson.build ├── org.gnome.Charmap.gschema.xml └── unicode-i18n.h ├── help ├── C │ ├── figures │ │ └── gucharmap_window.png │ ├── index.docbook │ ├── l10n.txt │ └── legal.xml ├── LINGUAS ├── bg │ ├── bg.po │ └── figures │ │ └── gucharmap_window.png ├── ca │ ├── ca.po │ └── figues │ │ └── gucharmap_window.png ├── cs │ ├── cs.po │ └── figures │ │ └── gucharmap_window.png ├── de │ ├── de.po │ └── figures │ │ └── gucharmap_window.png ├── el │ ├── el.po │ └── figures │ │ └── gucharmap_window.png ├── en_GB │ └── en_GB.po ├── es │ ├── es.po │ └── figures │ │ └── gucharmap_window.png ├── fi │ ├── fi.po │ └── figures │ │ └── gucharmap_window.png ├── fr │ ├── figures │ │ └── gucharmap_window.png │ └── fr.po ├── gl │ └── gl.po ├── hu │ ├── figures │ │ └── gucharmap_window.png │ └── hu.po ├── id │ └── id.po ├── ko │ ├── figures │ │ └── gucharmap_window.png │ └── ko.po ├── meson.build ├── oc │ └── oc.po ├── pl │ ├── figures │ │ └── gucharmap_window.png │ └── pl.po ├── pt_BR │ ├── figures │ │ └── gucharmap_window.png │ └── pt_BR.po ├── ru │ └── ru.po ├── sl │ └── sl.po ├── sv │ ├── figures │ │ └── gucharmap_window.png │ └── sv.po ├── uk │ └── uk.po ├── vi │ └── vi.po └── zh_CN │ ├── figures │ └── gucharmap_window.png │ └── zh_CN.po ├── meson.build ├── meson_changelog.sh ├── meson_options.txt └── po ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── README ├── af.po ├── am.po ├── ar.po ├── as.po ├── ast.po ├── az.po ├── be.po ├── be@latin.po ├── bg.po ├── bn.po ├── bn_IN.po ├── br.po ├── bs.po ├── ca.po ├── ca@valencia.po ├── cs.po ├── cy.po ├── da.po ├── de.po ├── dz.po ├── el.po ├── en@shaw.po ├── en_CA.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── ga.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hr.po ├── hu.po ├── id.po ├── is.po ├── it.po ├── ja.po ├── ka.po ├── kk.po ├── kn.po ├── ko.po ├── lt.po ├── lv.po ├── mai.po ├── meson.build ├── mi.po ├── mk.po ├── ml.po ├── mn.po ├── mr.po ├── ms.po ├── nb.po ├── ne.po ├── nl.po ├── nn.po ├── oc.po ├── or.po ├── pa.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ro.po ├── ru.po ├── rw.po ├── si.po ├── sk.po ├── sl.po ├── sq.po ├── sr.po ├── sr@latin.po ├── sv.po ├── ta.po ├── te.po ├── tg.po ├── th.po ├── tr.po ├── ug.po ├── uk.po ├── vi.po ├── wa.po ├── xh.po ├── zh_CN.po ├── zh_HK.po └── zh_TW.po /COPYING.UNICODE: -------------------------------------------------------------------------------- 1 | UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE 2 | 3 | See Terms of Use 4 | for definitions of Unicode Inc.’s Data Files and Software. 5 | 6 | NOTICE TO USER: Carefully read the following legal agreement. 7 | BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S 8 | DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), 9 | YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE 10 | TERMS AND CONDITIONS OF THIS AGREEMENT. 11 | IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE 12 | THE DATA FILES OR SOFTWARE. 13 | 14 | COPYRIGHT AND PERMISSION NOTICE 15 | 16 | Copyright © 1991-2023 Unicode, Inc. All rights reserved. 17 | Distributed under the Terms of Use in https://www.unicode.org/copyright.html. 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining 20 | a copy of the Unicode data files and any associated documentation 21 | (the "Data Files") or Unicode software and any associated documentation 22 | (the "Software") to deal in the Data Files or Software 23 | without restriction, including without limitation the rights to use, 24 | copy, modify, merge, publish, distribute, and/or sell copies of 25 | the Data Files or Software, and to permit persons to whom the Data Files 26 | or Software are furnished to do so, provided that either 27 | (a) this copyright and permission notice appear with all copies 28 | of the Data Files or Software, or 29 | (b) this copyright and permission notice appear in associated 30 | Documentation. 31 | 32 | THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF 33 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 34 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 35 | NONINFRINGEMENT OF THIRD PARTY RIGHTS. 36 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS 37 | NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL 38 | DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 39 | DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 40 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 41 | PERFORMANCE OF THE DATA FILES OR SOFTWARE. 42 | 43 | Except as contained in this notice, the name of a copyright holder 44 | shall not be used in advertising or otherwise to promote the sale, 45 | use or other dealings in these Data Files or Software without prior 46 | written authorization of the copyright holder. 47 | -------------------------------------------------------------------------------- /Makefile.meson: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this library. If not, see . 15 | 16 | srcdir=@srcdir@ 17 | builddir=@builddir@ 18 | 19 | # 20 | 21 | NTHREADS = 1 22 | NJOBS = -j$(NTHREADS) 23 | NINJA = ninja $(NJOBS) 24 | 25 | MESON = meson 26 | 27 | # 28 | 29 | all: 30 | $(NINJA) 31 | 32 | check: 33 | MESON_TESTTHREADS=$(NTHREADS) $(NINJA) test 34 | 35 | clean: 36 | $(NINJA) clean 37 | 38 | coverage: 39 | $(NINJA) coverage 40 | 41 | install: 42 | $(NINJA) install 43 | 44 | uninstall: 45 | $(NINJA) uninstall 46 | 47 | dist: 48 | $(MESON) dist --no-tests 49 | 50 | distcheck: 51 | $(MESON) dist 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Gucharmap 2 | ========= 3 | 4 | Unicode data 5 | ------------ 6 | 7 | Note that to build gucharmap, you need to provide the (absolute) path 8 | to the unicode data files to the -Ducd_path=... argument when running 9 | meson. These data files are not included in gucharmap; you need to 10 | download them separately, or use the package provided by your 11 | distribution. E.g. on fedora, install the unicode-ucd package. 12 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - Maybe change the keyboard and mouse navigation to do prelight stuff; 2 | only blue when you click or press enter or whatever? 3 | 4 | - Paste to jump to a character [done only in the case the chartable is focused 5 | and the pasted character is in the current script/block] 6 | 7 | - Write gtk docs for the charmap and mini_fontsel widgets. 8 | 9 | - Find out about strangenesses (like the list of DnD targets) and fix 10 | them if appropriate. 11 | 12 | - Think about the search; should it find computed hangul syllables, 13 | etc? 14 | 15 | - Edit menu. [UGLY. Not planning to do it.] 16 | 17 | - Maybe make the size of the zoom font configurable? 18 | 19 | - Tooltips on the scrollbar. 20 | 21 | - Daniel doesn't like the case (upper) of the character names. 22 | 23 | - Split Expand/Collapse All into two menu items? [this menu item is gone] 24 | 25 | - Save state??? 26 | 27 | - Web browser-like forward/back for characters visited? Need to be 28 | smart about what to count as "visited". 29 | 30 | - gunihan, another program in the gucharmap package, with the same 31 | functionality as http://www.unicode.org/charts/unihansearch.html 32 | (suggested by Sebastien). 33 | 34 | - All features in unibook. 35 | 36 | - Include as much of the unidata as makes sense. 37 | 38 | - Hide gucharmap-chartable-*accessible.[ch] symbols. 39 | 40 | - Fix zoom window positioning; sometimes it doesn't work. 41 | 42 | - Fix expose slowness. 43 | 44 | - GucharmapScriptCodepointList should use GUnicodeScript instead of strings 45 | -------------------------------------------------------------------------------- /data/gucharmap-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/data/gucharmap-1.png -------------------------------------------------------------------------------- /data/gucharmap-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/data/gucharmap-2.png -------------------------------------------------------------------------------- /data/gucharmap.desktop.in.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | # VERSION=@VERSION@ 3 | Name=Character Map 4 | Comment=Insert special characters into documents 5 | Keywords=font;unicode; 6 | Exec=gucharmap 7 | Icon=accessories-character-map 8 | Terminal=false 9 | Type=Application 10 | Categories=GNOME;GTK;Utility; 11 | StartupNotify=true 12 | -------------------------------------------------------------------------------- /data/gucharmap.metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 30 | 32 | gucharmap.desktop 33 | GPL-3.0+ or GFDL-1.3-only 34 | GPL-3.0+ 35 | Character Map 36 | Insert special characters into documents 37 | 38 |

39 | GNOME Character Map is a Unicode character map program, part of GNOME desktop. 40 | This program allows characters to be displayed by unicode block or script type. 41 | It includes brief descriptions of related characters and occasionally meanings 42 | of the character in question. 43 |

44 |

45 | Gucharmap can also be used to input or enter characters (by copy and paste). 46 | The search functionality allows the use of several search methods, including 47 | by unicode name or code point of the character. 48 |

49 |
50 | 51 | 52 | https://gitlab.gnome.org/GNOME/gucharmap/-/raw/master/data/gucharmap-1.png 53 | 54 | 55 | https://gitlab.gnome.org/GNOME/gucharmap/-/raw/master/data/gucharmap-2.png 56 | 57 | 58 | 59 | ModernToolkit 60 | UserDocs 61 | 62 | https://wiki.gnome.org/Apps/Gucharmap 63 | https://gitlab.gnome.org/GNOME/gucharmap/-/issues 64 | https://help.gnome.org/users/gucharmap/stable/ 65 | https://l10n.gnome.org/module/gucharmap/ 66 | https://gitlab.gnome.org/GNOME/gucharmap 67 | GNOME 68 | gucharmap 69 | gucharmap.desktop 70 |
71 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | # Appstream data 17 | 18 | metainfo_its = [ 19 | 'metainfo.its', 20 | ] 21 | 22 | metainfodir = gucharmap_prefix / gucharmap_datadir / 'metainfo' 23 | 24 | i18n.itstool_join( 25 | input: 'gucharmap.metainfo.xml.in', 26 | install: true, 27 | install_dir: metainfodir, 28 | install_tag: 'metadata', 29 | its_files: metainfo_its, 30 | mo_targets: gettext_targets[0], 31 | output: '@BASENAME@', 32 | ) 33 | 34 | # Desktop file 35 | 36 | desktopdatadir = gucharmap_prefix / gucharmap_datadir / 'applications' 37 | 38 | desktop_conf = { 39 | 'VERSION': gucharmap_version, 40 | } 41 | 42 | desktop_in = configure_file( 43 | input: 'gucharmap.desktop.in.in', 44 | output: '@BASENAME@', 45 | configuration: desktop_conf, 46 | install: false, 47 | ) 48 | 49 | i18n.merge_file( 50 | input: desktop_in, 51 | output: '@BASENAME@', 52 | type: 'desktop', 53 | po_dir: po_dir, 54 | install: true, 55 | install_dir: desktopdatadir, 56 | ) 57 | 58 | meson.add_install_script( 59 | 'meson_desktopfile.py', 60 | desktopdatadir, 61 | 'gucharmap.desktop', 62 | ) 63 | -------------------------------------------------------------------------------- /data/meson_desktopfile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright © 2019 Christian Persch 3 | # 4 | # This programme is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 3 of the License, or (at your 7 | # option) any later version. 8 | # 9 | # This programme is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # See the GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this programme. If not, see . 16 | 17 | import os 18 | import subprocess 19 | import sys 20 | 21 | if os.environ.get('DESTDIR'): 22 | sys.exit(0) 23 | 24 | prefix = os.environ['MESON_INSTALL_PREFIX'] 25 | desktopfile = os.path.join(prefix, sys.argv[1], sys.argv[2]) 26 | 27 | rv = subprocess.call(['desktop-file-validate', desktopfile]) 28 | sys.exit(rv) 29 | -------------------------------------------------------------------------------- /data/metainfo.its: -------------------------------------------------------------------------------- 1 | 2 | 11 | 14 | 15 | 17 | 29 | 30 | 33 | 34 | 37 | 40 | 43 | 46 | 49 | 50 | 51 | 54 | 57 | 60 | 61 | -------------------------------------------------------------------------------- /docs/reference/gucharmap-docs.sgml: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]> 5 | 6 | 7 | gucharmap Reference Manual 8 | for gucharmap 16. 9 | The latest version of this documentation can be found on-line at 10 | https://gitlab.gnome.org/GNOME/gucharmap/. 11 | 12 | 13 | 14 | API Reference 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Appendix 28 | 29 | Object Hierarchy 30 | 31 | 32 | 33 | Object Index 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /docs/reference/meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | libgucharmap_private_headers = [ 17 | 'config.h', 18 | 'gucharmap-chartable-accessible.h', 19 | 'gucharmap-chartable-cell-accessible.h', 20 | 'gucharmap-font-codepoint-list.h', 21 | 'gucharmap-mini-fontsel.h', 22 | 'gucharmap-print-operation.h', 23 | 'gucharmap-private.h', 24 | 'gucharmap-search-dialog.h', 25 | 'gucharmap-settings.h', 26 | 'gucharmap-type-builtins.h', 27 | 'gucharmap-version.h', 28 | 'gucharmap-window.h', 29 | 'gucharmap.h', 30 | 'unicode-blocks.h', 31 | 'unicode-categories.h', 32 | 'unicode-names.h', 33 | 'unicode-nameslist.h', 34 | 'unicode-scripts.h', 35 | 'unicode-unihan.h', 36 | 'unicode-versions.h', 37 | ] 38 | 39 | atk_dep = dependency('atk') 40 | cairo_dep = dependency('cairo') 41 | pango_dep = dependency('pango') 42 | 43 | atk_prefix = glib_dep.get_pkgconfig_variable('prefix') 44 | cairo_prefix = cairo_dep.get_pkgconfig_variable('prefix') 45 | glib_prefix = glib_dep.get_pkgconfig_variable('prefix') 46 | pango_prefix = gtk3_dep.get_pkgconfig_variable('prefix') 47 | 48 | fixxrefs = [ 49 | '--extra-dir=' + atk_prefix / gnome.gtkdoc_html_dir('atk'), 50 | '--extra-dir=' + cairo_prefix / gnome.gtkdoc_html_dir('cairo'), 51 | '--extra-dir=' + glib_prefix / gnome.gtkdoc_html_dir('glib'), 52 | '--extra-dir=' + glib_prefix / gnome.gtkdoc_html_dir('gobject'), 53 | '--extra-dir=' + pango_prefix / gnome.gtkdoc_html_dir('pango'), 54 | ] 55 | 56 | if get_option('gtk3') 57 | 58 | gtk3_prefix = gtk3_dep.get_pkgconfig_variable('prefix') 59 | fixxrefs_gtk3 = fixxrefs + [ 60 | '--extra-dir=' + gtk3_prefix / gnome.gtkdoc_html_dir('gtk'), 61 | ] 62 | 63 | gnome.gtkdoc( 64 | 'gucharmap', 65 | c_args: ['-DGUCHARMAP_COMPILATION', '-Wno-error'], 66 | dependencies: libgucharmap_gtk3_dep, 67 | fixxref_args: fixxrefs_gtk3, 68 | ignore_headers: libgucharmap_private_headers, 69 | include_directories: [top_inc, src_inc], 70 | install: true, 71 | main_sgml: 'gucharmap-docs.sgml', 72 | mkdb_args: ['--sgml-mode', '--output-format=xml',], 73 | module_version: libgucharmap_gtk3_api_version, 74 | namespace: 'gucharmap', 75 | scan_args: ['--rebuild-sections', '--rebuild-types',], 76 | src_dir: [top_inc, src_inc,], 77 | ) 78 | endif 79 | -------------------------------------------------------------------------------- /gucharmap.doap: -------------------------------------------------------------------------------- 1 | 6 | 7 | Character Map 8 | Character map, based on the Unicode Character Database 9 | Character Map, based on the Unicode Character Database 10 | 12 | 14 | 16 | 18 | 19 | C 20 | 21 | 22 | 23 | Christian Persch 24 | chpe 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /gucharmap/Gucharmap-2.90.metadata: -------------------------------------------------------------------------------- 1 | // skip this because vapigen chokes on GUnicharType 2 | unichar_type skip 3 | 4 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-block-chapters-model.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | #include "gucharmap.h" 24 | #include "gucharmap-private.h" 25 | 26 | #include "unicode-blocks.h" 27 | 28 | enum 29 | { 30 | BLOCK_CHAPTERS_MODEL_ID = 0, 31 | BLOCK_CHAPTERS_MODEL_LABEL = GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL, 32 | BLOCK_CHAPTERS_MODEL_LABEL_ATTRS = _GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL_ATTRS, 33 | BLOCK_CHAPTERS_MODEL_BLOCK, 34 | BLOCK_CHAPTERS_MODEL_UNICODE_BLOCK_PTR, 35 | BLOCK_CHAPTERS_MODEL_NUM_COLUMNS 36 | }; 37 | 38 | static void 39 | sort_column_changed_cb (GtkTreeSortable *sortable, 40 | gpointer user_data) 41 | { 42 | GucharmapChaptersModel *model = GUCHARMAP_CHAPTERS_MODEL (sortable); 43 | 44 | if (model->priv->sort_column == BLOCK_CHAPTERS_MODEL_BLOCK) 45 | model->priv->sort_column = BLOCK_CHAPTERS_MODEL_LABEL; 46 | else 47 | model->priv->sort_column = BLOCK_CHAPTERS_MODEL_BLOCK; 48 | 49 | g_signal_handlers_block_by_func(sortable, G_CALLBACK(sort_column_changed_cb), NULL); 50 | gtk_tree_sortable_set_sort_column_id (sortable, 51 | model->priv->sort_column, 52 | GTK_SORT_ASCENDING); 53 | g_signal_handlers_unblock_by_func(sortable, G_CALLBACK(sort_column_changed_cb), NULL); 54 | } 55 | 56 | static void 57 | gucharmap_block_chapters_model_init (GucharmapBlockChaptersModel *model) 58 | { 59 | GucharmapChaptersModel *chapters_model = GUCHARMAP_CHAPTERS_MODEL (model); 60 | GtkListStore *store = GTK_LIST_STORE (model); 61 | GtkTreeIter iter; 62 | guint i; 63 | GType types[] = { 64 | G_TYPE_STRING, 65 | G_TYPE_STRING, 66 | PANGO_TYPE_ATTR_LIST, 67 | G_TYPE_STRING, 68 | G_TYPE_POINTER 69 | }; 70 | PangoAttrList *attr_list; 71 | 72 | attr_list = pango_attr_list_new (); 73 | pango_attr_list_insert (attr_list, pango_attr_style_new (PANGO_STYLE_ITALIC)); 74 | 75 | gtk_list_store_set_column_types (store, G_N_ELEMENTS (types), types); 76 | 77 | gtk_list_store_append (store, &iter); 78 | gtk_list_store_set (store, &iter, 79 | BLOCK_CHAPTERS_MODEL_ID, "All", 80 | BLOCK_CHAPTERS_MODEL_LABEL, _("All"), 81 | BLOCK_CHAPTERS_MODEL_LABEL_ATTRS, attr_list, 82 | BLOCK_CHAPTERS_MODEL_BLOCK, "", 83 | BLOCK_CHAPTERS_MODEL_UNICODE_BLOCK_PTR, NULL, 84 | -1); 85 | 86 | pango_attr_list_unref (attr_list); 87 | 88 | for (i = 0; i < G_N_ELEMENTS (unicode_blocks); i++) 89 | { 90 | static gchar block_start[12]; 91 | const char *block_name; 92 | 93 | g_snprintf (block_start, sizeof (block_start), "%012" G_GUINT32_FORMAT, unicode_blocks[i].start); 94 | block_name = unicode_blocks_strings + unicode_blocks[i].block_name_index; 95 | 96 | gtk_list_store_append (store, &iter); 97 | gtk_list_store_set (store, &iter, 98 | BLOCK_CHAPTERS_MODEL_ID, block_name, 99 | BLOCK_CHAPTERS_MODEL_LABEL, _(block_name), 100 | BLOCK_CHAPTERS_MODEL_LABEL_ATTRS, NULL, 101 | BLOCK_CHAPTERS_MODEL_BLOCK, block_start, 102 | BLOCK_CHAPTERS_MODEL_UNICODE_BLOCK_PTR, unicode_blocks + i, 103 | -1); 104 | } 105 | 106 | g_signal_connect (model, "sort-column-changed", G_CALLBACK (sort_column_changed_cb), NULL); 107 | 108 | /* This will switch to its default BLOCK_CHAPTERS_MODEL_BLOCK when 109 | * gucharmap_chapters_view_set_model() calls 110 | * gtk_tree_sortable_set_sort_column_id() and triggers 111 | * "sort-column-changed". */ 112 | chapters_model->priv->sort_column = BLOCK_CHAPTERS_MODEL_LABEL; 113 | } 114 | 115 | static GucharmapCodepointList * 116 | get_codepoint_list (GucharmapChaptersModel *chapters, 117 | GtkTreeIter *iter) 118 | { 119 | GtkTreeModel *model = GTK_TREE_MODEL (chapters); 120 | UnicodeBlock *unicode_block; 121 | 122 | gtk_tree_model_get (model, iter, BLOCK_CHAPTERS_MODEL_UNICODE_BLOCK_PTR, &unicode_block, -1); 123 | 124 | /* special "All" block */ 125 | if (unicode_block == NULL) 126 | return gucharmap_block_codepoint_list_new (0, UNICHAR_MAX); 127 | 128 | return gucharmap_block_codepoint_list_new (unicode_block->start, unicode_block->end); 129 | } 130 | 131 | static GucharmapCodepointList * 132 | get_book_codepoint_list (GucharmapChaptersModel *model) 133 | { 134 | GucharmapChaptersModelPrivate *model_priv = model->priv; 135 | 136 | if (model_priv->book_list == NULL) { 137 | model_priv->book_list = gucharmap_block_codepoint_list_new (0, UNICHAR_MAX); 138 | } 139 | 140 | return g_object_ref (model_priv->book_list); 141 | } 142 | 143 | /* XXX linear search */ 144 | static gboolean 145 | character_to_iter (GucharmapChaptersModel *chapters, 146 | gunichar wc, 147 | GtkTreeIter *_iter) 148 | { 149 | GtkTreeModel *model = GTK_TREE_MODEL (chapters); 150 | GtkTreeIter iter, all_iter; 151 | gboolean all_iter_set = TRUE; 152 | 153 | if (wc > UNICHAR_MAX) 154 | return FALSE; 155 | 156 | if (!gtk_tree_model_get_iter_first (model, &iter)) 157 | return FALSE; 158 | 159 | do 160 | { 161 | UnicodeBlock *unicode_block; 162 | 163 | gtk_tree_model_get (model, &iter, BLOCK_CHAPTERS_MODEL_UNICODE_BLOCK_PTR, &unicode_block, -1); 164 | 165 | /* skip "All" block */ 166 | if (unicode_block == NULL) 167 | { 168 | all_iter = iter; 169 | all_iter_set = TRUE; 170 | continue; 171 | } 172 | 173 | if (wc >= unicode_block->start && wc <= unicode_block->end) 174 | { 175 | *_iter = iter; 176 | return TRUE; 177 | } 178 | } 179 | while (gtk_tree_model_iter_next (model, &iter)); 180 | 181 | /* "All" is the last resort */ 182 | g_assert (all_iter_set); 183 | *_iter = all_iter; 184 | return TRUE; 185 | } 186 | 187 | static void 188 | gucharmap_block_chapters_model_class_init (GucharmapBlockChaptersModelClass *clazz) 189 | { 190 | GucharmapChaptersModelClass *chapters_class = GUCHARMAP_CHAPTERS_MODEL_CLASS (clazz); 191 | 192 | _gucharmap_intl_ensure_initialized (); 193 | 194 | chapters_class->title = _("Unicode Block"); 195 | chapters_class->character_to_iter = character_to_iter; 196 | chapters_class->get_codepoint_list = get_codepoint_list; 197 | chapters_class->get_book_codepoint_list = get_book_codepoint_list; 198 | } 199 | 200 | G_DEFINE_TYPE (GucharmapBlockChaptersModel, gucharmap_block_chapters_model, GUCHARMAP_TYPE_CHAPTERS_MODEL) 201 | 202 | GucharmapChaptersModel * 203 | gucharmap_block_chapters_model_new (void) 204 | { 205 | return g_object_new (gucharmap_block_chapters_model_get_type (), NULL); 206 | } 207 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-block-chapters-model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | /* block means unicode block */ 21 | 22 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 23 | #error "Only can be included directly." 24 | #endif 25 | 26 | #ifndef GUCHARMAP_BLOCK_CHAPTERS_MODEL_H 27 | #define GUCHARMAP_BLOCK_CHAPTERS_MODEL_H 28 | 29 | #include 30 | #include 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL (gucharmap_block_chapters_model_get_type ()) 35 | #define GUCHARMAP_BLOCK_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL, GucharmapBlockChaptersModel)) 36 | #define GUCHARMAP_BLOCK_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL, GucharmapBlockChaptersModelClass)) 37 | #define GUCHARMAP_IS_BLOCK_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL)) 38 | #define GUCHARMAP_IS_BLOCK_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL)) 39 | #define GUCHARMAP_BLOCK_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_BLOCK_CHAPTERS_MODEL, GucharmapBlockChaptersModelClass)) 40 | 41 | typedef struct _GucharmapBlockChaptersModel GucharmapBlockChaptersModel; 42 | typedef struct _GucharmapBlockChaptersModelPrivate GucharmapBlockChaptersModelPrivate; 43 | typedef struct _GucharmapBlockChaptersModelClass GucharmapBlockChaptersModelClass; 44 | 45 | struct _GucharmapBlockChaptersModel 46 | { 47 | GucharmapChaptersModel parent; 48 | 49 | /*< private >*/ 50 | GucharmapBlockChaptersModelPrivate *priv; 51 | }; 52 | 53 | struct _GucharmapBlockChaptersModelClass 54 | { 55 | GucharmapChaptersModelClass parent_class; 56 | }; 57 | 58 | _GUCHARMAP_PUBLIC 59 | GType gucharmap_block_chapters_model_get_type (void); 60 | _GUCHARMAP_PUBLIC 61 | GucharmapChaptersModel* gucharmap_block_chapters_model_new (void); 62 | 63 | G_END_DECLS 64 | 65 | #endif /* #ifndef GUCHARMAP_BLOCK_CHAPTERS_MODEL_H */ 66 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-block-codepoint-list.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "gucharmap.h" 23 | #include "gucharmap-private.h" 24 | 25 | struct _GucharmapBlockCodepointListPrivate 26 | { 27 | gunichar start; 28 | gunichar end; 29 | }; 30 | 31 | enum 32 | { 33 | PROP_0, 34 | PROP_FIRST_CODEPOINT, 35 | PROP_LAST_CODEPOINT 36 | }; 37 | 38 | G_DEFINE_TYPE (GucharmapBlockCodepointList, gucharmap_block_codepoint_list, GUCHARMAP_TYPE_CODEPOINT_LIST) 39 | 40 | static gunichar 41 | get_char (GucharmapCodepointList *list, 42 | gint index) 43 | { 44 | GucharmapBlockCodepointList *block_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (list); 45 | GucharmapBlockCodepointListPrivate *priv = block_list->priv; 46 | 47 | if (index > (gint) (priv->end - priv->start)) 48 | return (gunichar)(-1); 49 | else 50 | return (gunichar) priv->start + index; 51 | } 52 | 53 | static gint 54 | get_index (GucharmapCodepointList *list, 55 | gunichar wc) 56 | { 57 | GucharmapBlockCodepointList *block_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (list); 58 | GucharmapBlockCodepointListPrivate *priv = block_list->priv; 59 | 60 | if (wc < priv->start || wc > priv->end) 61 | return -1; 62 | else 63 | return wc - priv->start; 64 | } 65 | 66 | static gint 67 | get_last_index (GucharmapCodepointList *list) 68 | { 69 | GucharmapBlockCodepointList *block_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (list); 70 | GucharmapBlockCodepointListPrivate *priv = block_list->priv; 71 | 72 | return priv->end - priv->start; 73 | } 74 | 75 | static void 76 | gucharmap_block_codepoint_list_init (GucharmapBlockCodepointList *list) 77 | { 78 | list->priv = G_TYPE_INSTANCE_GET_PRIVATE (list, GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST, GucharmapBlockCodepointListPrivate); 79 | } 80 | 81 | static GObject * 82 | gucharmap_block_codepoint_list_constructor (GType type, 83 | guint n_construct_properties, 84 | GObjectConstructParam *construct_params) 85 | { 86 | GObject *object; 87 | GucharmapBlockCodepointList *block_codepoint_list; 88 | GucharmapBlockCodepointListPrivate *priv; 89 | 90 | object = G_OBJECT_CLASS (gucharmap_block_codepoint_list_parent_class)->constructor 91 | (type, n_construct_properties, construct_params); 92 | 93 | block_codepoint_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (object); 94 | priv = block_codepoint_list->priv; 95 | 96 | g_assert (priv->start <= priv->end); 97 | 98 | return object; 99 | } 100 | 101 | static void 102 | gucharmap_block_codepoint_list_set_property (GObject *object, 103 | guint prop_id, 104 | const GValue *value, 105 | GParamSpec *pspec) 106 | { 107 | GucharmapBlockCodepointList *block_codepoint_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (object); 108 | GucharmapBlockCodepointListPrivate *priv = block_codepoint_list->priv; 109 | 110 | switch (prop_id) { 111 | case PROP_FIRST_CODEPOINT: 112 | priv->start = g_value_get_uint (value); 113 | break; 114 | case PROP_LAST_CODEPOINT: 115 | priv->end = g_value_get_uint (value); 116 | break; 117 | default: 118 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 119 | break; 120 | } 121 | } 122 | 123 | static void 124 | gucharmap_block_codepoint_list_get_property (GObject *object, 125 | guint prop_id, 126 | GValue *value, 127 | GParamSpec *pspec) 128 | { 129 | GucharmapBlockCodepointList *block_codepoint_list = GUCHARMAP_BLOCK_CODEPOINT_LIST (object); 130 | GucharmapBlockCodepointListPrivate *priv = block_codepoint_list->priv; 131 | 132 | switch (prop_id) { 133 | case PROP_FIRST_CODEPOINT: 134 | g_value_set_uint (value, priv->start); 135 | break; 136 | case PROP_LAST_CODEPOINT: 137 | g_value_set_uint (value, priv->end); 138 | break; 139 | default: 140 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 141 | break; 142 | } 143 | } 144 | 145 | static void 146 | gucharmap_block_codepoint_list_class_init (GucharmapBlockCodepointListClass *klass) 147 | { 148 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 149 | GucharmapCodepointListClass *codepoint_list_class = GUCHARMAP_CODEPOINT_LIST_CLASS (klass); 150 | 151 | object_class->get_property = gucharmap_block_codepoint_list_get_property; 152 | object_class->set_property = gucharmap_block_codepoint_list_set_property; 153 | object_class->constructor = gucharmap_block_codepoint_list_constructor; 154 | 155 | g_type_class_add_private (klass, sizeof (GucharmapBlockCodepointListPrivate)); 156 | 157 | codepoint_list_class->get_char = get_char; 158 | codepoint_list_class->get_index = get_index; 159 | codepoint_list_class->get_last_index = get_last_index; 160 | 161 | /* Not using g_param_spec_unichar on purpose, since it disallows certain values 162 | * we want (it's performing a g_unichar_validate). 163 | */ 164 | g_object_class_install_property 165 | (object_class, 166 | PROP_FIRST_CODEPOINT, 167 | g_param_spec_uint ("first-codepoint", NULL, 168 | "First codepoint", 169 | 0, 170 | UNICHAR_MAX, 171 | 0, 172 | G_PARAM_READWRITE | 173 | G_PARAM_CONSTRUCT_ONLY | 174 | G_PARAM_STATIC_NAME | 175 | G_PARAM_STATIC_NICK | 176 | G_PARAM_STATIC_BLURB)); 177 | 178 | g_object_class_install_property 179 | (object_class, 180 | PROP_LAST_CODEPOINT, 181 | g_param_spec_uint ("last-codepoint", NULL, 182 | "Last codepoint", 183 | 0, 184 | UNICHAR_MAX, 185 | 0, 186 | G_PARAM_READWRITE | 187 | G_PARAM_CONSTRUCT_ONLY | 188 | G_PARAM_STATIC_NAME | 189 | G_PARAM_STATIC_NICK | 190 | G_PARAM_STATIC_BLURB)); 191 | } 192 | 193 | /** 194 | * gucharmap_block_codepoint_list_new: 195 | * @start: the first codepoint 196 | * @end: the last codepoint 197 | * 198 | * Creates a new codepoint list for the range @start..@end. 199 | * 200 | * Return value: the newly-created #GucharmapBlockCodepointList. Use 201 | * g_object_unref() to free the result. 202 | **/ 203 | GucharmapCodepointList * 204 | gucharmap_block_codepoint_list_new (gunichar start, 205 | gunichar end) 206 | { 207 | g_return_val_if_fail (start <= end, NULL); 208 | 209 | return g_object_new (GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST, 210 | "first-codepoint", (guint) start, 211 | "last-codepoint", (guint) end, 212 | NULL); 213 | } 214 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-block-codepoint-list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef GUCHARMAP_BLOCK_CODEPOINT_LIST_H 24 | #define GUCHARMAP_BLOCK_CODEPOINT_LIST_H 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST (gucharmap_block_codepoint_list_get_type ()) 34 | #define GUCHARMAP_BLOCK_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST, GucharmapBlockCodepointList)) 35 | #define GUCHARMAP_BLOCK_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST, GucharmapBlockCodepointListClass)) 36 | #define GUCHARMAP_IS_BLOCK_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST)) 37 | #define GUCHARMAP_IS_BLOCK_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST)) 38 | #define GUCHARMAP_BLOCK_CODEPOINT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_BLOCK_CODEPOINT_LIST, GucharmapBlockCodepointListClass)) 39 | 40 | typedef struct _GucharmapBlockCodepointList GucharmapBlockCodepointList; 41 | typedef struct _GucharmapBlockCodepointListPrivate GucharmapBlockCodepointListPrivate; 42 | typedef struct _GucharmapBlockCodepointListClass GucharmapBlockCodepointListClass; 43 | 44 | struct _GucharmapBlockCodepointList 45 | { 46 | GucharmapCodepointList parent_instance; 47 | 48 | /*< private >*/ 49 | GucharmapBlockCodepointListPrivate *priv; 50 | }; 51 | 52 | struct _GucharmapBlockCodepointListClass 53 | { 54 | GucharmapCodepointListClass parent_class; 55 | }; 56 | 57 | _GUCHARMAP_PUBLIC 58 | GType gucharmap_block_codepoint_list_get_type (void); 59 | 60 | _GUCHARMAP_PUBLIC 61 | GucharmapCodepointList * gucharmap_block_codepoint_list_new (gunichar start, 62 | gunichar end); 63 | 64 | G_END_DECLS 65 | 66 | #endif /* #ifndef GUCHARMAP_BLOCK_CODEPOINT_LIST_H */ 67 | 68 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chapters-model.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #include 21 | 22 | #include 23 | 24 | #include "gucharmap.h" 25 | #include "gucharmap-private.h" 26 | #include "gucharmap-marshal.h" 27 | 28 | G_DEFINE_TYPE (GucharmapChaptersModel, gucharmap_chapters_model, GTK_TYPE_LIST_STORE) 29 | 30 | static GucharmapCodepointList * 31 | default_get_codepoint_list (GucharmapChaptersModel *chapters, 32 | GtkTreeIter *iter) 33 | { 34 | return gucharmap_block_codepoint_list_new (0, UNICHAR_MAX); 35 | } 36 | 37 | static void 38 | gucharmap_chapters_model_init (GucharmapChaptersModel *model) 39 | { 40 | model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelPrivate); 41 | } 42 | 43 | static void 44 | gucharmap_chapters_model_finalize (GObject *object) 45 | { 46 | GucharmapChaptersModel *model = GUCHARMAP_CHAPTERS_MODEL (object); 47 | GucharmapChaptersModelPrivate *priv = model->priv; 48 | 49 | if (priv->book_list) 50 | g_object_unref (priv->book_list); 51 | 52 | G_OBJECT_CLASS (gucharmap_chapters_model_parent_class)->finalize (object); 53 | } 54 | 55 | static void 56 | gucharmap_chapters_model_class_init (GucharmapChaptersModelClass *klass) 57 | { 58 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 59 | 60 | g_type_class_add_private (object_class, sizeof (GucharmapChaptersModelPrivate)); 61 | 62 | object_class->finalize = gucharmap_chapters_model_finalize; 63 | 64 | klass->get_codepoint_list = default_get_codepoint_list; 65 | } 66 | 67 | /** 68 | * gucharmap_chapters_model_get_codepoint_list: 69 | * @chapters: a #GucharmapChaptersModel 70 | * @iter: a #GtkTreeIter 71 | * 72 | * Creates a new #GucharmapCodepointList representing the characters in the 73 | * current chapter. 74 | * 75 | * Return value: (transfer full): the newly-created #GucharmapCodepointList, 76 | * or NULL if there is no chapter selected. The caller should release the 77 | * result with g_object_unref() when finished. 78 | **/ 79 | GucharmapCodepointList * 80 | gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters, 81 | GtkTreeIter *iter) 82 | { 83 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (chapters), NULL); 84 | 85 | return GUCHARMAP_CHAPTERS_MODEL_GET_CLASS (chapters)->get_codepoint_list (chapters, iter); 86 | } 87 | 88 | /** 89 | * gucharmap_chapters_model_get_book_codepoint_list: 90 | * @chapters: a #GucharmapChaptersModel 91 | * 92 | * Return value: (transfer full): a reference to a #GucharmapCodepointList 93 | * representing all the characters in all the chapters. It should not be 94 | * modified, but must be g_object_unref()'d after use. 95 | **/ 96 | GucharmapCodepointList * 97 | gucharmap_chapters_model_get_book_codepoint_list (GucharmapChaptersModel *chapters) 98 | { 99 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (chapters), NULL); 100 | 101 | return GUCHARMAP_CHAPTERS_MODEL_GET_CLASS (chapters)->get_book_codepoint_list (chapters); 102 | } 103 | 104 | /** 105 | * gucharmap_chapters_model_character_to_iter: 106 | * @chapters: a #GucharmapChaptersModel 107 | * @wc: a character 108 | * @iter: (out): a #GtkTreeIter 109 | * 110 | * Return value: %TRUE on success, %FALSE on failure. 111 | **/ 112 | gboolean 113 | gucharmap_chapters_model_character_to_iter (GucharmapChaptersModel *chapters, 114 | gunichar wc, 115 | GtkTreeIter *iter) 116 | { 117 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (chapters), FALSE); 118 | 119 | return GUCHARMAP_CHAPTERS_MODEL_GET_CLASS (chapters)->character_to_iter (chapters, wc, iter); 120 | } 121 | 122 | const char * 123 | gucharmap_chapters_model_get_title (GucharmapChaptersModel *chapters) 124 | { 125 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (chapters), NULL); 126 | 127 | return GUCHARMAP_CHAPTERS_MODEL_GET_CLASS (chapters)->title; 128 | } 129 | 130 | 131 | /** 132 | * gucharmap_chapters_model_id_to_iter: 133 | * @chapters_model: a #GucharmapChaptersModel 134 | * @id: name 135 | * @_iter: (out): a #GtkTreeIter 136 | * 137 | * Return value: %TRUE on success, %FALSE on failure. 138 | */ 139 | gboolean 140 | gucharmap_chapters_model_id_to_iter (GucharmapChaptersModel *chapters_model, 141 | const char *id, 142 | GtkTreeIter *_iter) 143 | { 144 | GtkTreeModel *model = GTK_TREE_MODEL (chapters_model); 145 | GtkTreeIter iter; 146 | char *str; 147 | int match; 148 | 149 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (model), FALSE); 150 | 151 | if (!id) 152 | return FALSE; 153 | 154 | if (!gtk_tree_model_get_iter_first (model, &iter)) 155 | return FALSE; 156 | 157 | do { 158 | gtk_tree_model_get(model, &iter, GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID, &str, -1); 159 | match = strcmp (id, str); 160 | g_free(str); 161 | if (0 == match) { 162 | *_iter = iter; 163 | break; 164 | } 165 | } while (gtk_tree_model_iter_next (model, &iter)); 166 | 167 | return 0 == match; 168 | } 169 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chapters-model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #ifndef GUCHARMAP_CHAPTERS_MODEL_H 25 | #define GUCHARMAP_CHAPTERS_MODEL_H 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define GUCHARMAP_TYPE_CHAPTERS_MODEL (gucharmap_chapters_model_get_type ()) 35 | 36 | #define GUCHARMAP_TYPE_CHAPTERS_MODEL (gucharmap_chapters_model_get_type ()) 37 | #define GUCHARMAP_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModel)) 38 | #define GUCHARMAP_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelClass)) 39 | #define GUCHARMAP_IS_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL)) 40 | #define GUCHARMAP_IS_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHAPTERS_MODEL)) 41 | #define GUCHARMAP_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHAPTERS_MODEL, GucharmapChaptersModelClass)) 42 | 43 | typedef struct _GucharmapChaptersModel GucharmapChaptersModel; 44 | typedef struct _GucharmapChaptersModelPrivate GucharmapChaptersModelPrivate; 45 | typedef struct _GucharmapChaptersModelClass GucharmapChaptersModelClass; 46 | 47 | struct _GucharmapChaptersModel 48 | { 49 | GtkListStore parent_instance; 50 | 51 | /*< private >*/ 52 | GucharmapChaptersModelPrivate *priv; 53 | }; 54 | 55 | struct _GucharmapChaptersModelClass 56 | { 57 | GtkListStoreClass parent_class; 58 | 59 | const char *title; 60 | gboolean (* character_to_iter) (GucharmapChaptersModel *chapters, 61 | gunichar wc, 62 | GtkTreeIter *iter); 63 | GucharmapCodepointList * (* get_codepoint_list) (GucharmapChaptersModel *chapters, 64 | GtkTreeIter *iter); 65 | GucharmapCodepointList * (* get_book_codepoint_list) (GucharmapChaptersModel *chapters); 66 | }; 67 | 68 | 69 | enum { 70 | GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID = 0, 71 | GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL = 1 72 | }; 73 | 74 | _GUCHARMAP_PUBLIC 75 | GType gucharmap_chapters_model_get_type (void); 76 | _GUCHARMAP_PUBLIC 77 | GucharmapCodepointList * gucharmap_chapters_model_get_codepoint_list (GucharmapChaptersModel *chapters, 78 | GtkTreeIter *iter); 79 | _GUCHARMAP_PUBLIC 80 | const char * gucharmap_chapters_model_get_title (GucharmapChaptersModel *chapters); 81 | _GUCHARMAP_PUBLIC 82 | GucharmapCodepointList * gucharmap_chapters_model_get_book_codepoint_list (GucharmapChaptersModel *chapters); 83 | _GUCHARMAP_PUBLIC 84 | gboolean gucharmap_chapters_model_character_to_iter (GucharmapChaptersModel *chapters, 85 | gunichar wc, 86 | GtkTreeIter *iter); 87 | _GUCHARMAP_PUBLIC 88 | gboolean gucharmap_chapters_model_id_to_iter (GucharmapChaptersModel *chapters_model, 89 | const char *id, 90 | GtkTreeIter *_iter); 91 | 92 | G_END_DECLS 93 | 94 | #endif /* #ifndef GUCHARMAP_CHAPTERS_MODEL_H */ 95 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chapters-view.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "gucharmap.h" 24 | #include "gucharmap-private.h" 25 | 26 | #include "unicode-blocks.h" 27 | 28 | struct _GucharmapChaptersViewPrivate { 29 | GtkTreeViewColumn *column; 30 | GucharmapChaptersModel *model; 31 | }; 32 | 33 | static void 34 | select_iter (GucharmapChaptersView *view, 35 | GtkTreeIter *iter) 36 | { 37 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 38 | GtkTreeSelection *selection; 39 | GtkTreePath *path; 40 | 41 | selection = gtk_tree_view_get_selection (tree_view); 42 | gtk_tree_selection_select_iter (selection, iter); 43 | 44 | path = gtk_tree_model_get_path (gtk_tree_view_get_model (tree_view), iter); 45 | gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); 46 | gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.5, 0); 47 | gtk_tree_path_free (path); 48 | } 49 | 50 | static void 51 | gucharmap_chapters_view_init (GucharmapChaptersView *view) 52 | { 53 | GucharmapChaptersViewPrivate *priv; 54 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 55 | GtkCellRenderer *cell; 56 | GtkTreeViewColumn *column; 57 | GtkTreeSelection *selection; 58 | 59 | priv = view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view, GUCHARMAP_TYPE_CHAPTERS_VIEW, GucharmapChaptersViewPrivate); 60 | 61 | cell = gtk_cell_renderer_text_new (); 62 | g_object_set (cell, 63 | "ellipsize", PANGO_ELLIPSIZE_END, 64 | "ellipsize-set", TRUE, 65 | NULL); 66 | column = priv->column = gtk_tree_view_column_new (); 67 | gtk_tree_view_column_pack_start (column, cell, FALSE); 68 | gtk_tree_view_column_add_attribute (column, cell, "text", GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL); 69 | gtk_tree_view_column_add_attribute (column, cell, "attributes", _GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL_ATTRS); 70 | gtk_tree_view_append_column (tree_view, column); 71 | 72 | selection = gtk_tree_view_get_selection (tree_view); 73 | gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); 74 | 75 | gtk_tree_view_set_enable_search (tree_view, TRUE); 76 | } 77 | 78 | static void 79 | gucharmap_chapters_view_class_init (GucharmapChaptersViewClass *klass) 80 | { 81 | g_type_class_add_private (klass, sizeof (GucharmapChaptersViewPrivate)); 82 | } 83 | 84 | G_DEFINE_TYPE (GucharmapChaptersView, gucharmap_chapters_view, GTK_TYPE_TREE_VIEW) 85 | 86 | /** 87 | * gucharmap_chapters_view_new: 88 | * 89 | * Creates a new #GucharmapChaptersView object. 90 | * 91 | * Returns: (transfer full): a new #GucharmapChaptersView 92 | */ 93 | GtkWidget * 94 | gucharmap_chapters_view_new (void) 95 | { 96 | return g_object_new (gucharmap_chapters_view_get_type (), NULL); 97 | } 98 | 99 | /** 100 | * gucharmap_chapters_view_get_model: 101 | * @view: a #GucharmapChaptersView 102 | * 103 | * Gets the #GucharmapChaptersModel of #view. 104 | * 105 | * Returns: (transfer none): the #GucharmapChaptersModel 106 | */ 107 | GucharmapChaptersModel * 108 | gucharmap_chapters_view_get_model (GucharmapChaptersView *view) 109 | { 110 | GucharmapChaptersViewPrivate *priv = view->priv; 111 | 112 | return priv->model; 113 | } 114 | 115 | void 116 | gucharmap_chapters_view_set_model (GucharmapChaptersView *view, 117 | GucharmapChaptersModel *model) 118 | { 119 | GucharmapChaptersViewPrivate *priv = view->priv; 120 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 121 | 122 | priv->model = model; 123 | gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (model)); 124 | if (!model) 125 | return; 126 | 127 | gtk_tree_view_column_set_title (priv->column, gucharmap_chapters_model_get_title (model)); 128 | gtk_tree_view_column_set_sort_column_id (priv->column, model->priv->sort_column); 129 | gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), 130 | model->priv->sort_column, 131 | GTK_SORT_ASCENDING); 132 | 133 | /* Need to re-set this here since it's set to -1 when the tree view model changes! */ 134 | gtk_tree_view_set_search_column (tree_view, GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL); 135 | } 136 | 137 | /** 138 | * gucharmap_view_view_next: 139 | * @view: a #GucharmapChapters 140 | * 141 | * Moves to the next chapter if applicable. 142 | **/ 143 | void 144 | gucharmap_chapters_view_next (GucharmapChaptersView *view) 145 | { 146 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 147 | GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view); 148 | GtkTreeModel *model; 149 | GtkTreePath *path; 150 | GtkTreeIter iter; 151 | 152 | if (!gtk_tree_selection_get_selected (selection, &model, &iter)) 153 | return; 154 | if (!gtk_tree_model_iter_next (model, &iter)) 155 | return; 156 | 157 | path = gtk_tree_model_get_path (model, &iter); 158 | gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); 159 | gtk_tree_path_free (path); 160 | } 161 | 162 | /** 163 | * gucharmap_chapters_view_previous: 164 | * @view: a #GucharmapChapters 165 | * 166 | * Moves to the previous chapter if applicable. 167 | **/ 168 | void 169 | gucharmap_chapters_view_previous (GucharmapChaptersView *view) 170 | { 171 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 172 | GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view); 173 | GtkTreeModel *model; 174 | GtkTreePath *path; 175 | GtkTreeIter iter; 176 | 177 | if (!gtk_tree_selection_get_selected (selection, &model, &iter)) 178 | return; 179 | 180 | path = gtk_tree_model_get_path (model, &iter); 181 | if (gtk_tree_path_prev (path)) 182 | gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); 183 | gtk_tree_path_free (path); 184 | } 185 | 186 | 187 | /** 188 | * gucharmap_chapter_view_get_selected: 189 | * @view: a #GucharmapChapters 190 | * 191 | * Returns a newly allocated string containing 192 | * the name of the currently selected chapter 193 | **/ 194 | gchar* 195 | gucharmap_chapters_view_get_selected (GucharmapChaptersView *view) 196 | { 197 | GtkTreeView *tree_view = GTK_TREE_VIEW (view); 198 | GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view); 199 | GtkTreeModel *model; 200 | GtkTreeIter iter; 201 | gchar *name = NULL; 202 | 203 | if (gtk_tree_selection_get_selected (selection, &model, &iter)) 204 | gtk_tree_model_get(model, &iter, GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID, &name, -1); 205 | 206 | return name; 207 | } 208 | 209 | /** 210 | * gucharmap_chapter_view_set_selected: 211 | * @view: a #GucharmapChapters 212 | * @name: the name of the selected row 213 | * 214 | * Sets the selection to the row specified by @name 215 | * Return value: %TRUE on success, %FALSE on failure 216 | **/ 217 | gboolean 218 | gucharmap_chapters_view_set_selected (GucharmapChaptersView *view, 219 | const char *name) 220 | { 221 | GucharmapChaptersViewPrivate *priv = view->priv; 222 | GtkTreeIter iter; 223 | 224 | if (!gucharmap_chapters_model_id_to_iter (priv->model, name, &iter)) 225 | return FALSE; 226 | 227 | select_iter (view, &iter); 228 | return TRUE; 229 | } 230 | 231 | /** 232 | * gucharmap_chapters_view_select_character: 233 | * @view: a #GucharmapChaptersView 234 | * @wc: a character 235 | * 236 | * Return value: %TRUE on success, %FALSE on failure. 237 | **/ 238 | gboolean 239 | gucharmap_chapters_view_select_character (GucharmapChaptersView *view, 240 | gunichar wc) 241 | { 242 | GucharmapChaptersViewPrivate *priv = view->priv; 243 | GtkTreeIter iter; 244 | 245 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_VIEW (view), FALSE); 246 | 247 | if (wc > UNICHAR_MAX) 248 | return FALSE; 249 | 250 | if (!gucharmap_chapters_model_character_to_iter (priv->model, wc, &iter)) 251 | return FALSE; 252 | 253 | select_iter (view, &iter); 254 | return TRUE; 255 | } 256 | 257 | /** 258 | * gucharmap_chapters_view_get_codepoint_list: 259 | * @view: a #GucharmapChaptersView 260 | * 261 | * Creates a new #GucharmapCodepointList representing the characters in the 262 | * current chapter. 263 | * 264 | * Return value: (transfer full): the newly-created #GucharmapCodepointList, 265 | * or NULL if there is no chapter selected. The caller should release the 266 | * result with g_object_unref() when finished. 267 | **/ 268 | GucharmapCodepointList * 269 | gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view) 270 | { 271 | GucharmapChaptersViewPrivate *priv = view->priv; 272 | GtkTreeSelection *selection; 273 | GtkTreeIter iter; 274 | 275 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_VIEW (view), NULL); 276 | 277 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view)); 278 | if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) 279 | return NULL; 280 | 281 | return gucharmap_chapters_model_get_codepoint_list (priv->model, &iter); 282 | } 283 | 284 | /** 285 | * gucharmap_chapters_view_get_book_codepoint_list: 286 | * @view: a #GucharmapChaptersView 287 | * 288 | * Return value: (transfer full): a reference to a #GucharmapCodepointList representing 289 | * all the characters in all the chapters. It should not be modified, but must 290 | * be g_object_unref()'d after use. 291 | **/ 292 | GucharmapCodepointList * 293 | gucharmap_chapters_view_get_book_codepoint_list (GucharmapChaptersView *view) 294 | { 295 | GucharmapChaptersViewPrivate *priv = view->priv; 296 | 297 | g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_VIEW (view), NULL); 298 | 299 | return gucharmap_chapters_model_get_book_codepoint_list (priv->model); 300 | } 301 | 302 | gboolean 303 | gucharmap_chapters_view_select_locale (GucharmapChaptersView *view) 304 | { 305 | return gucharmap_chapters_view_select_character (view, 306 | gucharmap_unicode_get_locale_character ()); 307 | } 308 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chapters-view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | /* block means unicode block */ 20 | 21 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 22 | #error "Only can be included directly." 23 | #endif 24 | 25 | #ifndef GUCHARMAP_CHAPTERS_VIEW_H 26 | #define GUCHARMAP_CHAPTERS_VIEW_H 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define GUCHARMAP_TYPE_CHAPTERS_VIEW (gucharmap_chapters_view_get_type ()) 36 | #define GUCHARMAP_CHAPTERS_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHAPTERS_VIEW, GucharmapChaptersView)) 37 | #define GUCHARMAP_CHAPTERS_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHAPTERS_VIEW, GucharmapChaptersViewClass)) 38 | #define GUCHARMAP_IS_CHAPTERS_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHAPTERS_VIEW)) 39 | #define GUCHARMAP_IS_CHAPTERS_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHAPTERS_VIEW)) 40 | #define GUCHARMAP_CHAPTERS_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHAPTERS_VIEW, GucharmapChaptersViewClass)) 41 | 42 | typedef struct _GucharmapChaptersView GucharmapChaptersView; 43 | typedef struct _GucharmapChaptersViewPrivate GucharmapChaptersViewPrivate; 44 | typedef struct _GucharmapChaptersViewClass GucharmapChaptersViewClass; 45 | 46 | struct _GucharmapChaptersView 47 | { 48 | GtkTreeView parent_instance; 49 | 50 | /*< private >*/ 51 | GucharmapChaptersViewPrivate *priv; 52 | }; 53 | 54 | struct _GucharmapChaptersViewClass 55 | { 56 | GtkTreeViewClass parent_class; 57 | }; 58 | 59 | _GUCHARMAP_PUBLIC 60 | GType gucharmap_chapters_view_get_type (void); 61 | 62 | _GUCHARMAP_PUBLIC 63 | GtkWidget * gucharmap_chapters_view_new (void); 64 | 65 | _GUCHARMAP_PUBLIC 66 | void gucharmap_chapters_view_set_model (GucharmapChaptersView *view, 67 | GucharmapChaptersModel *model); 68 | _GUCHARMAP_PUBLIC 69 | GucharmapChaptersModel *gucharmap_chapters_view_get_model (GucharmapChaptersView *view); 70 | 71 | _GUCHARMAP_PUBLIC 72 | gboolean gucharmap_chapters_view_select_character (GucharmapChaptersView *view, 73 | gunichar wc); 74 | _GUCHARMAP_PUBLIC 75 | GucharmapCodepointList * gucharmap_chapters_view_get_codepoint_list (GucharmapChaptersView *view); 76 | _GUCHARMAP_PUBLIC 77 | GucharmapCodepointList * gucharmap_chapters_view_get_book_codepoint_list (GucharmapChaptersView *view); 78 | 79 | _GUCHARMAP_PUBLIC 80 | void gucharmap_chapters_view_next (GucharmapChaptersView *view); 81 | _GUCHARMAP_PUBLIC 82 | void gucharmap_chapters_view_previous (GucharmapChaptersView *view); 83 | 84 | _GUCHARMAP_PUBLIC 85 | gchar * gucharmap_chapters_view_get_selected (GucharmapChaptersView *view); 86 | _GUCHARMAP_PUBLIC 87 | gboolean gucharmap_chapters_view_set_selected (GucharmapChaptersView *view, 88 | const gchar *name); 89 | 90 | _GUCHARMAP_PUBLIC 91 | gboolean gucharmap_chapters_view_select_locale (GucharmapChaptersView *view); 92 | 93 | G_END_DECLS 94 | 95 | #endif /* #ifndef GUCHARMAP_CHAPTERS_VIEW_H */ 96 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-charmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef GUCHARMAP_CHARMAP_H 24 | #define GUCHARMAP_CHARMAP_H 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define GUCHARMAP_TYPE_CHARMAP (gucharmap_charmap_get_type ()) 36 | #define GUCHARMAP_CHARMAP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHARMAP, GucharmapCharmap)) 37 | #define GUCHARMAP_CHARMAP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHARMAP, GucharmapCharmapClass)) 38 | #define GUCHARMAP_IS_CHARMAP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHARMAP)) 39 | #define GUCHARMAP_IS_CHARMAP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHARMAP)) 40 | #define GUCHARMAP_CHARMAP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHARMAP, GucharmapCharmapClass)) 41 | 42 | typedef struct _GucharmapCharmap GucharmapCharmap; 43 | typedef struct _GucharmapCharmapPrivate GucharmapCharmapPrivate; 44 | typedef struct _GucharmapCharmapClass GucharmapCharmapClass; 45 | 46 | struct _GucharmapCharmap 47 | { 48 | GtkPaned parent; 49 | 50 | /*< private >*/ 51 | GucharmapCharmapPrivate *priv; 52 | }; 53 | 54 | struct _GucharmapCharmapClass 55 | { 56 | GtkPanedClass parent_class; 57 | 58 | void (* status_message) (GucharmapCharmap *charmap, const gchar *message); 59 | void (* link_clicked) (GucharmapCharmap *charmap, 60 | gunichar old_character, 61 | gunichar new_character); 62 | void (* _gucharmap_reserved0) (void); 63 | void (* _gucharmap_reserved1) (void); 64 | void (* _gucharmap_reserved2) (void); 65 | void (* _gucharmap_reserved3) (void); 66 | }; 67 | 68 | _GUCHARMAP_PUBLIC 69 | GType gucharmap_charmap_get_type (void); 70 | 71 | _GUCHARMAP_PUBLIC 72 | GtkWidget * gucharmap_charmap_new (void); 73 | 74 | _GUCHARMAP_PUBLIC 75 | void gucharmap_charmap_set_active_character (GucharmapCharmap *charmap, 76 | gunichar uc); 77 | _GUCHARMAP_PUBLIC 78 | gunichar gucharmap_charmap_get_active_character (GucharmapCharmap *charmap); 79 | 80 | _GUCHARMAP_PUBLIC 81 | void gucharmap_charmap_set_active_chapter (GucharmapCharmap *charmap, 82 | const gchar *chapter); 83 | _GUCHARMAP_PUBLIC 84 | char * gucharmap_charmap_get_active_chapter (GucharmapCharmap *charmap); 85 | 86 | _GUCHARMAP_PUBLIC 87 | void gucharmap_charmap_next_chapter (GucharmapCharmap *charmap); 88 | _GUCHARMAP_PUBLIC 89 | void gucharmap_charmap_previous_chapter (GucharmapCharmap *charmap); 90 | 91 | _GUCHARMAP_PUBLIC 92 | void gucharmap_charmap_set_font_desc (GucharmapCharmap *charmap, 93 | PangoFontDescription *font_desc); 94 | 95 | _GUCHARMAP_PUBLIC 96 | PangoFontDescription * gucharmap_charmap_get_font_desc (GucharmapCharmap *charmap); 97 | 98 | _GUCHARMAP_PUBLIC 99 | void gucharmap_charmap_set_font_fallback (GucharmapCharmap *charmap, 100 | gboolean enable_font_fallback); 101 | _GUCHARMAP_PUBLIC 102 | gboolean gucharmap_charmap_get_font_fallback (GucharmapCharmap *charmap); 103 | 104 | _GUCHARMAP_PUBLIC 105 | GucharmapChaptersView * gucharmap_charmap_get_chapters_view (GucharmapCharmap *charmap); 106 | 107 | _GUCHARMAP_PUBLIC 108 | void gucharmap_charmap_set_chapters_model (GucharmapCharmap *charmap, 109 | GucharmapChaptersModel *model); 110 | 111 | _GUCHARMAP_PUBLIC 112 | GucharmapChaptersModel * gucharmap_charmap_get_chapters_model (GucharmapCharmap *charmap); 113 | 114 | _GUCHARMAP_PUBLIC 115 | GucharmapCodepointList * gucharmap_charmap_get_active_codepoint_list (GucharmapCharmap *charmap); 116 | 117 | _GUCHARMAP_PUBLIC 118 | GucharmapCodepointList * gucharmap_charmap_get_book_codepoint_list (GucharmapCharmap *charmap); 119 | 120 | _GUCHARMAP_PUBLIC 121 | void gucharmap_charmap_set_chapters_visible (GucharmapCharmap *charmap, 122 | gboolean visible); 123 | 124 | _GUCHARMAP_PUBLIC 125 | gboolean gucharmap_charmap_get_chapters_visible (GucharmapCharmap *charmap); 126 | 127 | /** 128 | * GucharmapCharmapPageType: 129 | * @GUCHARMAP_CHARMAP_PAGE_CHARTABLE: Character table page 130 | * @GUCHARMAP_CHARMAP_PAGE_DETAILS: Character detail page 131 | */ 132 | typedef enum { 133 | GUCHARMAP_CHARMAP_PAGE_CHARTABLE, 134 | GUCHARMAP_CHARMAP_PAGE_DETAILS 135 | } GucharmapCharmapPageType; 136 | 137 | _GUCHARMAP_PUBLIC 138 | void gucharmap_charmap_set_page_visible (GucharmapCharmap *charmap, 139 | int page, 140 | gboolean visible); 141 | 142 | _GUCHARMAP_PUBLIC 143 | gboolean gucharmap_charmap_get_page_visible (GucharmapCharmap *charmap, 144 | int page); 145 | 146 | _GUCHARMAP_PUBLIC 147 | void gucharmap_charmap_set_active_page (GucharmapCharmap *charmap, 148 | int page); 149 | 150 | _GUCHARMAP_PUBLIC 151 | int gucharmap_charmap_get_active_page (GucharmapCharmap *charmap); 152 | 153 | _GUCHARMAP_PUBLIC 154 | void gucharmap_charmap_set_snap_pow2 (GucharmapCharmap *charmap, 155 | gboolean snap); 156 | _GUCHARMAP_PUBLIC 157 | gboolean gucharmap_charmap_get_snap_pow2 (GucharmapCharmap *charmap); 158 | 159 | /* private; FIXMEchpe remove */ 160 | _GUCHARMAP_PUBLIC 161 | GucharmapChartable * gucharmap_charmap_get_chartable (GucharmapCharmap *charmap); 162 | 163 | /* Hide deprecated stuff from GI */ 164 | 165 | #ifndef __GI_SCANNER__ 166 | 167 | _GUCHARMAP_PUBLIC 168 | GUCHARMAP_DEPRECATED_FOR(gtk_orientable_set_orientation) 169 | void gucharmap_charmap_set_orientation (GucharmapCharmap *charmap, 170 | GtkOrientation orientation); 171 | _GUCHARMAP_PUBLIC 172 | GUCHARMAP_DEPRECATED_FOR(gtk_orientable_get_orientation) 173 | GtkOrientation gucharmap_charmap_get_orientation (GucharmapCharmap *charmap); 174 | 175 | #endif /* !__GI_SCANNER__ */ 176 | 177 | G_END_DECLS 178 | 179 | #endif /* #ifndef GUCHARMAP_CHARMAP_H */ 180 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chartable-accessible.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2003 Sun Microsystems Inc. 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 3 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef GUCHARMAP_CHARTABLE_ACCESSIBLE_H 22 | #define GUCHARMAP_CHARTABLE_ACCESSIBLE_H 23 | 24 | #include 25 | 26 | #include "gucharmap-chartable.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE (gucharmap_chartable_accessible_get_type ()) 31 | #define GUCHARMAP_CHARTABLE_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE, GucharmapChartableAccessible)) 32 | #define GUCHARMAP_CHARTABLE_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE, GucharmapChartableAccessibleClass)) 33 | #define GUCHARMAP_IS_CHARTABLE_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE)) 34 | #define GUCHARMAP_IS_CHARTABLE_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE)) 35 | #define GUCHARMAP_CHARTABLE_ACCESSIBLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHARTABLE_ACCESSIBLE, GucharmapChartableAccessibleClass)) 36 | 37 | typedef struct _GucharmapChartableAccessible GucharmapChartableAccessible; 38 | typedef struct _GucharmapChartableAccessibleClass GucharmapChartableAccessibleClass; 39 | 40 | GType gucharmap_chartable_accessible_get_type (void); 41 | 42 | AtkObject *gucharmap_chartable_accessible_new (GucharmapChartable *chartable); 43 | 44 | G_END_DECLS 45 | 46 | #endif /* !GUCHARMAP_CHARTABLE_ACCESSIBLE_H */ 47 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chartable-cell-accessible.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2003 Sun Microsystems Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 | * Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_H 21 | #define GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_H 22 | 23 | #include 24 | 25 | #include "gucharmap-chartable.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE (gucharmap_chartable_cell_accessible_get_type ()) 30 | #define GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE, GucharmapChartableCellAccessible)) 31 | #define GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE, GucharmapChartableCellAccessibleClass)) 32 | #define GUCHARMAP_IS_CHARTABLE_CELL_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE)) 33 | #define GUCHARMAP_IS_CHARTABLE_CELL_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE)) 34 | #define GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHARTABLE_CELL_ACCESSIBLE, GucharmapChartableCellAccessibleClass)) 35 | 36 | typedef struct _GucharmapChartableCellAccessible GucharmapChartableCellAccessible; 37 | typedef struct _GucharmapChartableCellAccessibleClass GucharmapChartableCellAccessibleClass; 38 | 39 | struct _GucharmapChartableCellAccessible 40 | { 41 | AtkObject parent; 42 | 43 | GtkWidget *widget; 44 | int index; 45 | AtkStateSet *state_set; 46 | gchar *activate_description; 47 | guint action_idle_handler; 48 | }; 49 | 50 | struct _GucharmapChartableCellAccessibleClass 51 | { 52 | AtkObjectClass parent_class; 53 | }; 54 | 55 | GType gucharmap_chartable_cell_accessible_get_type (void); 56 | 57 | AtkObject* gucharmap_chartable_cell_accessible_new (void); 58 | 59 | void gucharmap_chartable_cell_accessible_initialise (GucharmapChartableCellAccessible *cell, 60 | GtkWidget *widget, 61 | AtkObject *parent, 62 | gint index); 63 | 64 | gboolean gucharmap_chartable_cell_accessible_add_state (GucharmapChartableCellAccessible *cell, 65 | AtkStateType state_type, 66 | gboolean emit_signal); 67 | 68 | gboolean gucharmap_chartable_cell_accessible_remove_state (GucharmapChartableCellAccessible *cell, 69 | AtkStateType state_type, 70 | gboolean emit_signal); 71 | 72 | G_END_DECLS 73 | 74 | #endif /* GUCHARMAP_CHARTABLE_CELL_ACCESSIBLE_H */ 75 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-chartable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #ifndef GUCHARMAP_CHARTABLE_H 25 | #define GUCHARMAP_CHARTABLE_H 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define GUCHARMAP_TYPE_CHARTABLE (gucharmap_chartable_get_type ()) 35 | #define GUCHARMAP_CHARTABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CHARTABLE, GucharmapChartable)) 36 | #define GUCHARMAP_CHARTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CHARTABLE, GucharmapChartableClass)) 37 | #define GUCHARMAP_IS_CHARTABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CHARTABLE)) 38 | #define GUCHARMAP_IS_CHARTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CHARTABLE)) 39 | #define GUCHARMAP_CHARTABLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CHARTABLE, GucharmapChartableClass)) 40 | 41 | typedef struct _GucharmapChartable GucharmapChartable; 42 | typedef struct _GucharmapChartablePrivate GucharmapChartablePrivate; 43 | typedef struct _GucharmapChartableClass GucharmapChartableClass; 44 | 45 | struct _GucharmapChartable 46 | { 47 | GtkDrawingArea parent_instance; 48 | 49 | /*< private >*/ 50 | GucharmapChartablePrivate *priv; 51 | }; 52 | 53 | struct _GucharmapChartableClass 54 | { 55 | GtkDrawingAreaClass parent_class; 56 | 57 | void (* set_scroll_adjustments) (GucharmapChartable *chartable, 58 | GtkAdjustment *hadjustment, 59 | GtkAdjustment *vadjustment); 60 | gboolean (* move_cursor) (GucharmapChartable *chartable, 61 | GtkMovementStep step, 62 | gint count); 63 | void (* activate) (GucharmapChartable *chartable); 64 | void (* copy_clipboard) (GucharmapChartable *chartable); 65 | void (* paste_clipboard) (GucharmapChartable *chartable); 66 | 67 | void (* set_active_char) (GucharmapChartable *chartable, guint ch); 68 | void (* status_message) (GucharmapChartable *chartable, const gchar *message); 69 | }; 70 | 71 | _GUCHARMAP_PUBLIC 72 | GType gucharmap_chartable_get_type (void); 73 | _GUCHARMAP_PUBLIC 74 | GtkWidget * gucharmap_chartable_new (void); 75 | _GUCHARMAP_PUBLIC 76 | void gucharmap_chartable_set_font_desc (GucharmapChartable *chartable, 77 | PangoFontDescription *font_desc); 78 | _GUCHARMAP_PUBLIC 79 | PangoFontDescription * gucharmap_chartable_get_font_desc (GucharmapChartable *chartable); 80 | _GUCHARMAP_PUBLIC 81 | void gucharmap_chartable_set_font_fallback (GucharmapChartable *chartable, 82 | gboolean enable_font_fallback); 83 | _GUCHARMAP_PUBLIC 84 | gboolean gucharmap_chartable_get_font_fallback (GucharmapChartable *chartable); 85 | _GUCHARMAP_PUBLIC 86 | gunichar gucharmap_chartable_get_active_character (GucharmapChartable *chartable); 87 | _GUCHARMAP_PUBLIC 88 | void gucharmap_chartable_set_active_character (GucharmapChartable *chartable, 89 | gunichar wc); 90 | _GUCHARMAP_PUBLIC 91 | void gucharmap_chartable_set_zoom_enabled (GucharmapChartable *chartable, 92 | gboolean enabled); 93 | _GUCHARMAP_PUBLIC 94 | gboolean gucharmap_chartable_get_zoom_enabled (GucharmapChartable *chartable); 95 | _GUCHARMAP_PUBLIC 96 | void gucharmap_chartable_set_snap_pow2 (GucharmapChartable *chartable, 97 | gboolean snap); 98 | _GUCHARMAP_PUBLIC 99 | gboolean gucharmap_chartable_get_snap_pow2 (GucharmapChartable *chartable); 100 | _GUCHARMAP_PUBLIC 101 | void gucharmap_chartable_set_codepoint_list (GucharmapChartable *chartable, 102 | GucharmapCodepointList *codepoint_list); 103 | _GUCHARMAP_PUBLIC 104 | GucharmapCodepointList * gucharmap_chartable_get_codepoint_list (GucharmapChartable *chartable); 105 | 106 | G_END_DECLS 107 | 108 | #endif /* #ifndef GUCHARMAP_CHARTABLE_H */ 109 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-codepoint-list.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "gucharmap.h" 23 | #include "gucharmap-private.h" 24 | 25 | static void 26 | gucharmap_codepoint_list_init (GucharmapCodepointList *list) 27 | { 28 | } 29 | 30 | static void 31 | gucharmap_codepoint_list_class_init (GucharmapCodepointListClass *clazz) 32 | { 33 | } 34 | 35 | G_DEFINE_ABSTRACT_TYPE (GucharmapCodepointList, gucharmap_codepoint_list, G_TYPE_OBJECT) 36 | 37 | /** 38 | * gucharmap_codepoint_list_get_char: 39 | * @list: a #GucharmapCodepointList 40 | * @index: index indicating which character to get 41 | * 42 | * Return value: code point at index @index in the codepoint list, or 43 | * (gunichar)(-1) if @index is beyond the last index. 44 | **/ 45 | gunichar 46 | gucharmap_codepoint_list_get_char (GucharmapCodepointList *list, 47 | gint index) 48 | { 49 | g_return_val_if_fail (GUCHARMAP_IS_CODEPOINT_LIST (list), (gunichar)(-1)); 50 | 51 | return GUCHARMAP_CODEPOINT_LIST_GET_CLASS (list)->get_char (list, index); 52 | } 53 | 54 | /** 55 | * gucharmap_codepoint_list_get_index: 56 | * @list: a #GucharmapCodepointList 57 | * @wc: character for which to find the index 58 | * 59 | * Return value: index of @wc, or -1 if @wc is not in this 60 | * codepoint list. 61 | **/ 62 | gint 63 | gucharmap_codepoint_list_get_index (GucharmapCodepointList *list, 64 | gunichar wc) 65 | { 66 | g_return_val_if_fail (GUCHARMAP_IS_CODEPOINT_LIST (list), -1); 67 | 68 | return GUCHARMAP_CODEPOINT_LIST_GET_CLASS (list)->get_index (list, wc); 69 | } 70 | 71 | /** 72 | * gucharmap_codepoint_list_get_last_index: 73 | * @list: a #GucharmapCodepointList 74 | * 75 | * Return value: last index in this codepoint list. 76 | **/ 77 | gint 78 | gucharmap_codepoint_list_get_last_index (GucharmapCodepointList *list) 79 | { 80 | g_return_val_if_fail (GUCHARMAP_IS_CODEPOINT_LIST (list), -1); 81 | 82 | return GUCHARMAP_CODEPOINT_LIST_GET_CLASS (list)->get_last_index (list); 83 | } 84 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-codepoint-list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef GUCHARMAP_CODEPOINT_LIST_H 24 | #define GUCHARMAP_CODEPOINT_LIST_H 25 | 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define GUCHARMAP_TYPE_CODEPOINT_LIST (gucharmap_codepoint_list_get_type ()) 32 | #define GUCHARMAP_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointList)) 33 | #define GUCHARMAP_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointListClass)) 34 | #define GUCHARMAP_IS_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CODEPOINT_LIST)) 35 | #define GUCHARMAP_IS_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CODEPOINT_LIST)) 36 | #define GUCHARMAP_CODEPOINT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointListClass)) 37 | 38 | typedef struct _GucharmapCodepointList GucharmapCodepointList; 39 | typedef struct _GucharmapCodepointListPrivate GucharmapCodepointListPrivate; 40 | typedef struct _GucharmapCodepointListClass GucharmapCodepointListClass; 41 | 42 | struct _GucharmapCodepointList 43 | { 44 | GObject parent_instance; 45 | 46 | /*< private >*/ 47 | GucharmapCodepointListPrivate *priv; 48 | }; 49 | 50 | struct _GucharmapCodepointListClass 51 | { 52 | GObjectClass parent_class; 53 | 54 | /* zero is the first index */ 55 | gint (*get_last_index) (GucharmapCodepointList *list); 56 | gunichar (*get_char) (GucharmapCodepointList *list, 57 | gint index); 58 | gint (*get_index) (GucharmapCodepointList *list, 59 | gunichar wc); 60 | }; 61 | 62 | _GUCHARMAP_PUBLIC 63 | GType gucharmap_codepoint_list_get_type (void); 64 | 65 | _GUCHARMAP_PUBLIC 66 | gunichar gucharmap_codepoint_list_get_char (GucharmapCodepointList *list, 67 | gint index); 68 | 69 | _GUCHARMAP_PUBLIC 70 | gint gucharmap_codepoint_list_get_index (GucharmapCodepointList *list, 71 | gunichar wc); 72 | 73 | _GUCHARMAP_PUBLIC 74 | gint gucharmap_codepoint_list_get_last_index (GucharmapCodepointList *list); 75 | 76 | G_END_DECLS 77 | 78 | #endif /* #ifndef GUCHARMAP_CODEPOINT_LIST_H */ 79 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2007 Christian Persch 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #include 20 | 21 | #include 22 | 23 | #include "gucharmap.h" 24 | #include "gucharmap-private.h" 25 | 26 | G_GNUC_INTERNAL void 27 | _gucharmap_intl_ensure_initialized (void) 28 | { 29 | static gboolean initialised = FALSE; 30 | 31 | if (initialised) 32 | return; 33 | 34 | bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); 35 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 36 | } 37 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2014 Christian Persch 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 3 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef __GUCHARMAP_GUCHARMAP_MACROS_H__ 24 | #define __GUCHARMAP_GUCHARMAP_MACROS_H__ 25 | 26 | #define _GUCHARMAP_PUBLIC __attribute__((__visibility__("default"))) extern 27 | 28 | #endif /* __GUCHARMAP_GUCHARMAP_MACROS_H__ */ 29 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-marshal.list: -------------------------------------------------------------------------------- 1 | VOID:UINT,UINT 2 | VOID:OBJECT,OBJECT 3 | BOOLEAN:ENUM,INT 4 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | 26 |
27 | 28 | By _Script 29 | app.group-by 30 | script 31 | 32 | 33 | By _Unicode Block 34 | app.group-by 35 | block 36 | 37 |
38 |
39 | 40 | Sho_w only glyphs from this font 41 | app.show-only-glyphs-in-font 42 | 43 | 44 | Snap _Columns to Power of Two 45 | win.snap-cols-pow2 46 | 47 |
48 |
49 | 50 | Zoom _In 51 | app.zoom-in 52 | <Primary>plus 53 | 54 | 55 | Zoom _Out 56 | app.zoom-out 57 | <Primary>minus 58 | 59 | 60 | _Normal Size 61 | app.normal-size 62 | <Primary>0 63 | 64 |
65 |
66 | 67 | _Find 68 | app.find 69 | <Primary>f 70 | 71 |
72 |
73 | 74 | _Help 75 | app.help 76 | F1 77 | 78 | 79 | _About 80 | app.about 81 | 82 |
83 |
84 | 85 | _Close Window 86 | app.close 87 | <Primary>W 88 | 89 |
90 |
91 | 92 | 93 | 94 | _File 95 |
96 | 97 | _Close 98 | win.close 99 | <Primary>W 100 | 101 |
102 |
103 | 104 | _View 105 |
106 | 107 | By _Script 108 | win.group-by 109 | script 110 | 111 | 112 | By _Unicode Block 113 | win.group-by 114 | block 115 | 116 |
117 |
118 | 119 | Sho_w only glyphs from this font 120 | win.show-only-glyphs-in-font 121 | 122 | 123 | Snap _Columns to Power of Two 124 | win.snap-cols-pow2 125 | 126 |
127 |
128 | 129 | Zoom _In 130 | win.zoom-in 131 | <Primary>plus 132 | 133 | 134 | Zoom _Out 135 | win.zoom-out 136 | <Primary>minus 137 | 138 | 139 | _Normal Size 140 | win.normal-size 141 | <Primary>0 142 | 143 |
144 |
145 | 146 | _Search 147 |
148 | 149 | _Find 150 | win.find 151 | <Primary>f 152 | 153 | 154 | Find _Next 155 | win.find-next 156 | <Primary>g 157 | 158 | 159 | Find _Previous 160 | win.find-previous 161 | <Shift><Primary>g 162 | 163 |
164 |
165 | 166 | _Go 167 |
168 | 169 | _Next Character 170 | win.next-character 171 | <Primary>n 172 | 173 | 174 | _Previous Character 175 | win.previous-character 176 | <Primary>p 177 | 178 |
179 | 180 |
181 | 182 | _Help 183 |
184 | 185 | _Contents 186 | win.help 187 | F1 188 | 189 | 190 | _About 191 | win.about 192 | 193 |
194 |
195 |
196 |
197 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-mini-fontsel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #ifndef GUCHARMAP_MINI_FONTSEL_H 21 | #define GUCHARMAP_MINI_FONTSEL_H 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GUCHARMAP_TYPE_MINI_FONT_SELECTION (gucharmap_mini_font_selection_get_type ()) 28 | #define GUCHARMAP_MINI_FONT_SELECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_MINI_FONT_SELECTION, GucharmapMiniFontSelection)) 29 | #define GUCHARMAP_MINI_FONT_SELECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_MINI_FONT_SELECTION, GucharmapMiniFontSelectionClass)) 30 | #define GUCHARMAP_IS_MINI_FONT_SELECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_MINI_FONT_SELECTION)) 31 | #define GUCHARMAP_IS_MINI_FONT_SELECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_MINI_FONT_SELECTION)) 32 | #define GUCHARMAP_MINI_FONT_SELECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_MINI_FONT_SELECTION, GucharmapMiniFontSelectionClass)) 33 | 34 | typedef struct _GucharmapMiniFontSelection GucharmapMiniFontSelection; 35 | typedef struct _GucharmapMiniFontSelectionClass GucharmapMiniFontSelectionClass; 36 | 37 | struct _GucharmapMiniFontSelection 38 | { 39 | GtkHBox parent; 40 | 41 | GtkListStore *family_store; 42 | GtkEntryCompletion *completion; /* font name completion */ 43 | GtkWidget *family; /* combo box */ 44 | GtkWidget *bold; /* toggle button*/ 45 | GtkWidget *italic; /* toggle button*/ 46 | 47 | GtkAdjustment *size_adj; 48 | GtkWidget *size; /* spin button */ 49 | 50 | PangoFontDescription *font_desc; 51 | 52 | gint default_size; 53 | }; 54 | 55 | struct _GucharmapMiniFontSelectionClass 56 | { 57 | GtkHBoxClass parent_class; 58 | }; 59 | 60 | 61 | GType gucharmap_mini_font_selection_get_type (void); 62 | 63 | GtkWidget * gucharmap_mini_font_selection_new (void); 64 | 65 | void gucharmap_mini_font_selection_set_font_desc (GucharmapMiniFontSelection *fontsel, 66 | PangoFontDescription *font_desc); 67 | 68 | PangoFontDescription * gucharmap_mini_font_selection_get_font_desc (GucharmapMiniFontSelection *fontsel); 69 | 70 | void gucharmap_mini_font_selection_change_font_size (GucharmapMiniFontSelection *fontsel, 71 | float factor); 72 | 73 | void gucharmap_mini_font_selection_reset_font_size (GucharmapMiniFontSelection *fontsel); 74 | 75 | G_END_DECLS 76 | 77 | #endif /* #ifndef GUCHARMAP_MINI_FONTSEL_H */ 78 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-print-operation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2007, 2008 Christian Persch 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope print_operation it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, see . 16 | */ 17 | 18 | #ifndef GUCHARMAP_PRINT_OPERATION_H 19 | #define GUCHARMAP_PRINT_OPERATION_H 20 | 21 | #include 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GUCHARMAP_TYPE_PRINT_OPERATION (gucharmap_print_operation_get_type ()) 28 | #define GUCHARMAP_PRINT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_PRINT_OPERATION, GucharmapPrintOperation)) 29 | #define GUCHARMAP_PRINT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_PRINT_OPERATION, GucharmapPrintOperationClass)) 30 | #define GUCHARMAP_IS_PRINT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_PRINT_OPERATION)) 31 | #define GUCHARMAP_IS_PRINT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_PRINT_OPERATION)) 32 | #define GUCHARMAP_PRINT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_PRINT_OPERATION, GucharmapPrintOperationClass)) 33 | 34 | typedef struct _GucharmapPrintOperation GucharmapPrintOperation; 35 | typedef struct _GucharmapPrintOperationClass GucharmapPrintOperationClass; 36 | typedef struct _GucharmapPrintOperationPrivate GucharmapPrintOperationPrivate; 37 | 38 | struct _GucharmapPrintOperation 39 | { 40 | GtkPrintOperation parent_instance; 41 | 42 | /*< private >*/ 43 | GucharmapPrintOperationPrivate *priv; 44 | }; 45 | 46 | struct _GucharmapPrintOperationClass 47 | { 48 | GtkPrintOperationClass parent_class; 49 | }; 50 | 51 | GType gucharmap_print_operation_get_type (void); 52 | 53 | GtkPrintOperation * gucharmap_print_operation_new (GucharmapCodepointList *codepoint_list, 54 | PangoFontDescription *font_desc); 55 | 56 | G_END_DECLS 57 | 58 | #endif /* !GUCHARMAP_PRINT_OPERATION_H */ 59 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #include 21 | 22 | #define I_(string) g_intern_static_string (string) 23 | 24 | /* The last unicode character we support */ 25 | #define UNICHAR_MAX (0x0010FFFFUL) 26 | 27 | G_GNUC_INTERNAL void _gucharmap_intl_ensure_initialized (void); 28 | 29 | G_GNUC_INTERNAL gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc); 30 | 31 | #define _GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL_ATTRS (2) 32 | 33 | struct _GucharmapChaptersModelPrivate { 34 | GucharmapCodepointList *book_list; 35 | int sort_column; 36 | }; 37 | 38 | struct _GucharmapChartablePrivate { 39 | /* scrollable implementation */ 40 | GtkAdjustment *vadjustment; 41 | gulong vadjustment_changed_handler_id; 42 | /* GtkScrollable impl */ 43 | GtkAdjustment *hadjustment; /* unused */ 44 | guint hscroll_policy : 1; /* unused */ 45 | guint vscroll_policy : 1; 46 | 47 | /* Font */ 48 | PangoFontDescription *font_desc; 49 | 50 | /* Geometry */ 51 | int minimal_column_width; /* depends on font_desc and size allocation */ 52 | int minimal_row_height; /* depends on font_desc and size allocation */ 53 | int n_padded_columns; /* columns 0..n-1 will be 1px wider than minimal_column_width */ 54 | int n_padded_rows; /* rows 0..n-1 will be 1px taller than minimal_row_height */ 55 | int rows; 56 | int cols; 57 | int page_size; /* rows * cols */ 58 | 59 | int page_first_cell; /* the cell index of the top left corner */ 60 | int active_cell; /* the active cell index */ 61 | 62 | /* Drawing */ 63 | PangoLayout *pango_layout; 64 | 65 | /* Zoom popup */ 66 | GtkWidget *zoom_window; 67 | int zoom_image_width; 68 | int zoom_image_height; 69 | 70 | /* for dragging (#114534) */ 71 | gdouble click_x, click_y; 72 | 73 | GtkTargetList *target_list; 74 | 75 | GucharmapCodepointList *codepoint_list; 76 | int last_cell; /* from gucharmap_codepoint_list_get_last_index */ 77 | gboolean codepoint_list_changed; 78 | 79 | /* Settings */ 80 | guint snap_pow2_enabled : 1; 81 | guint zoom_mode_enabled : 1; 82 | guint font_fallback : 1; 83 | }; 84 | 85 | gint _gucharmap_chartable_cell_column (GucharmapChartable *chartable, 86 | guint cell); 87 | gint _gucharmap_chartable_column_width (GucharmapChartable *chartable, 88 | gint col); 89 | gint _gucharmap_chartable_x_offset (GucharmapChartable *chartable, 90 | gint col); 91 | gint _gucharmap_chartable_row_height (GucharmapChartable *chartable, 92 | gint row); 93 | gint _gucharmap_chartable_y_offset (GucharmapChartable *chartable, 94 | gint row); 95 | void _gucharmap_chartable_redraw (GucharmapChartable *chartable, 96 | gboolean move_zoom); 97 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-script-chapters-model.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "gucharmap.h" 28 | #include "gucharmap-private.h" 29 | 30 | static gboolean 31 | is_special_script (const char *script) 32 | { 33 | return g_str_equal (script, "Common") || 34 | g_str_equal (script, "Inherited") || 35 | g_str_equal (script, "Unknown"); 36 | } 37 | 38 | static void 39 | gucharmap_script_chapters_model_init (GucharmapScriptChaptersModel *model) 40 | { 41 | GucharmapChaptersModel *chapters_model = GUCHARMAP_CHAPTERS_MODEL (model); 42 | GtkListStore *store = GTK_LIST_STORE (model); 43 | const gchar **unicode_scripts; 44 | GtkTreeIter iter; 45 | guint i; 46 | GType types[] = { 47 | G_TYPE_STRING, 48 | G_TYPE_STRING, 49 | PANGO_TYPE_ATTR_LIST, 50 | }; 51 | PangoAttrList *attr_list; 52 | 53 | attr_list = pango_attr_list_new (); 54 | pango_attr_list_insert (attr_list, pango_attr_style_new (PANGO_STYLE_ITALIC)); 55 | 56 | gtk_list_store_set_column_types (store, G_N_ELEMENTS (types), types); 57 | 58 | unicode_scripts = gucharmap_unicode_list_scripts (); 59 | for (i = 0; unicode_scripts[i]; i++) 60 | { 61 | gtk_list_store_append (store, &iter); 62 | gtk_list_store_set (store, &iter, 63 | GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID, unicode_scripts[i], 64 | GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL, _(unicode_scripts[i]), 65 | _GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL_ATTRS, 66 | is_special_script (unicode_scripts[i]) ? attr_list : NULL, 67 | -1); 68 | } 69 | g_free (unicode_scripts); 70 | pango_attr_list_unref (attr_list); 71 | 72 | chapters_model->priv->sort_column = GUCHARMAP_CHAPTERS_MODEL_COLUMN_LABEL; 73 | } 74 | 75 | static GucharmapCodepointList * 76 | get_codepoint_list (GucharmapChaptersModel *chapters, 77 | GtkTreeIter *iter) 78 | { 79 | GtkTreeModel *model = GTK_TREE_MODEL (chapters); 80 | GucharmapCodepointList *list; 81 | gchar *script_untranslated; 82 | 83 | gtk_tree_model_get (model, iter, GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID, &script_untranslated, -1); 84 | 85 | list = gucharmap_script_codepoint_list_new (); 86 | if (!gucharmap_script_codepoint_list_set_script (GUCHARMAP_SCRIPT_CODEPOINT_LIST (list), script_untranslated)) 87 | { 88 | g_error ("gucharmap_script_codepoint_list_set_script (\"%s\") failed\n", script_untranslated); 89 | /* not reached */ 90 | return NULL; 91 | } 92 | 93 | g_free (script_untranslated); 94 | return list; 95 | } 96 | 97 | static gboolean 98 | append_script (GtkTreeModel *model, 99 | GtkTreePath *path, 100 | GtkTreeIter *iter, 101 | GucharmapScriptCodepointList *list) 102 | { 103 | gchar *script_untranslated; 104 | 105 | gtk_tree_model_get (model, iter, GUCHARMAP_CHAPTERS_MODEL_COLUMN_ID, &script_untranslated, -1); 106 | 107 | gucharmap_script_codepoint_list_append_script (list, script_untranslated); 108 | 109 | return FALSE; 110 | } 111 | 112 | static GucharmapCodepointList * 113 | get_book_codepoint_list (GucharmapChaptersModel *chapters) 114 | { 115 | GucharmapChaptersModelPrivate *priv = chapters->priv; 116 | 117 | if (priv->book_list == NULL) 118 | { 119 | GtkTreeModel *model = GTK_TREE_MODEL (chapters); 120 | 121 | priv->book_list = gucharmap_script_codepoint_list_new (); 122 | gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc) append_script, priv->book_list); 123 | } 124 | 125 | return g_object_ref (priv->book_list); 126 | } 127 | 128 | static gboolean 129 | character_to_iter (GucharmapChaptersModel *chapters_model, 130 | gunichar wc, 131 | GtkTreeIter *iter) 132 | { 133 | const char *script; 134 | 135 | script = gucharmap_unicode_get_script_for_char (wc); 136 | if (script == NULL) 137 | return FALSE; 138 | 139 | return gucharmap_chapters_model_id_to_iter (chapters_model, script, iter); 140 | } 141 | 142 | static void 143 | gucharmap_script_chapters_model_class_init (GucharmapScriptChaptersModelClass *clazz) 144 | { 145 | GucharmapChaptersModelClass *chapters_class = GUCHARMAP_CHAPTERS_MODEL_CLASS (clazz); 146 | 147 | _gucharmap_intl_ensure_initialized (); 148 | 149 | chapters_class->title = _("Script"); 150 | chapters_class->character_to_iter = character_to_iter; 151 | chapters_class->get_codepoint_list = get_codepoint_list; 152 | chapters_class->get_book_codepoint_list = get_book_codepoint_list; 153 | } 154 | 155 | G_DEFINE_TYPE (GucharmapScriptChaptersModel, gucharmap_script_chapters_model, GUCHARMAP_TYPE_CHAPTERS_MODEL) 156 | 157 | GucharmapChaptersModel * 158 | gucharmap_script_chapters_model_new (void) 159 | { 160 | return g_object_new (gucharmap_script_chapters_model_get_type (), NULL); 161 | } 162 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-script-chapters-model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #ifndef GUCHARMAP_SCRIPT_CHAPTERS_MODEL_H 25 | #define GUCHARMAP_SCRIPT_CHAPTERS_MODEL_H 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL (gucharmap_script_chapters_model_get_type ()) 33 | #define GUCHARMAP_SCRIPT_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL, GucharmapScriptChaptersModel)) 34 | #define GUCHARMAP_SCRIPT_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL, GucharmapScriptChaptersModelClass)) 35 | #define GUCHARMAP_IS_SCRIPT_CHAPTERS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL)) 36 | #define GUCHARMAP_IS_SCRIPT_CHAPTERS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL)) 37 | #define GUCHARMAP_SCRIPT_CHAPTERS_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_SCRIPT_CHAPTERS_MODEL, GucharmapScriptChaptersModelClass)) 38 | 39 | typedef struct _GucharmapScriptChaptersModel GucharmapScriptChaptersModel; 40 | typedef struct _GucharmapScriptChaptersModelPrivate GucharmapScriptChaptersModelPrivate; 41 | typedef struct _GucharmapScriptChaptersModelClass GucharmapScriptChaptersModelClass; 42 | 43 | struct _GucharmapScriptChaptersModel 44 | { 45 | GucharmapChaptersModel parent; 46 | 47 | /*< private >*/ 48 | GucharmapScriptChaptersModelPrivate *priv; 49 | }; 50 | 51 | struct _GucharmapScriptChaptersModelClass 52 | { 53 | GucharmapChaptersModelClass parent_class; 54 | }; 55 | 56 | _GUCHARMAP_PUBLIC 57 | GType gucharmap_script_chapters_model_get_type (void); 58 | _GUCHARMAP_PUBLIC 59 | GucharmapChaptersModel* gucharmap_script_chapters_model_new (void); 60 | 61 | G_END_DECLS 62 | 63 | #endif /* #ifndef GUCHARMAP_SCRIPT_CHAPTERS_MODEL_H */ 64 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-script-codepoint-list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 20 | #error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef GUCHARMAP_SCRIPT_CODEPOINT_LIST_H 24 | #define GUCHARMAP_SCRIPT_CODEPOINT_LIST_H 25 | 26 | #include 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST (gucharmap_script_codepoint_list_get_type ()) 34 | #define GUCHARMAP_SCRIPT_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST, GucharmapScriptCodepointList)) 35 | #define GUCHARMAP_SCRIPT_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST, GucharmapScriptCodepointListClass)) 36 | #define GUCHARMAP_IS_SCRIPT_CODEPOINT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST)) 37 | #define GUCHARMAP_IS_SCRIPT_CODEPOINT_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST)) 38 | #define GUCHARMAP_SCRIPT_CODEPOINT_LIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_SCRIPT_CODEPOINT_LIST, GucharmapScriptCodepointListClass)) 39 | 40 | typedef struct _GucharmapScriptCodepointList GucharmapScriptCodepointList; 41 | typedef struct _GucharmapScriptCodepointListPrivate GucharmapScriptCodepointListPrivate; 42 | typedef struct _GucharmapScriptCodepointListClass GucharmapScriptCodepointListClass; 43 | 44 | struct _GucharmapScriptCodepointList 45 | { 46 | GucharmapCodepointList parent; 47 | 48 | /*< private >*/ 49 | GucharmapScriptCodepointListPrivate *priv; 50 | }; 51 | 52 | struct _GucharmapScriptCodepointListClass 53 | { 54 | GucharmapCodepointListClass parent_class; 55 | }; 56 | 57 | _GUCHARMAP_PUBLIC 58 | GType gucharmap_script_codepoint_list_get_type (void); 59 | _GUCHARMAP_PUBLIC 60 | GucharmapCodepointList * gucharmap_script_codepoint_list_new (void); 61 | _GUCHARMAP_PUBLIC 62 | gboolean gucharmap_script_codepoint_list_set_script (GucharmapScriptCodepointList *list, 63 | const gchar *script); 64 | _GUCHARMAP_PUBLIC 65 | gboolean gucharmap_script_codepoint_list_set_scripts (GucharmapScriptCodepointList *list, 66 | const gchar **scripts); 67 | _GUCHARMAP_PUBLIC 68 | gboolean gucharmap_script_codepoint_list_append_script (GucharmapScriptCodepointList *list, 69 | const gchar *script); 70 | /* XXX: gucharmap_script_codepoint_list_get_script? seems unnecessary */ 71 | 72 | G_END_DECLS 73 | 74 | #endif /* #ifndef GUCHARMAP_SCRIPT_CODEPOINT_LIST_H */ 75 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-search-dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | /* GucharmapSearchDialog handles all aspects of searching */ 20 | 21 | #ifndef GUCHARMAP_SEARCH_DIALOG_H 22 | #define GUCHARMAP_SEARCH_DIALOG_H 23 | 24 | #include 25 | #include 26 | #include "gucharmap-window.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GUCHARMAP_TYPE_SEARCH_DIALOG (gucharmap_search_dialog_get_type ()) 31 | #define GUCHARMAP_SEARCH_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_SEARCH_DIALOG, GucharmapSearchDialog)) 32 | #define GUCHARMAP_SEARCH_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_SEARCH_DIALOG, GucharmapSearchDialogClass)) 33 | #define GUCHARMAP_IS_SEARCH_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_SEARCH_DIALOG)) 34 | #define GUCHARMAP_IS_SEARCH_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_SEARCH_DIALOG)) 35 | #define GUCHARMAP_SEARCH_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_SEARCH_DIALOG, GucharmapSearchDialogClass)) 36 | 37 | typedef struct _GucharmapSearchDialog GucharmapSearchDialog; 38 | typedef struct _GucharmapSearchDialogClass GucharmapSearchDialogClass; 39 | 40 | struct _GucharmapSearchDialog 41 | { 42 | GtkDialog parent; 43 | }; 44 | 45 | struct _GucharmapSearchDialogClass 46 | { 47 | GtkDialogClass parent_class; 48 | 49 | /* signals */ 50 | void (* search_start) (void); 51 | void (* search_finish) (gunichar found_char); 52 | }; 53 | 54 | typedef enum 55 | { 56 | GUCHARMAP_DIRECTION_BACKWARD = -1, 57 | GUCHARMAP_DIRECTION_FORWARD = 1 58 | } 59 | GucharmapDirection; 60 | 61 | GType gucharmap_search_dialog_get_type (void); 62 | GtkWidget * gucharmap_search_dialog_new (GucharmapWindow *parent); 63 | void gucharmap_search_dialog_present (GucharmapSearchDialog *search_dialog); 64 | void gucharmap_search_dialog_set_search (GucharmapSearchDialog *search_dialog, 65 | const char *search_string); 66 | void gucharmap_search_dialog_start_search (GucharmapSearchDialog *search_dialog, 67 | GucharmapDirection direction); 68 | gdouble gucharmap_search_dialog_get_completed (GucharmapSearchDialog *search_dialog); 69 | 70 | G_END_DECLS 71 | 72 | #endif /* #ifndef GUCHARMAP_SEARCH_DIALOG_H */ 73 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-settings.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2005 Jason Allen 3 | * Copyright © 2007 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include "gucharmap-settings.h" 29 | 30 | #define WINDOW_STATE_TIMEOUT 1 /* s */ 31 | 32 | typedef struct { 33 | GSettings *settings; 34 | guint timeout_id; 35 | int width; 36 | int height; 37 | guint is_maximised : 1; 38 | guint is_fullscreen : 1; 39 | } WindowState; 40 | 41 | static gboolean 42 | window_state_timeout_cb (WindowState *state) 43 | { 44 | g_settings_set (state->settings, "size", "(ii)", state->width, state->height); 45 | 46 | state->timeout_id = 0; 47 | return FALSE; 48 | } 49 | 50 | static void 51 | free_window_state (WindowState *state) 52 | { 53 | if (state->timeout_id != 0) { 54 | g_source_remove (state->timeout_id); 55 | 56 | /* And store now */ 57 | window_state_timeout_cb (state); 58 | } 59 | 60 | g_object_unref (state->settings); 61 | 62 | g_slice_free (WindowState, state); 63 | } 64 | 65 | static void 66 | window_size_allocate_cb (GtkWidget *widget, 67 | GtkAllocation *allocation, 68 | WindowState *state) 69 | { 70 | int width, height; 71 | 72 | gtk_window_get_size (GTK_WINDOW (widget), &width, &height); 73 | 74 | if (!state->is_maximised && !state->is_fullscreen && 75 | (state->width != width || state->height != height)) { 76 | state->width = width; 77 | state->height = height; 78 | 79 | if (state->timeout_id == 0) { 80 | state->timeout_id = g_timeout_add_seconds (WINDOW_STATE_TIMEOUT, 81 | (GSourceFunc) window_state_timeout_cb, 82 | state); 83 | } 84 | } 85 | } 86 | 87 | static gboolean 88 | window_state_event_cb (GtkWidget *widget, 89 | GdkEventWindowState *event, 90 | WindowState *state) 91 | { 92 | if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { 93 | state->is_maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0; 94 | g_settings_set_boolean (state->settings, "maximized", state->is_maximised); 95 | } 96 | if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { 97 | state->is_fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0; 98 | g_settings_set_boolean (state->settings, "fullscreen", state->is_fullscreen); 99 | } 100 | 101 | return FALSE; 102 | } 103 | 104 | /** 105 | * gucharma_settings_add_window: 106 | * @window: a #GtkWindow 107 | * 108 | * Restore the window configuration, and persist changes to the window configuration: 109 | * window width and height, and maximised and fullscreen state. 110 | * @window must not be realised yet. 111 | */ 112 | void 113 | gucharmap_settings_add_window (GtkWindow *window) 114 | { 115 | WindowState *state; 116 | int width, height; 117 | gboolean maximised, fullscreen; 118 | 119 | g_return_if_fail (GTK_IS_WINDOW (window)); 120 | g_return_if_fail (!gtk_widget_get_realized (GTK_WIDGET (window))); 121 | 122 | state = g_slice_new0 (WindowState); 123 | state->settings = g_settings_new ("org.gnome.Charmap.WindowState"); 124 | g_object_set_data_full (G_OBJECT (window), "GamesConf::WindowState", 125 | state, (GDestroyNotify) free_window_state); 126 | 127 | g_signal_connect_after (window, "size-allocate", 128 | G_CALLBACK (window_size_allocate_cb), state); 129 | g_signal_connect (window, "window-state-event", 130 | G_CALLBACK (window_state_event_cb), state); 131 | 132 | maximised = g_settings_get_boolean (state->settings, "maximized"); 133 | fullscreen = g_settings_get_boolean (state->settings, "fullscreen"); 134 | g_settings_get (state->settings, "size", "(ii)", &width, &height); 135 | 136 | if (width > 0 && height > 0) { 137 | gtk_window_set_default_size (GTK_WINDOW (window), width, height); 138 | } 139 | if (maximised) { 140 | gtk_window_maximize (GTK_WINDOW (window)); 141 | } 142 | if (fullscreen) { 143 | gtk_window_fullscreen (GTK_WINDOW (window)); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-settings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2005 Jason Allen 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by the 6 | * Free Software Foundation; either version 3 of the License, or (at your 7 | * option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 17 | */ 18 | 19 | #ifndef GUCHARMAP_SETTINGS_H 20 | #define GUCHARMAP_SETTINGS_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef enum 29 | { 30 | GUCHARMAP_CHAPTERS_SCRIPT = 0, 31 | GUCHARMAP_CHAPTERS_BLOCK = 1 32 | } GucharmapChaptersMode; 33 | 34 | void gucharmap_settings_add_window (GtkWindow *window); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* #ifndef GUCHARMAP_SETTINGS_H */ 39 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-type-builtins.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include 3 | 4 | #include 5 | 6 | /*** END file-header ***/ 7 | 8 | /*** BEGIN file-production ***/ 9 | /* enumerations from "@basename@" */ 10 | /*** END file-production ***/ 11 | 12 | /*** BEGIN value-header ***/ 13 | GType 14 | @enum_name@_get_type (void) 15 | { 16 | static gsize g_define_type_id = 0; 17 | 18 | if (g_once_init_enter (&g_define_type_id)) { 19 | static const G@Type@Value values[] = { 20 | /*** END value-header ***/ 21 | 22 | /*** BEGIN value-production ***/ 23 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 24 | /*** END value-production ***/ 25 | 26 | /*** BEGIN value-tail ***/ 27 | { 0, NULL, NULL } 28 | }; 29 | GType type_id = \ 30 | g_@type@_register_static (/* g_intern_static_string */ ("@EnumName@"), values); 31 | 32 | g_once_init_leave (&g_define_type_id, type_id); 33 | } 34 | 35 | return g_define_type_id; 36 | } 37 | 38 | /*** END value-tail ***/ 39 | 40 | /*** BEGIN file-tail ***/ 41 | 42 | /*** END file-tail ***/ 43 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-type-builtins.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 3 | #error "Only can be included directly." 4 | #endif 5 | 6 | #ifndef GUCHARMAP_TYPE_BUILTINS_H 7 | #define GUCHARMAP_TYPE_BUILTINS_H 8 | 9 | #include 10 | #include 11 | 12 | G_BEGIN_DECLS 13 | /*** END file-header ***/ 14 | 15 | /*** BEGIN file-production ***/ 16 | 17 | /* enumerations from "@basename@" */ 18 | /*** END file-production ***/ 19 | 20 | /*** BEGIN value-header ***/ 21 | _GUCHARMAP_PUBLIC 22 | GType @enum_name@_get_type (void); 23 | #define GUCHARMAP_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) 24 | /*** END value-header ***/ 25 | 26 | /*** BEGIN file-tail ***/ 27 | G_END_DECLS 28 | 29 | #endif /* !GUCHARMAP_TYPE_BUILTINS_H */ 30 | /*** END file-tail ***/ 31 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-unicode-info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright (c) 2016 DaeHyun Sung 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #ifndef GUCHARMAP_UNICODE_INFO_H 25 | #define GUCHARMAP_UNICODE_INFO_H 26 | 27 | #include 28 | 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | /** 34 | * GucharmapUnicodeVersion: 35 | * @GUCHARMAP_UNICODE_VERSION_UNASSIGNED: Unassigned Unicode version 36 | * @GUCHARMAP_UNICODE_VERSION_1_1: Unicode version 1.1 37 | * @GUCHARMAP_UNICODE_VERSION_2_0: Unicode version 2.0 38 | * @GUCHARMAP_UNICODE_VERSION_2_1: Unicode version 2.1 39 | * @GUCHARMAP_UNICODE_VERSION_3_0: Unicode version 3.0 40 | * @GUCHARMAP_UNICODE_VERSION_3_1: Unicode version 3.1 41 | * @GUCHARMAP_UNICODE_VERSION_3_2: Unicode version 3.2 42 | * @GUCHARMAP_UNICODE_VERSION_4_0: Unicode version 4.0 43 | * @GUCHARMAP_UNICODE_VERSION_4_1: Unicode version 4.1 44 | * @GUCHARMAP_UNICODE_VERSION_5_0: Unicode version 5.0 45 | * @GUCHARMAP_UNICODE_VERSION_5_1: Unicode version 5.1 46 | * @GUCHARMAP_UNICODE_VERSION_5_2: Unicode version 5.2 47 | * @GUCHARMAP_UNICODE_VERSION_6_0: Unicode version 6.0 48 | * @GUCHARMAP_UNICODE_VERSION_6_1: Unicode version 6.1 49 | * @GUCHARMAP_UNICODE_VERSION_6_2: Unicode version 6.2 50 | * @GUCHARMAP_UNICODE_VERSION_6_3: Unicode version 6.3 51 | * @GUCHARMAP_UNICODE_VERSION_7_0: Unicode version 7.0 52 | * @GUCHARMAP_UNICODE_VERSION_8_0: Unicode version 8.0 53 | * @GUCHARMAP_UNICODE_VERSION_9_0: Unicode version 9.0 54 | * @GUCHARMAP_UNICODE_VERSION_10_0: Unicode version 10.0 55 | * @GUCHARMAP_UNICODE_VERSION_11_0: Unicode version 11.0 56 | * @GUCHARMAP_UNICODE_VERSION_12_0: Unicode version 12.0 57 | * @GUCHARMAP_UNICODE_VERSION_12_1: Unicode version 12.1 58 | * @GUCHARMAP_UNICODE_VERSION_13_0: Unicode version 13.0 59 | * @GUCHARMAP_UNICODE_VERSION_14_0: Unicode version 14.0 60 | * @GUCHARMAP_UNICODE_VERSION_15_0: Unicode version 15.0 61 | * @GUCHARMAP_UNICODE_VERSION_15_1: Unicode version 15.1 62 | * @GUCHARMAP_UNICODE_VERSION_16_0: Unicode version 16.0 63 | * @GUCHARMAP_UNICODE_VERSION_LATEST: Latest Unicode version 64 | */ 65 | typedef enum { 66 | GUCHARMAP_UNICODE_VERSION_UNASSIGNED, 67 | GUCHARMAP_UNICODE_VERSION_1_1, 68 | GUCHARMAP_UNICODE_VERSION_2_0, 69 | GUCHARMAP_UNICODE_VERSION_2_1, 70 | GUCHARMAP_UNICODE_VERSION_3_0, 71 | GUCHARMAP_UNICODE_VERSION_3_1, 72 | GUCHARMAP_UNICODE_VERSION_3_2, 73 | GUCHARMAP_UNICODE_VERSION_4_0, 74 | GUCHARMAP_UNICODE_VERSION_4_1, 75 | GUCHARMAP_UNICODE_VERSION_5_0, 76 | GUCHARMAP_UNICODE_VERSION_5_1, 77 | GUCHARMAP_UNICODE_VERSION_5_2, 78 | GUCHARMAP_UNICODE_VERSION_6_0, 79 | GUCHARMAP_UNICODE_VERSION_6_1, 80 | GUCHARMAP_UNICODE_VERSION_6_2, 81 | GUCHARMAP_UNICODE_VERSION_6_3, 82 | GUCHARMAP_UNICODE_VERSION_7_0, 83 | GUCHARMAP_UNICODE_VERSION_8_0, 84 | GUCHARMAP_UNICODE_VERSION_9_0, 85 | GUCHARMAP_UNICODE_VERSION_10_0, 86 | GUCHARMAP_UNICODE_VERSION_11_0, 87 | GUCHARMAP_UNICODE_VERSION_12_0, 88 | GUCHARMAP_UNICODE_VERSION_12_1, 89 | GUCHARMAP_UNICODE_VERSION_13_0, 90 | GUCHARMAP_UNICODE_VERSION_14_0, 91 | GUCHARMAP_UNICODE_VERSION_15_0, 92 | GUCHARMAP_UNICODE_VERSION_15_1, 93 | GUCHARMAP_UNICODE_VERSION_16_0, 94 | GUCHARMAP_UNICODE_VERSION_LATEST = GUCHARMAP_UNICODE_VERSION_16_0 /* private, will move forward with each revision */ 95 | } GucharmapUnicodeVersion; 96 | 97 | /* return values are read-only */ 98 | _GUCHARMAP_PUBLIC 99 | const gchar * gucharmap_get_unicode_name (gunichar uc); 100 | _GUCHARMAP_PUBLIC 101 | const gchar * gucharmap_get_unicode_data_name (gunichar uc); 102 | _GUCHARMAP_PUBLIC 103 | gint gucharmap_get_unicode_data_name_count (void); 104 | _GUCHARMAP_PUBLIC 105 | GucharmapUnicodeVersion gucharmap_get_unicode_version (gunichar uc); 106 | _GUCHARMAP_PUBLIC 107 | const gchar * gucharmap_get_unicode_category_name (gunichar uc); 108 | _GUCHARMAP_PUBLIC 109 | gint gucharmap_get_unihan_count (void); 110 | _GUCHARMAP_PUBLIC 111 | const gchar * gucharmap_get_unicode_kDefinition (gunichar uc); 112 | _GUCHARMAP_PUBLIC 113 | const gchar * gucharmap_get_unicode_kCantonese (gunichar uc); 114 | _GUCHARMAP_PUBLIC 115 | const gchar * gucharmap_get_unicode_kMandarin (gunichar uc); 116 | _GUCHARMAP_PUBLIC 117 | const gchar * gucharmap_get_unicode_kTang (gunichar uc); 118 | _GUCHARMAP_PUBLIC 119 | const gchar * gucharmap_get_unicode_kKorean (gunichar uc); 120 | _GUCHARMAP_PUBLIC 121 | const gchar * gucharmap_get_unicode_kJapaneseKun (gunichar uc); 122 | _GUCHARMAP_PUBLIC 123 | const gchar * gucharmap_get_unicode_kJapaneseOn (gunichar uc); 124 | _GUCHARMAP_PUBLIC 125 | const gchar * gucharmap_get_unicode_kHangul (gunichar uc); 126 | _GUCHARMAP_PUBLIC 127 | const gchar * gucharmap_get_unicode_kVietnamese (gunichar uc); 128 | 129 | /* nameslist stuff */ 130 | _GUCHARMAP_PUBLIC 131 | const gchar ** gucharmap_get_nameslist_stars (gunichar uc); 132 | _GUCHARMAP_PUBLIC 133 | const gchar ** gucharmap_get_nameslist_equals (gunichar uc); 134 | _GUCHARMAP_PUBLIC 135 | gunichar * gucharmap_get_nameslist_exes (gunichar uc); 136 | _GUCHARMAP_PUBLIC 137 | const gchar ** gucharmap_get_nameslist_pounds (gunichar uc); 138 | _GUCHARMAP_PUBLIC 139 | const gchar ** gucharmap_get_nameslist_colons (gunichar uc); 140 | _GUCHARMAP_PUBLIC 141 | gboolean gucharmap_unichar_validate (gunichar uc); 142 | _GUCHARMAP_PUBLIC 143 | gint gucharmap_unichar_to_printable_utf8 (gunichar uc, 144 | gchar *outbuf); 145 | _GUCHARMAP_PUBLIC 146 | GUnicodeType gucharmap_unichar_type (gunichar uc); 147 | _GUCHARMAP_PUBLIC 148 | gboolean gucharmap_unichar_isdefined (gunichar uc); 149 | _GUCHARMAP_PUBLIC 150 | gboolean gucharmap_unichar_isgraph (gunichar uc); 151 | 152 | /* defined in gucharmap-script-codepoint-list.c */ 153 | _GUCHARMAP_PUBLIC 154 | const gchar ** gucharmap_unicode_list_scripts (void); 155 | _GUCHARMAP_PUBLIC 156 | const gchar * gucharmap_unicode_get_script_for_char (gunichar wc); 157 | 158 | _GUCHARMAP_PUBLIC 159 | const gchar * gucharmap_unicode_version_to_string (GucharmapUnicodeVersion version); 160 | 161 | /* doesn't really belong here, but no better place was available */ 162 | _GUCHARMAP_PUBLIC 163 | gunichar gucharmap_unicode_get_locale_character (void); 164 | 165 | G_END_DECLS 166 | 167 | #endif /* #ifndef GUCHARMAP_UNICODE_INFO_H */ 168 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 2 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #ifndef GUCHARMAP_VERSION_H 25 | #define GUCHARMAP_VERSION_H 26 | 27 | #define GUCHARMAP_VERSION_MAJOR (@GUCHARMAP_VERSION_MAJOR@) 28 | #define GUCHARMAP_VERSION_MINOR (@GUCHARMAP_VERSION_MINOR@) 29 | #define GUCHARMAP_VERSION_MICRO (@GUCHARMAP_VERSION_MICRO@) 30 | 31 | #define GUCHARMAP_CHECK_VERSION(major,minor,micro) \ 32 | (GUCHARMAP_VERSION_MAJOR > (major) || \ 33 | (GUCHARMAP_VERSION_MAJOR == (major) && GUCHARMAP_VERSION_MINOR > (minor)) || \ 34 | (GUCHARMAP_VERSION_MAJOR == (major) && GUCHARMAP_VERSION_MINOR == (minor) && GUCHARMAP_VERSION_MICRO >= (micro))) 35 | 36 | #endif /* #ifndef GUCHARMAP_VERSION_H */ 37 | -------------------------------------------------------------------------------- /gucharmap/gucharmap-window.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2007, 2008 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 3 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #ifndef GUCHARMAP_WINDOW_H 21 | #define GUCHARMAP_WINDOW_H 22 | 23 | #include 24 | #include 25 | #include "gucharmap-mini-fontsel.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GUCHARMAP_TYPE_WINDOW (gucharmap_window_get_type ()) 30 | #define GUCHARMAP_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_WINDOW, GucharmapWindow)) 31 | #define GUCHARMAP_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_WINDOW, GucharmapWindowClass)) 32 | #define GUCHARMAP_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_WINDOW)) 33 | #define GUCHARMAP_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_WINDOW)) 34 | #define GUCHARMAP_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_WINDOW, GucharmapWindowClass)) 35 | 36 | typedef struct _GucharmapWindow GucharmapWindow; 37 | typedef struct _GucharmapWindowClass GucharmapWindowClass; 38 | 39 | struct _GucharmapWindow 40 | { 41 | GtkApplicationWindow parent; 42 | 43 | GSettings *settings; 44 | GucharmapCharmap *charmap; 45 | GtkWidget *status; 46 | 47 | GtkWidget *fontsel; 48 | GtkWidget *text_to_copy_entry; 49 | 50 | GtkWidget *search_dialog; /* takes care of all aspects of searching */ 51 | 52 | GtkPageSetup *page_setup; 53 | GtkPrintSettings *print_settings; 54 | 55 | guint in_notification : 1; 56 | }; 57 | 58 | struct _GucharmapWindowClass 59 | { 60 | GtkApplicationWindowClass parent_class; 61 | }; 62 | 63 | #define GUCHARMAP_ICON_NAME "accessories-character-map" 64 | 65 | GType gucharmap_window_get_type (void); 66 | 67 | GtkWidget * gucharmap_window_new (GtkApplication *application); 68 | 69 | void gucharmap_window_set_font (GucharmapWindow *guw, 70 | const char *font); 71 | 72 | void gucharmap_window_search (GucharmapWindow *guw, 73 | const char *str); 74 | 75 | G_END_DECLS 76 | 77 | #endif /* #ifndef GUCHARMAP_WINDOW_H */ 78 | -------------------------------------------------------------------------------- /gucharmap/gucharmap.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | gucharmap-menus.ui 21 | 22 | 23 | -------------------------------------------------------------------------------- /gucharmap/gucharmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2004 Noah Levitt 3 | * Copyright © 2008 Christian Persch 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation; either version 2 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA 18 | */ 19 | 20 | #ifndef GUCHARMAP_H 21 | #define GUCHARMAP_H 22 | 23 | #define __GUCHARMAP_GUCHARMAP_H_INSIDE__ 24 | 25 | #include 26 | 27 | #if defined(GUCHARMAP_DISABLE_DEPRECATION_WARNINGS) || !GLIB_CHECK_VERSION (2, 31, 0) 28 | #define GUCHARMAP_DEPRECATED 29 | #define GUCHARMAP_DEPRECATED_FOR(f) 30 | #else 31 | #define GUCHARMAP_DEPRECATED G_DEPRECATED 32 | #define GUCHARMAP_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) 33 | #endif 34 | 35 | #include 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #include 46 | #include 47 | 48 | #include 49 | 50 | #include 51 | 52 | #undef GUCHARMAP_DEPRECATED 53 | #undef GUCHARMAP_DEPRECATED_FOR 54 | #undef __GUCHARMAP_GUCHARMAP_H_INSIDE__ 55 | 56 | #endif /* #ifndef GUCHARMAP_H */ 57 | -------------------------------------------------------------------------------- /gucharmap/gucharmap.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gucharmap 7 | Description: GTK+ Unicode Character Map 8 | Version: @VERSION@ 9 | Requires: gtk+-@GTK_API_VERSION@ glib-2.0 10 | Requires.private: gio-2.0 11 | Libs: -L${libdir} -lgucharmap@GUCHARMAP_LIBRARY_SUFFIX_U@ 12 | Cflags: -I${includedir}/gucharmap-@GUCHARMAP_API_VERSION@ 13 | -------------------------------------------------------------------------------- /gucharmap/meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | src_inc = include_directories('.') 17 | 18 | disable_deprecated_cppflags = [ 19 | '-DATK_DISABLE_DEPRECATION_WARNINGS', 20 | '-DGDK_DISABLE_DEPRECATION_WARNINGS', 21 | '-DGDK_PIXBUF_DISABLE_DEPRECATION_WARNINGS', 22 | '-DGLIB_DISABLE_DEPRECATION_WARNINGS', 23 | '-DGTK_DISABLE_DEPRECATION_WARNINGS', 24 | '-DPANGO_DISABLE_DEPRECATION_WARNINGS', 25 | ] 26 | 27 | # Library 28 | 29 | libgucharmap_gtk3_includedir = gucharmap_includedir / libgucharmap_gtk3_api_path 30 | 31 | version_conf = { 32 | 'GUCHARMAP_VERSION_MAJOR': gucharmap_major_version.to_string(), 33 | 'GUCHARMAP_VERSION_MINOR': gucharmap_minor_version.to_string(), 34 | 'GUCHARMAP_VERSION_MICRO': gucharmap_micro_version.to_string(), 35 | } 36 | 37 | libgucharmap_version_header = configure_file( 38 | configuration: version_conf, 39 | input: 'gucharmap-version.h.in', 40 | install: false, 41 | output: '@BASENAME@', 42 | ) 43 | 44 | libgucharmap_enum_headers = files( 45 | 'gucharmap-chapters-model.h', 46 | 'gucharmap-charmap.h', 47 | 'gucharmap-unicode-info.h', 48 | ) 49 | 50 | libgucharmap_public_headers = libgucharmap_enum_headers + [libgucharmap_version_header,] + files( 51 | 'gucharmap-block-chapters-model.h', 52 | 'gucharmap-block-codepoint-list.h', 53 | 'gucharmap-chapters-view.h', 54 | 'gucharmap-chartable.h', 55 | 'gucharmap-codepoint-list.h', 56 | 'gucharmap-macros.h', 57 | 'gucharmap-script-chapters-model.h', 58 | 'gucharmap-script-codepoint-list.h', 59 | 'gucharmap.h', 60 | ) 61 | 62 | install_headers( 63 | libgucharmap_public_headers, 64 | subdir: libgucharmap_gtk3_api_path, 65 | ) 66 | 67 | libgucharmap_enum_sources = gnome.mkenums( 68 | 'gucharmap-type-builtins.h', 69 | c_template: 'gucharmap-type-builtins.c.template', 70 | h_template: 'gucharmap-type-builtins.h.template', 71 | install_dir: libgucharmap_gtk3_includedir, 72 | install_header: true, 73 | sources: libgucharmap_enum_headers, 74 | ) 75 | 76 | # Due to a meson bug, this header cannot be installed with the rule above. Instead, 77 | # use the install_header attribute in the mkenums call, and add the header afterwards 78 | # to the list. See https://gitlab.gnome.org/chpe/meson/issues/4 79 | libgucharmap_public_headers += libgucharmap_enum_sources[1] 80 | 81 | libgucharmap_sources = libgucharmap_enum_sources + files( 82 | 'gucharmap-block-chapters-model.c', 83 | 'gucharmap-block-chapters-model.h', 84 | 'gucharmap-block-codepoint-list.c', 85 | 'gucharmap-block-codepoint-list.h', 86 | 'gucharmap-chapters-model.c', 87 | 'gucharmap-chapters-model.h', 88 | 'gucharmap-chapters-view.c', 89 | 'gucharmap-chapters-view.h', 90 | 'gucharmap-charmap.c', 91 | 'gucharmap-charmap.h', 92 | 'gucharmap-chartable-accessible.c', 93 | 'gucharmap-chartable-accessible.h', 94 | 'gucharmap-chartable-cell-accessible.c', 95 | 'gucharmap-chartable-cell-accessible.h', 96 | 'gucharmap-chartable.c', 97 | 'gucharmap-chartable.h', 98 | 'gucharmap-codepoint-list.c', 99 | 'gucharmap-codepoint-list.h', 100 | 'gucharmap-init.c', 101 | 'gucharmap-private.h', 102 | 'gucharmap-script-chapters-model.c', 103 | 'gucharmap-script-chapters-model.h', 104 | 'gucharmap-script-codepoint-list.c', 105 | 'gucharmap-script-codepoint-list.h', 106 | 'gucharmap-unicode-info.c', 107 | 'gucharmap-unicode-info.h', 108 | ) 109 | 110 | libgucharmap_sources += gnome.genmarshal( 111 | 'gucharmap-marshal', 112 | internal: true, 113 | prefix: '_gucharmap_marshal', 114 | sources: 'gucharmap-marshal.list', 115 | ) 116 | 117 | ucd_path = get_option('ucd_path') 118 | assert(ucd_path != '', 'must specify path to UCD files') 119 | 120 | # Meson bug! This should use files('...') (allowed as per docs), but that 121 | # crashes meson; see https://gitlab.gnome.org/chpe/meson/issues/2 122 | generate_unicode_data = find_program('gen-guch-unicode-tables.pl') 123 | 124 | unicode_sources = custom_target( 125 | 'unicode-data', 126 | command: [generate_unicode_data, unicode_req_version, ucd_path, '@OUTDIR@'], 127 | install: false, 128 | output: [ 129 | 'unicode-blocks.h', 130 | 'unicode-categories.h', 131 | 'unicode-names.h', 132 | 'unicode-nameslist.h', 133 | 'unicode-scripts.h', 134 | 'unicode-unihan.h', 135 | 'unicode-versions.h', 136 | ], 137 | ) 138 | 139 | libgucharmap_gtk3_public_deps = [ 140 | gio_dep, 141 | glib_dep, 142 | gtk3_dep, 143 | pcre2_dep, 144 | ] 145 | 146 | libgucharmap_gtk3_deps = libgucharmap_gtk3_public_deps 147 | 148 | libgucharmap_gtk3_cppflags = disable_deprecated_cppflags + [ 149 | '-DGUCHARMAP_COMPILATION', 150 | '-DG_LOG_DOMAIN="Gucharmap"', 151 | '-DLOCALEDIR="@0@"'.format(gucharmap_prefix / gucharmap_localedir), 152 | ] 153 | 154 | libgucharmap_gtk3_sources = libgucharmap_sources 155 | libgucharmap_gtk3_public_headers = libgucharmap_public_headers 156 | 157 | # for legacy reasons 158 | libgucharmap_gtk3_libname = 'gucharmap_@0@_@1@'.format(gucharmap_api_major_version, gucharmap_api_minor_version) 159 | 160 | libgucharmap_gtk3 = shared_library( 161 | libgucharmap_gtk3_libname, 162 | c_args: libgucharmap_gtk3_cppflags, 163 | dependencies: libgucharmap_gtk3_deps, 164 | include_directories: [top_inc, src_inc,], 165 | install: true, 166 | sources: libgucharmap_gtk3_sources + [unicode_sources,], 167 | version: libgucharmap_gtk3_soversion, 168 | ) 169 | 170 | libgucharmap_gtk3_dep = declare_dependency( 171 | dependencies: libgucharmap_gtk3_deps, 172 | include_directories: [top_inc, src_inc,], 173 | link_with: libgucharmap_gtk3, 174 | sources: libgucharmap_gtk3_public_headers, 175 | ) 176 | 177 | # pkg-config file 178 | 179 | pkg.generate( 180 | libgucharmap_gtk3, 181 | description: 'Gucharmap widget for GTK+ 3.0', 182 | filebase: libgucharmap_gtk3_api_name, 183 | name: 'gucharmap', 184 | requires: libgucharmap_gtk3_public_deps, 185 | subdirs: libgucharmap_gtk3_api_name, 186 | version: gucharmap_version, 187 | variables: [ 188 | 'exec_prefix=${prefix}', 189 | ], 190 | ) 191 | 192 | # Introspection 193 | 194 | if get_option('gir') 195 | libgucharmap_gtk3_gir_includes = [ 196 | 'Gtk-3.0', 197 | 'Pango-1.0' 198 | ] 199 | 200 | libgucharmap_gtk3_gir = gnome.generate_gir( 201 | libgucharmap_gtk3, 202 | dependencies: libgucharmap_gtk3_dep, 203 | export_packages: libgucharmap_gtk3_api_name, 204 | extra_args: '-DGUCHARMAP_COMPILATION', 205 | header: 'gucharmap' / 'gucharmap.h', 206 | includes: libgucharmap_gtk3_gir_includes, 207 | install: true, 208 | namespace: 'Gucharmap', 209 | nsversion: libgucharmap_gtk3_api_version, 210 | sources: libgucharmap_gtk3_public_headers, 211 | ) 212 | endif 213 | 214 | # Vala bindings 215 | 216 | if get_option('vapi') 217 | assert(get_option('gir'), 'gir is required for vala support') 218 | assert(get_option('gtk3'), 'vala support only available for gtk3') 219 | 220 | add_languages('vala', required: true,) 221 | 222 | valac = meson.get_compiler('vala') 223 | assert(valac.version().version_compare('>= 0.16'), 'vala >= 0.16 required') 224 | 225 | libgucharmap_gtk3_vapi_deps = [ 226 | 'gio-2.0', 227 | 'glib-2.0', 228 | 'gtk+-3.0', 229 | 'pango', 230 | ] 231 | 232 | libgucharmap_gtk3_vapi = gnome.generate_vapi( 233 | libgucharmap_gtk3_api_name, 234 | install: true, 235 | packages: libgucharmap_gtk3_vapi_deps, 236 | sources: libgucharmap_gtk3_gir[0], 237 | ) 238 | endif 239 | 240 | # Charmap application 241 | 242 | gucharmap_sources = files( 243 | 'gucharmap-mini-fontsel.c', 244 | 'gucharmap-mini-fontsel.h', 245 | 'gucharmap-print-operation.c', 246 | 'gucharmap-print-operation.h', 247 | 'gucharmap-search-dialog.c', 248 | 'gucharmap-search-dialog.h', 249 | 'gucharmap-settings.c', 250 | 'gucharmap-settings.h', 251 | 'gucharmap-window.c', 252 | 'gucharmap-window.h', 253 | 'main.c', 254 | ) 255 | 256 | gucharmap_gtk3_sources = gucharmap_sources 257 | 258 | gucharmap_gtk3_sources += gnome.compile_resources( 259 | 'gucharmap-resources', 260 | 'gucharmap.gresource.xml', 261 | c_name: 'gucharmap', 262 | ) 263 | 264 | gucharmap_gtk3_cppflags = disable_deprecated_cppflags + [ 265 | '-DLOCALEDIR="@0@"'.format(gucharmap_prefix / gucharmap_localedir), 266 | ] 267 | 268 | gucharmap_gtk3_deps = [ 269 | freetype2_dep, 270 | gtk3_dep, 271 | libdl_dep, 272 | libgucharmap_gtk3_dep, 273 | ] 274 | 275 | gucharmap = executable( 276 | 'gucharmap', 277 | gucharmap_gtk3_sources, 278 | c_args: gucharmap_gtk3_cppflags, 279 | dependencies: gucharmap_gtk3_deps, 280 | include_directories: [top_inc, src_inc,], 281 | install: get_option('charmap'), 282 | ) 283 | 284 | # Install settings schemas 285 | 286 | schemadir = gucharmap_prefix / gucharmap_datadir / 'glib-2.0' / 'schemas' 287 | 288 | install_data( 289 | 'org.gnome.Charmap.gschema.xml', 290 | install_dir: schemadir, 291 | ) 292 | 293 | gnome.post_install( 294 | glib_compile_schemas: true, 295 | ) 296 | -------------------------------------------------------------------------------- /gucharmap/org.gnome.Charmap.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Character map grouping method 33 | 34 | This is how the characters in the character map are grouped. 35 | The characters can either be grouped by 'script' or 'block'. 36 | 37 | 'script' 38 | 39 | 40 | 41 | Character map font description 42 | 43 | The font to use for the character map. If set to 'nothing' then 44 | the default is the system font with the size doubled. Otherwise 45 | it should be a font description string like 'Sans 24'. 46 | 47 | nothing 48 | 49 | 50 | 51 | Snap number of columns to a power of two 52 | 53 | The number of columns in the character map grid is determined by 54 | the width of the window. If this setting is 'true' then the 55 | value will be forced to the nearest power of two. 56 | 57 | false 58 | 59 | 60 | 61 | 62 | Last selected character 63 | 64 | This is the last character that was selected in the character 65 | map (and will be selected again when the character map is next 66 | started). 67 | 68 | By default, it is the first letter of the alphabet in the current 69 | locale. 70 | 71 | 72 | 0x41 73 | 74 | 75 | 76 | 77 | 78 | false 79 | 80 | 81 | 82 | false 83 | 84 | 85 | 86 | (-1, -1) 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /gucharmap/unicode-i18n.h: -------------------------------------------------------------------------------- 1 | unicode-i18n.h for extraction by gettext 2 | THIS IS A GENERATED FILE. CHANGES WILL BE OVERWRITTEN. 3 | Generated by ./gen-guch-unicode-tables.pl 4 | Generated from UCD version 16.0.0 5 | 6 | N_("Adlam") 7 | N_("Aegean Numbers") 8 | N_("Ahom") 9 | N_("Alchemical Symbols") 10 | N_("Alphabetic Presentation Forms") 11 | N_("Anatolian Hieroglyphs") 12 | N_("Ancient Greek Musical Notation") 13 | N_("Ancient Greek Numbers") 14 | N_("Ancient Symbols") 15 | N_("Arabic") 16 | N_("Arabic Extended-A") 17 | N_("Arabic Extended-B") 18 | N_("Arabic Extended-C") 19 | N_("Arabic Mathematical Alphabetic Symbols") 20 | N_("Arabic Presentation Forms-A") 21 | N_("Arabic Presentation Forms-B") 22 | N_("Arabic Supplement") 23 | N_("Armenian") 24 | N_("Arrows") 25 | N_("Avestan") 26 | N_("Balinese") 27 | N_("Bamum") 28 | N_("Bamum Supplement") 29 | N_("Basic Latin") 30 | N_("Bassa Vah") 31 | N_("Batak") 32 | N_("Bengali") 33 | N_("Bhaiksuki") 34 | N_("Block Elements") 35 | N_("Bopomofo") 36 | N_("Bopomofo Extended") 37 | N_("Box Drawing") 38 | N_("Brahmi") 39 | N_("Braille Patterns") 40 | N_("Buginese") 41 | N_("Buhid") 42 | N_("Byzantine Musical Symbols") 43 | N_("CJK Compatibility") 44 | N_("CJK Compatibility Forms") 45 | N_("CJK Compatibility Ideographs") 46 | N_("CJK Compatibility Ideographs Supplement") 47 | N_("CJK Radicals Supplement") 48 | N_("CJK Strokes") 49 | N_("CJK Symbols and Punctuation") 50 | N_("CJK Unified Ideographs") 51 | N_("CJK Unified Ideographs Extension A") 52 | N_("CJK Unified Ideographs Extension B") 53 | N_("CJK Unified Ideographs Extension C") 54 | N_("CJK Unified Ideographs Extension D") 55 | N_("CJK Unified Ideographs Extension E") 56 | N_("CJK Unified Ideographs Extension F") 57 | N_("CJK Unified Ideographs Extension G") 58 | N_("CJK Unified Ideographs Extension H") 59 | N_("CJK Unified Ideographs Extension I") 60 | N_("Carian") 61 | N_("Caucasian Albanian") 62 | N_("Chakma") 63 | N_("Cham") 64 | N_("Cherokee") 65 | N_("Cherokee Supplement") 66 | N_("Chess Symbols") 67 | N_("Chorasmian") 68 | N_("Combining Diacritical Marks") 69 | N_("Combining Diacritical Marks Extended") 70 | N_("Combining Diacritical Marks Supplement") 71 | N_("Combining Diacritical Marks for Symbols") 72 | N_("Combining Half Marks") 73 | N_("Common Indic Number Forms") 74 | N_("Control Pictures") 75 | N_("Coptic") 76 | N_("Coptic Epact Numbers") 77 | N_("Counting Rod Numerals") 78 | N_("Cuneiform") 79 | N_("Cuneiform Numbers and Punctuation") 80 | N_("Currency Symbols") 81 | N_("Cypriot Syllabary") 82 | N_("Cypro-Minoan") 83 | N_("Cyrillic") 84 | N_("Cyrillic Extended-A") 85 | N_("Cyrillic Extended-B") 86 | N_("Cyrillic Extended-C") 87 | N_("Cyrillic Extended-D") 88 | N_("Cyrillic Supplement") 89 | N_("Deseret") 90 | N_("Devanagari") 91 | N_("Devanagari Extended") 92 | N_("Devanagari Extended-A") 93 | N_("Dingbats") 94 | N_("Dives Akuru") 95 | N_("Dogra") 96 | N_("Domino Tiles") 97 | N_("Duployan") 98 | N_("Early Dynastic Cuneiform") 99 | N_("Egyptian Hieroglyph Format Controls") 100 | N_("Egyptian Hieroglyphs") 101 | N_("Egyptian Hieroglyphs Extended-A") 102 | N_("Elbasan") 103 | N_("Elymaic") 104 | N_("Emoticons") 105 | N_("Enclosed Alphanumeric Supplement") 106 | N_("Enclosed Alphanumerics") 107 | N_("Enclosed CJK Letters and Months") 108 | N_("Enclosed Ideographic Supplement") 109 | N_("Ethiopic") 110 | N_("Ethiopic Extended") 111 | N_("Ethiopic Extended-A") 112 | N_("Ethiopic Extended-B") 113 | N_("Ethiopic Supplement") 114 | N_("Garay") 115 | N_("General Punctuation") 116 | N_("Geometric Shapes") 117 | N_("Geometric Shapes Extended") 118 | N_("Georgian") 119 | N_("Georgian Extended") 120 | N_("Georgian Supplement") 121 | N_("Glagolitic") 122 | N_("Glagolitic Supplement") 123 | N_("Gothic") 124 | N_("Grantha") 125 | N_("Greek Extended") 126 | N_("Greek and Coptic") 127 | N_("Gujarati") 128 | N_("Gunjala Gondi") 129 | N_("Gurmukhi") 130 | N_("Gurung Khema") 131 | N_("Halfwidth and Fullwidth Forms") 132 | N_("Hangul Compatibility Jamo") 133 | N_("Hangul Jamo") 134 | N_("Hangul Jamo Extended-A") 135 | N_("Hangul Jamo Extended-B") 136 | N_("Hangul Syllables") 137 | N_("Hanifi Rohingya") 138 | N_("Hanunoo") 139 | N_("Hatran") 140 | N_("Hebrew") 141 | N_("High Private Use Surrogates") 142 | N_("High Surrogates") 143 | N_("Hiragana") 144 | N_("IPA Extensions") 145 | N_("Ideographic Description Characters") 146 | N_("Ideographic Symbols and Punctuation") 147 | N_("Imperial Aramaic") 148 | N_("Indic Siyaq Numbers") 149 | N_("Inscriptional Pahlavi") 150 | N_("Inscriptional Parthian") 151 | N_("Javanese") 152 | N_("Kaithi") 153 | N_("Kaktovik Numerals") 154 | N_("Kana Extended-A") 155 | N_("Kana Extended-B") 156 | N_("Kana Supplement") 157 | N_("Kanbun") 158 | N_("Kangxi Radicals") 159 | N_("Kannada") 160 | N_("Katakana") 161 | N_("Katakana Phonetic Extensions") 162 | N_("Kawi") 163 | N_("Kayah Li") 164 | N_("Kharoshthi") 165 | N_("Khitan Small Script") 166 | N_("Khmer") 167 | N_("Khmer Symbols") 168 | N_("Khojki") 169 | N_("Khudawadi") 170 | N_("Kirat Rai") 171 | N_("Lao") 172 | N_("Latin Extended Additional") 173 | N_("Latin Extended-A") 174 | N_("Latin Extended-B") 175 | N_("Latin Extended-C") 176 | N_("Latin Extended-D") 177 | N_("Latin Extended-E") 178 | N_("Latin Extended-F") 179 | N_("Latin Extended-G") 180 | N_("Latin-1 Supplement") 181 | N_("Lepcha") 182 | N_("Letterlike Symbols") 183 | N_("Limbu") 184 | N_("Linear A") 185 | N_("Linear B Ideograms") 186 | N_("Linear B Syllabary") 187 | N_("Lisu") 188 | N_("Lisu Supplement") 189 | N_("Low Surrogates") 190 | N_("Lycian") 191 | N_("Lydian") 192 | N_("Mahajani") 193 | N_("Mahjong Tiles") 194 | N_("Makasar") 195 | N_("Malayalam") 196 | N_("Mandaic") 197 | N_("Manichaean") 198 | N_("Marchen") 199 | N_("Masaram Gondi") 200 | N_("Mathematical Alphanumeric Symbols") 201 | N_("Mathematical Operators") 202 | N_("Mayan Numerals") 203 | N_("Medefaidrin") 204 | N_("Meetei Mayek") 205 | N_("Meetei Mayek Extensions") 206 | N_("Mende Kikakui") 207 | N_("Meroitic Cursive") 208 | N_("Meroitic Hieroglyphs") 209 | N_("Miao") 210 | N_("Miscellaneous Mathematical Symbols-A") 211 | N_("Miscellaneous Mathematical Symbols-B") 212 | N_("Miscellaneous Symbols") 213 | N_("Miscellaneous Symbols and Arrows") 214 | N_("Miscellaneous Symbols and Pictographs") 215 | N_("Miscellaneous Technical") 216 | N_("Modi") 217 | N_("Modifier Tone Letters") 218 | N_("Mongolian") 219 | N_("Mongolian Supplement") 220 | N_("Mro") 221 | N_("Multani") 222 | N_("Musical Symbols") 223 | N_("Myanmar") 224 | N_("Myanmar Extended-A") 225 | N_("Myanmar Extended-B") 226 | N_("Myanmar Extended-C") 227 | N_("N'Ko") 228 | N_("Nabataean") 229 | N_("Nag Mundari") 230 | N_("Nandinagari") 231 | N_("New Tai Lue") 232 | N_("Newa") 233 | N_("Number Forms") 234 | N_("Nushu") 235 | N_("Nyiakeng Puachue Hmong") 236 | N_("Ogham") 237 | N_("Ol Chiki") 238 | N_("Ol Onal") 239 | N_("Old Hungarian") 240 | N_("Old Italic") 241 | N_("Old North Arabian") 242 | N_("Old Permic") 243 | N_("Old Persian") 244 | N_("Old Sogdian") 245 | N_("Old South Arabian") 246 | N_("Old Turkic") 247 | N_("Old Uyghur") 248 | N_("Optical Character Recognition") 249 | N_("Oriya") 250 | N_("Ornamental Dingbats") 251 | N_("Osage") 252 | N_("Osmanya") 253 | N_("Ottoman Siyaq Numbers") 254 | N_("Pahawh Hmong") 255 | N_("Palmyrene") 256 | N_("Pau Cin Hau") 257 | N_("Phags-pa") 258 | N_("Phaistos Disc") 259 | N_("Phoenician") 260 | N_("Phonetic Extensions") 261 | N_("Phonetic Extensions Supplement") 262 | N_("Playing Cards") 263 | N_("Private Use Area") 264 | N_("Psalter Pahlavi") 265 | N_("Rejang") 266 | N_("Rumi Numeral Symbols") 267 | N_("Runic") 268 | N_("Samaritan") 269 | N_("Saurashtra") 270 | N_("Sharada") 271 | N_("Shavian") 272 | N_("Shorthand Format Controls") 273 | N_("Siddham") 274 | N_("Sinhala") 275 | N_("Sinhala Archaic Numbers") 276 | N_("Small Form Variants") 277 | N_("Small Kana Extension") 278 | N_("Sogdian") 279 | N_("Sora Sompeng") 280 | N_("Soyombo") 281 | N_("Spacing Modifier Letters") 282 | N_("Specials") 283 | N_("Sundanese") 284 | N_("Sundanese Supplement") 285 | N_("Sunuwar") 286 | N_("Superscripts and Subscripts") 287 | N_("Supplemental Arrows-A") 288 | N_("Supplemental Arrows-B") 289 | N_("Supplemental Arrows-C") 290 | N_("Supplemental Mathematical Operators") 291 | N_("Supplemental Punctuation") 292 | N_("Supplemental Symbols and Pictographs") 293 | N_("Supplementary Private Use Area-A") 294 | N_("Supplementary Private Use Area-B") 295 | N_("Sutton SignWriting") 296 | N_("Syloti Nagri") 297 | N_("Symbols and Pictographs Extended-A") 298 | N_("Symbols for Legacy Computing") 299 | N_("Symbols for Legacy Computing Supplement") 300 | N_("Syriac") 301 | N_("Syriac Supplement") 302 | N_("Tagalog") 303 | N_("Tagbanwa") 304 | N_("Tags") 305 | N_("Tai Le") 306 | N_("Tai Tham") 307 | N_("Tai Viet") 308 | N_("Tai Xuan Jing Symbols") 309 | N_("Takri") 310 | N_("Tamil") 311 | N_("Tamil Supplement") 312 | N_("Tangsa") 313 | N_("Tangut") 314 | N_("Tangut Components") 315 | N_("Tangut Supplement") 316 | N_("Telugu") 317 | N_("Thaana") 318 | N_("Thai") 319 | N_("Tibetan") 320 | N_("Tifinagh") 321 | N_("Tirhuta") 322 | N_("Todhri") 323 | N_("Toto") 324 | N_("Transport and Map Symbols") 325 | N_("Tulu-Tigalari") 326 | N_("Ugaritic") 327 | N_("Unified Canadian Aboriginal Syllabics") 328 | N_("Unified Canadian Aboriginal Syllabics Extended") 329 | N_("Unified Canadian Aboriginal Syllabics Extended-A") 330 | N_("Vai") 331 | N_("Variation Selectors") 332 | N_("Variation Selectors Supplement") 333 | N_("Vedic Extensions") 334 | N_("Vertical Forms") 335 | N_("Vithkuqi") 336 | N_("Wancho") 337 | N_("Warang Citi") 338 | N_("Yezidi") 339 | N_("Yi Radicals") 340 | N_("Yi Syllables") 341 | N_("Yijing Hexagram Symbols") 342 | N_("Zanabazar Square") 343 | N_("Znamenny Musical Notation") 344 | 345 | N_("Adlam") 346 | N_("Ahom") 347 | N_("Anatolian Hieroglyphs") 348 | N_("Arabic") 349 | N_("Armenian") 350 | N_("Avestan") 351 | N_("Balinese") 352 | N_("Bamum") 353 | N_("Bassa Vah") 354 | N_("Batak") 355 | N_("Bengali") 356 | N_("Bhaiksuki") 357 | N_("Bopomofo") 358 | N_("Brahmi") 359 | N_("Braille") 360 | N_("Buginese") 361 | N_("Buhid") 362 | N_("Canadian Aboriginal") 363 | N_("Carian") 364 | N_("Caucasian Albanian") 365 | N_("Chakma") 366 | N_("Cham") 367 | N_("Cherokee") 368 | N_("Chorasmian") 369 | N_("Common") 370 | N_("Coptic") 371 | N_("Cuneiform") 372 | N_("Cypriot") 373 | N_("Cypro Minoan") 374 | N_("Cyrillic") 375 | N_("Deseret") 376 | N_("Devanagari") 377 | N_("Dives Akuru") 378 | N_("Dogra") 379 | N_("Duployan") 380 | N_("Egyptian Hieroglyphs") 381 | N_("Elbasan") 382 | N_("Elymaic") 383 | N_("Ethiopic") 384 | N_("Garay") 385 | N_("Georgian") 386 | N_("Glagolitic") 387 | N_("Gothic") 388 | N_("Grantha") 389 | N_("Greek") 390 | N_("Gujarati") 391 | N_("Gunjala Gondi") 392 | N_("Gurmukhi") 393 | N_("Gurung Khema") 394 | N_("Han") 395 | N_("Hangul") 396 | N_("Hanifi Rohingya") 397 | N_("Hanunoo") 398 | N_("Hatran") 399 | N_("Hebrew") 400 | N_("Hiragana") 401 | N_("Imperial Aramaic") 402 | N_("Inherited") 403 | N_("Inscriptional Pahlavi") 404 | N_("Inscriptional Parthian") 405 | N_("Javanese") 406 | N_("Kaithi") 407 | N_("Kannada") 408 | N_("Katakana") 409 | N_("Kawi") 410 | N_("Kayah Li") 411 | N_("Kharoshthi") 412 | N_("Khitan Small Script") 413 | N_("Khmer") 414 | N_("Khojki") 415 | N_("Khudawadi") 416 | N_("Kirat Rai") 417 | N_("Lao") 418 | N_("Latin") 419 | N_("Lepcha") 420 | N_("Limbu") 421 | N_("Linear A") 422 | N_("Linear B") 423 | N_("Lisu") 424 | N_("Lycian") 425 | N_("Lydian") 426 | N_("Mahajani") 427 | N_("Makasar") 428 | N_("Malayalam") 429 | N_("Mandaic") 430 | N_("Manichaean") 431 | N_("Marchen") 432 | N_("Masaram Gondi") 433 | N_("Medefaidrin") 434 | N_("Meetei Mayek") 435 | N_("Mende Kikakui") 436 | N_("Meroitic Cursive") 437 | N_("Meroitic Hieroglyphs") 438 | N_("Miao") 439 | N_("Modi") 440 | N_("Mongolian") 441 | N_("Mro") 442 | N_("Multani") 443 | N_("Myanmar") 444 | N_("N'Ko") 445 | N_("Nabataean") 446 | N_("Nag Mundari") 447 | N_("Nandinagari") 448 | N_("New Tai Lue") 449 | N_("Newa") 450 | N_("Nushu") 451 | N_("Nyiakeng Puachue Hmong") 452 | N_("Ogham") 453 | N_("Ol Chiki") 454 | N_("Ol Onal") 455 | N_("Old Hungarian") 456 | N_("Old Italic") 457 | N_("Old North Arabian") 458 | N_("Old Permic") 459 | N_("Old Persian") 460 | N_("Old Sogdian") 461 | N_("Old South Arabian") 462 | N_("Old Turkic") 463 | N_("Old Uyghur") 464 | N_("Oriya") 465 | N_("Osage") 466 | N_("Osmanya") 467 | N_("Pahawh Hmong") 468 | N_("Palmyrene") 469 | N_("Pau Cin Hau") 470 | N_("Phags Pa") 471 | N_("Phoenician") 472 | N_("Psalter Pahlavi") 473 | N_("Rejang") 474 | N_("Runic") 475 | N_("Samaritan") 476 | N_("Saurashtra") 477 | N_("Sharada") 478 | N_("Shavian") 479 | N_("Siddham") 480 | N_("Signwriting") 481 | N_("Sinhala") 482 | N_("Sogdian") 483 | N_("Sora Sompeng") 484 | N_("Soyombo") 485 | N_("Sundanese") 486 | N_("Sunuwar") 487 | N_("Syloti Nagri") 488 | N_("Syriac") 489 | N_("Tagalog") 490 | N_("Tagbanwa") 491 | N_("Tai Le") 492 | N_("Tai Tham") 493 | N_("Tai Viet") 494 | N_("Takri") 495 | N_("Tamil") 496 | N_("Tangsa") 497 | N_("Tangut") 498 | N_("Telugu") 499 | N_("Thaana") 500 | N_("Thai") 501 | N_("Tibetan") 502 | N_("Tifinagh") 503 | N_("Tirhuta") 504 | N_("Todhri") 505 | N_("Toto") 506 | N_("Tulu Tigalari") 507 | N_("Ugaritic") 508 | N_("Unknown") 509 | N_("Vai") 510 | N_("Vithkuqi") 511 | N_("Wancho") 512 | N_("Warang Citi") 513 | N_("Yezidi") 514 | N_("Yi") 515 | N_("Zanabazar Square") 516 | -------------------------------------------------------------------------------- /help/C/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/C/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/C/l10n.txt: -------------------------------------------------------------------------------- 1 | Unicode Character Map Manual V2.1 2 | 3 | ------------------------ 4 | SUMMARY OF CHANGES 5 | ------------------------ 6 | 7 | Created by: Breda McColgan 8 | Date: 30 January 2004 9 | Manual version: 2.1 10 | 11 | ------------------------ 12 | SCREENSHOT INSTRUCTIONS 13 | ------------------------ 14 | 15 | gucharmap_window.png 16 | 17 | 1. Start Character Map (Applications -> Accessories -> Character Map). 18 | 2. Ensure that the window has focus. Click on the window to give it focus. 19 | 3. Take a screenshot of the window. 20 | 4. Save the file in PNG format. 21 | -------------------------------------------------------------------------------- /help/C/legal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Permission is granted to copy, distribute and/or modify this 4 | document under the terms of the GNU Free Documentation 5 | License (GFDL), Version 1.1 or any later version published 6 | by the Free Software Foundation with no Invariant Sections, 7 | no Front-Cover Texts, and no Back-Cover Texts. You can find 8 | a copy of the GFDL at this link or in the file COPYING-DOCS 10 | distributed with this manual. 11 | 12 | This manual is part of a collection of GNOME manuals 13 | distributed under the GFDL. If you want to distribute this 14 | manual separately from the collection, you can do so by 15 | adding a copy of the license to the manual, as described in 16 | section 6 of the license. 17 | 18 | 19 | 20 | Many of the names used by companies to distinguish their 21 | products and services are claimed as trademarks. Where those 22 | names appear in any GNOME documentation, and the members of 23 | the GNOME Documentation Project are made aware of those 24 | trademarks, then the names are in capital letters or initial 25 | capital letters. 26 | 27 | 28 | 29 | DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED 30 | UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE 31 | WITH THE FURTHER UNDERSTANDING THAT: 32 | 33 | 34 | 35 | DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, 36 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR 37 | IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES 38 | THAT THE DOCUMENT OR MODIFIED VERSION OF THE 39 | DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR 40 | A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE 41 | RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE 42 | OF THE DOCUMENT OR MODIFIED VERSION OF THE 43 | DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR 44 | MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, 45 | YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY 46 | CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY 47 | SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER 48 | OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS 49 | LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED 50 | VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER 51 | EXCEPT UNDER THIS DISCLAIMER; AND 52 | 53 | 54 | 55 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL 56 | THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), 57 | CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, 58 | INITIAL WRITER, ANY CONTRIBUTOR, OR ANY 59 | DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION 60 | OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH 61 | PARTIES, BE LIABLE TO ANY PERSON FOR ANY 62 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 63 | CONSEQUENTIAL DAMAGES OF ANY CHARACTER 64 | INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS 65 | OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR 66 | MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR 67 | LOSSES ARISING OUT OF OR RELATING TO USE OF THE 68 | DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, 69 | EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF 70 | THE POSSIBILITY OF SUCH DAMAGES. 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /help/LINGUAS: -------------------------------------------------------------------------------- 1 | bg 2 | ca 3 | cs 4 | de 5 | el 6 | en_GB 7 | es 8 | fi 9 | fr 10 | gl 11 | hu 12 | id 13 | ko 14 | oc 15 | pl 16 | pt_BR 17 | ru 18 | sl 19 | sv 20 | uk 21 | vi 22 | zh_CN 23 | -------------------------------------------------------------------------------- /help/bg/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/bg/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/ca/figues/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/ca/figues/gucharmap_window.png -------------------------------------------------------------------------------- /help/cs/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/cs/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/de/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/de/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/el/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/el/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/es/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/es/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/fi/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/fi/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/fr/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/fr/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/hu/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/hu/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/ko/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/ko/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | gnome.yelp( 17 | 'gucharmap', 18 | media: [ 19 | 'figures/gucharmap_window.png', 20 | ], 21 | sources: [ 22 | 'index.docbook', 23 | 'legal.xml', 24 | ], 25 | ) 26 | -------------------------------------------------------------------------------- /help/pl/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/pl/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/pt_BR/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/pt_BR/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/sv/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/sv/figures/gucharmap_window.png -------------------------------------------------------------------------------- /help/zh_CN/figures/gucharmap_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/gucharmap/c6ace99d834389528411af3a1f84b796df0889a1/help/zh_CN/figures/gucharmap_window.png -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | project( 17 | 'gucharmap', 18 | ['c',], 19 | default_options: [ 20 | 'buildtype=release', 21 | 'c_std=gnu11', 22 | 'warning_level=0', 23 | 'b_ndebug=false', 24 | ], 25 | license: ['GPL-3.0-or-later',], 26 | meson_version: '>= 0.62.0', 27 | version: '16.0.3', 28 | ) 29 | 30 | # Naming 31 | 32 | gucharmap_name = 'gucharmap' 33 | 34 | # Requirements 35 | 36 | freetype2_req_version = '1.0' 37 | gio_req_version = '2.32.0' 38 | glib_req_version = '2.32.0' 39 | gtk3_req_version = '3.4.0' 40 | pcre2_req_version = '10.21' 41 | 42 | # NOTE! This is an exact requirement. Each gucharmap version (major.minor) is 43 | # designed to work with, and only with, this unicode version. Upgrading to 44 | # a newer unicode version does not simply mean bumping this requirement, but 45 | # also requires more or less (depending on the unicode version) extensive code 46 | # changes to gucharmap. Therefore, you should NOT upgrade the unicode version 47 | # of a released gucharmap, but upgrade to the gucharmap version corresponding 48 | # to the desired unicode version. 49 | unicode_req_version = '16.0.0' 50 | 51 | # API 52 | 53 | gucharmap_api_major_version = 2 54 | gucharmap_api_minor_version = 90 55 | 56 | libgucharmap_gtk3_api_version = '@0@.@1@'.format(gucharmap_api_major_version, gucharmap_api_minor_version) 57 | libgucharmap_gtk3_api_name = gucharmap_name + '-' + libgucharmap_gtk3_api_version 58 | libgucharmap_gtk3_api_path = libgucharmap_gtk3_api_name / 'gucharmap' 59 | 60 | # Versioning 61 | 62 | gucharmap_version = meson.project_version() 63 | 64 | version_split = meson.project_version().split('.') 65 | gucharmap_major_version = version_split[0].to_int() 66 | gucharmap_minor_version = version_split[1].to_int() 67 | gucharmap_micro_version = version_split[2].to_int() 68 | 69 | # Library versioning 70 | 71 | lt_current = 7 72 | lt_revision = 0 73 | lt_age = 0 74 | 75 | libgucharmap_gtk3_soversion = '@0@.@1@.@2@'.format(lt_current, lt_revision, lt_age) 76 | 77 | libgucharmap_gtk4_soversion = '0' 78 | 79 | # i18n 80 | 81 | gucharmap_gettext_domain = gucharmap_name 82 | 83 | # Directories 84 | 85 | gucharmap_datadir = get_option('datadir') 86 | gucharmap_includedir = get_option('includedir') 87 | gucharmap_libdir = get_option('libdir') 88 | gucharmap_libexecdir = get_option('libexecdir') 89 | gucharmap_localedir = get_option('localedir') 90 | gucharmap_prefix = get_option('prefix') 91 | 92 | gucharmap_pkgdatadir = gucharmap_datadir / gucharmap_name 93 | 94 | # Debug 95 | 96 | enable_debug = get_option('dbg') or get_option('debug') or get_option('buildtype').contains('debug') 97 | 98 | # Meson modules 99 | 100 | gnome = import('gnome') 101 | i18n = import('i18n') 102 | pkg = import('pkgconfig') 103 | 104 | # Compilers 105 | 106 | cc = meson.get_compiler('c') 107 | 108 | # Meson has a misfeature where it allows the user to override the -std option 109 | # for the C/C++ compiler. Disallow that. 110 | 111 | assert(get_option('c_std') == 'gnu11', 'cannot override C std version') 112 | 113 | # Asserts must not be disabled 114 | 115 | assert(get_option('b_ndebug') == 'false', 'assertions may not be disabled') 116 | 117 | # Start config.h 118 | 119 | config_h = configuration_data() 120 | 121 | config_h.set_quoted('GETTEXT_PACKAGE', gucharmap_gettext_domain) 122 | config_h.set_quoted('VERSION', gucharmap_version) 123 | config_h.set('ENABLE_DEBUG', enable_debug) 124 | 125 | # FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems 126 | config_h.set10('_GNU_SOURCE', true) 127 | 128 | # Check for functions 129 | 130 | libdl_dep = cc.find_library('dl') 131 | 132 | check_dl_functions_required = [ 133 | 'dlsym', 134 | ] 135 | 136 | foreach func: check_dl_functions_required 137 | assert(cc.has_function(func, dependencies: libdl_dep), func + ' not found') 138 | endforeach 139 | 140 | # Asserts must not be disabled 141 | 142 | assert(get_option('b_ndebug') == 'false', 'assertions may not be disabled') 143 | 144 | # LTO very much NOT supported 145 | 146 | assert(get_option('b_lto') == false, 'LTO not supported') 147 | 148 | # Compiler flags 149 | 150 | compiler_flags_common = [ 151 | '-Waggregate-return', 152 | '-Wall', 153 | '-Wcast-align', 154 | '-Werror=implicit-function-declaration', 155 | '-Wextra', 156 | '-Wformat-signedness', 157 | '-Wimplicit', 158 | '-Winit-self', 159 | '-Wmissing-declarations', 160 | '-Wmissing-format-attribute', 161 | '-Wmissing-prototypes', 162 | '-Wnested-externs', 163 | '-Wno-missing-field-initializers', 164 | '-Wno-cast-function-type', 165 | '-Wno-deprecated-declarations', 166 | '-Wno-switch-enum', 167 | '-Wno-unused-parameter', 168 | '-Wold-style-definition', 169 | '-Wpacked', 170 | '-Wpointer-arith', 171 | '-Wshadow', 172 | '-Wsign-compare', 173 | '-Wstrict-aliasing=2', 174 | '-Wstrict-prototypes', 175 | '-Wuninitialized', 176 | '-Wunsafe-loop-optimizations', 177 | '-Wwrite-strings', 178 | '-fno-common', 179 | ] 180 | 181 | if enable_debug 182 | compiler_flags_common += [ 183 | '-ggdb3', 184 | ] 185 | endif 186 | 187 | # These are currently needed but the code should be fixed instead 188 | compiler_flags_common_undesirable = [ 189 | '-fno-strict-aliasing' 190 | ] 191 | 192 | compiler_flags_cc_required = [ 193 | '-fvisibility=hidden', 194 | ] 195 | 196 | global_cflags = cc.get_supported_arguments(compiler_flags_common + 197 | compiler_flags_common_undesirable + 198 | compiler_flags_cc_required) 199 | 200 | foreach flag: compiler_flags_cc_required 201 | assert(cc.has_argument(flag), flag + ' is required but not supported') 202 | endforeach 203 | 204 | # These flags have to be tested together 205 | 206 | compiler_flags_common_multi = [ 207 | # FIXME: these flags break the gtkdoc-scangobj run 208 | ## These only work together with -Wformat 209 | #[ 210 | # '-Werror=format=2', 211 | # '-Werror=format-nonliteral', 212 | # '-Werror=format-security', 213 | #], 214 | ] 215 | 216 | foreach flags : compiler_flags_common_multi 217 | if cc.has_multi_arguments(flags) 218 | global_cflags += flags 219 | endif 220 | if cxx.has_multi_arguments(flags) 221 | global_cxxflags += flags 222 | endif 223 | endforeach 224 | 225 | # ... and now make these flags the default 226 | 227 | add_project_arguments(global_cflags, language: 'c',) 228 | 229 | # Linker flags 230 | 231 | linker_flags = [ 232 | '-Wl,-Bsymbolic-functions' 233 | ] 234 | 235 | foreach flag: linker_flags 236 | assert(cc.has_link_argument(flag), flag + ' is required but not supported') 237 | add_project_link_arguments(flag, language: 'c',) 238 | endforeach 239 | 240 | # Dependencies 241 | 242 | freetype2_dep = dependency('freetype2', version: '>=' + freetype2_req_version,) 243 | gio_dep = dependency('gio-2.0', version: '>=' + gio_req_version,) 244 | glib_dep = dependency('glib-2.0', version: '>=' + glib_req_version,) 245 | pcre2_dep = dependency('libpcre2-8', version: '>=' + pcre2_req_version) 246 | 247 | if get_option('gtk3') 248 | gtk3_dep = dependency('gtk+-3.0', version: '>=' + gtk3_req_version,) 249 | else 250 | gtk3_dep = dependency('', required: false,) 251 | endif 252 | 253 | # Write config.h 254 | 255 | configure_file( 256 | output: 'config.h', 257 | configuration: config_h, 258 | ) 259 | 260 | # Subdirs 261 | 262 | top_inc = include_directories('.') 263 | 264 | subdir('po') 265 | subdir('data') 266 | subdir('gucharmap') 267 | 268 | if get_option('docs') 269 | subdir('docs' / 'reference') 270 | endif 271 | 272 | if get_option('docs') and get_option('charmap') 273 | subdir('help') 274 | endif 275 | 276 | # Dist 277 | 278 | meson.add_dist_script( 279 | find_program('meson_changelog.sh'), 280 | ) 281 | 282 | # Simple compat Makefile 283 | 284 | makefile_conf = configuration_data() 285 | makefile_conf.set('srcdir', meson.current_source_dir()) 286 | makefile_conf.set('builddir', meson.current_build_dir()) 287 | 288 | configure_file( 289 | input: 'Makefile.meson', 290 | output: '@BASENAME@', 291 | configuration: makefile_conf, 292 | ) 293 | 294 | # .gitignore everything in the build directory 295 | 296 | configure_file( 297 | output: '.gitignore', 298 | command: ['echo', '**/**',], 299 | capture: true, 300 | install: false, 301 | ) 302 | 303 | # Summary 304 | 305 | output = '\n' 306 | output += 'Configuration for Gucharmap:\n\n' 307 | output += ' Version: ' + gucharmap_version + '\n' 308 | output += ' Unicode version: ' + unicode_req_version + '\n' 309 | output += '\n' 310 | output += ' C compiler: ' + cc.get_id() + '\n\n' 311 | output += ' Coverage: ' + get_option('b_coverage').to_string() + '\n' 312 | output += ' Charmap: ' + get_option('charmap').to_string() + '\n' 313 | output += ' Documentation: ' + get_option('docs').to_string() + '\n' 314 | output += ' Debug: ' + enable_debug.to_string() + '\n' 315 | output += ' GIR: ' + get_option('gir').to_string() + '\n' 316 | output += ' GTK+ 3.0: ' + get_option('gtk3').to_string() + '\n' 317 | output += ' Vala: ' + get_option('vapi').to_string() + '\n' 318 | output += '\n' 319 | output += ' Prefix: ' + get_option('prefix') + '\n' 320 | output += ' Desktop data dir: ' + desktopdatadir + '\n' 321 | output += ' Schemas dir: ' + schemadir + '\n' 322 | message(output) 323 | 324 | # Done 325 | -------------------------------------------------------------------------------- /meson_changelog.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright © 2021 Christian Persch 3 | # 4 | # This programme is free software; you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 3 of the License, or (at your 7 | # option) any later version. 8 | # 9 | # This programme is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # See the GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with this programme. If not, see . 16 | 17 | set -e 18 | 19 | top_srcdir="$MESON_SOURCE_ROOT" 20 | top_builddir="MESON_BUILD_ROOT" 21 | top_distdir="$MESON_DIST_ROOT" 22 | 23 | if ! test -e "${top_srcdir}"/.git; then 24 | echo "Must be run from gnome-terminal git checkout" 25 | exit 1 26 | fi 27 | 28 | if ! test -e "${top_distdir}"; then 29 | echo "Must be run from 'meson dist'" 30 | exit 1 31 | fi 32 | 33 | GIT_DIR="${top_srcdir}"/.git git log --stat > "${top_distdir}"/ChangeLog 34 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | option( 17 | 'charmap', 18 | type: 'boolean', 19 | value: true, 20 | description: 'Build the charmap programme', 21 | ) 22 | 23 | option( 24 | 'dbg', 25 | type: 'boolean', 26 | value: false, 27 | description: 'Enable extra debugging functionality', 28 | ) 29 | 30 | option( 31 | 'docs', 32 | type: 'boolean', 33 | value: true, 34 | description: 'Enable documentation', 35 | ) 36 | 37 | option( 38 | 'gir', 39 | type: 'boolean', 40 | value: true, 41 | description: 'Enable GObject Introspection', 42 | ) 43 | 44 | option( 45 | 'gtk3', 46 | type: 'boolean', 47 | value: true, 48 | description: 'Enable GTK+ 3.0 widget', 49 | ) 50 | 51 | option( 52 | 'ucd_path', 53 | type: 'string', 54 | value: '', 55 | description: 'Path to Unicode database files', 56 | ) 57 | 58 | option( 59 | 'vapi', # would use 'vala' but that name is reserved 60 | type: 'boolean', 61 | value: true, 62 | description: 'Enable Vala bindings', 63 | ) 64 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # please keep this list sorted alphabetically 2 | # 3 | af 4 | am 5 | ar 6 | as 7 | ast 8 | az 9 | be 10 | be@latin 11 | bg 12 | bn 13 | bn_IN 14 | br 15 | bs 16 | ca 17 | ca@valencia 18 | cs 19 | cy 20 | da 21 | de 22 | dz 23 | el 24 | en_CA 25 | en_GB 26 | en@shaw 27 | eo 28 | es 29 | et 30 | eu 31 | fa 32 | fi 33 | fr 34 | ga 35 | gl 36 | gu 37 | he 38 | hi 39 | hr 40 | hu 41 | id 42 | is 43 | it 44 | ja 45 | ka 46 | kk 47 | kn 48 | ko 49 | lt 50 | lv 51 | mai 52 | mi 53 | mk 54 | ml 55 | mn 56 | mr 57 | ms 58 | nb 59 | ne 60 | nl 61 | nn 62 | oc 63 | or 64 | pa 65 | pl 66 | pt 67 | pt_BR 68 | ro 69 | ru 70 | rw 71 | si 72 | sk 73 | sl 74 | sq 75 | sr 76 | sr@latin 77 | sv 78 | ta 79 | te 80 | tg 81 | th 82 | tr 83 | ug 84 | uk 85 | vi 86 | wa 87 | xh 88 | zh_CN 89 | zh_HK 90 | zh_TW 91 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | data/gucharmap.desktop.in.in 2 | data/gucharmap.metainfo.xml.in 3 | gucharmap/gucharmap-block-chapters-model.c 4 | gucharmap/gucharmap-charmap.c 5 | gucharmap/gucharmap-chartable-accessible.c 6 | gucharmap/gucharmap-chartable.c 7 | gucharmap/gucharmap-menus.ui 8 | gucharmap/gucharmap-mini-fontsel.c 9 | gucharmap/gucharmap-script-chapters-model.c 10 | gucharmap/gucharmap-script-codepoint-list.c 11 | gucharmap/gucharmap-search-dialog.c 12 | gucharmap/gucharmap-settings.c 13 | gucharmap/gucharmap-unicode-info.c 14 | gucharmap/gucharmap-window.c 15 | gucharmap/main.c 16 | gucharmap/org.gnome.Charmap.gschema.xml 17 | gucharmap/unicode-i18n.h 18 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | data/gucharmap.desktop.in 2 | 3 | -------------------------------------------------------------------------------- /po/README: -------------------------------------------------------------------------------- 1 | Dear translators, 2 | 3 | Clarification of certain strings contained herein. 4 | 5 | Noah 6 | 7 | 8 | Date: Mon, 28 Jul 2003 11:38:20 -0400 9 | From: Noah Levitt 10 | To: Telsa Gwynne 11 | Subject: Re: How to translate some of the gucharmap strings? 12 | 13 | Hey Telsa, 14 | 15 | These are good questions. I'm surprised other translators 16 | haven't brought these up before. The short answer is, most 17 | of these terms are technical Unicode terms. I'll try to put 18 | some comments in the source files based on these notes. 19 | 20 | On Mon, Jul 28, 2003 at 9:55:48 +0100, Telsa Gwynne wrote: 21 | > 22 | > gucharmap has a collection of strings which I suspect may cause 23 | > trouble. There are no notes for translators in the po file (which 24 | > some people do). Can I glean some explanations from you, before we 25 | > do Terrible Things? 26 | [...] 27 | > 28 | > These are the strings I don't understand. 29 | > 30 | > #: gucharmap/gucharmap-charmap.c:397 31 | > msgid "Canonical decomposition:" 32 | > msgstr "" 33 | > 34 | > (I have visions of this coming out as "Biblical falling-apart" or something 35 | > at the moment: is this "taking apart" sort of decomposition rather than 36 | > "it's falling apart by itself"?) 37 | 38 | It's more like "taking apart". There are characters that can 39 | be split up into base character + accent pairs, or sometimes 40 | even further. For example, č = c + ̌ , that is, 41 | LATIN LETTER SMALL C WITH CARON = LATIN LETTER SMALL C + COMBINING CARON 42 | 43 | > 44 | > #: gucharmap/gucharmap-unicode-info.c:157 45 | > msgid "" 46 | > msgstr "" 47 | > 48 | > #: gucharmap/gucharmap-unicode-info.c:159 49 | > msgid "" 50 | > msgstr "" 51 | > 52 | > #: gucharmap/gucharmap-unicode-info.c:161 53 | > msgid "" 54 | > msgstr "" 55 | > 56 | > For the above three, is surrogate something we must translate 57 | > exactly, or can we use something that means "something in its 58 | > place" (if we can find a way to say that :)) 59 | 60 | It's rather unfortunate that these terms exist, let alone 61 | have to be in gucharmap. I don't know how they should be 62 | translated, so I'll tell you what they mean. 63 | 64 | Unicode originally implied that the encoding was UCS-2 65 | and it initially didn't make any provisions for characters 66 | outside the BMP (U+0000 to U+FFFF). When it became clear 67 | that more than 64k characters would be needed for certain 68 | special applications (historic alphabets and ideographs, 69 | mathematical and musical typesetting, etc.), Unicode was 70 | turned into a sort of 21-bit character set with possible 71 | code points in the range U-00000000 to U-0010FFFF. The 72 | 2×1024 surrogate characters (U+D800 to U+DFFF) were 73 | introduced into the BMP to allow 1024×1024 non-BMP 74 | characters to be represented as a sequence of two 16-bit 75 | surrogate characters. This way UTF-16 was born, which 76 | represents the extended "21-bit" Unicode in a way 77 | backwards compatible with UCS-2. 78 | 79 | from http://www.cl.cam.ac.uk/~mgk25/unicode.html 80 | (BMP = Basic Multilingual Plane, 0000-FFFF) Notice the use 81 | of the word surrogate in this paragraph. A low surrogate is 82 | the first half of a 2 * 16bit character, and a high 83 | surrogate is the second half (in UTF-16 only, which we 84 | hate-- UTF-8 is God's encoding). Private Use Surrogate just 85 | means that these particular surrogates map into one of the 86 | Private Use Areas. 87 | 88 | > 89 | > #: gucharmap/gucharmap-unicode-info.c:165 90 | > msgid "" 91 | > msgstr "" 92 | > 93 | > #: gucharmap/gucharmap-unicode-info.c:167 94 | > msgid "" 95 | > msgstr "" 96 | > 97 | > For the above two, I take it these are not planes in the air? :) 98 | > surfaces, perhaps? 99 | 100 | In Unicode, each 16 bit space is called a plane, for some 101 | reason. 0000-FFFF, 10000-1FFFF, ..., 100000-10FFFF. There 102 | are 17 planes. 103 | 104 | > 105 | > #: gucharmap/gucharmap-unicode-info.c:186 106 | > msgid "Other, Control" 107 | > msgstr "" 108 | > 109 | > Control as a noun, not a verb? 110 | 111 | Yeah, a noun. This is the same idea as iscntrl() in ctype.h. 112 | Newline, carriage return, delete, etc are control 113 | characters. 114 | 115 | > 116 | > #: gucharmap/gucharmap-window.c:142 117 | > msgid "Jump to Unicode Code Point" 118 | > msgstr "" 119 | > 120 | > (and its neighbours in the po file: this is code as in.. well, as _not_ 121 | > in source code, I take it) 122 | 123 | Code point just means a number, basically. "Unicode assigns 124 | a number to every character". That number is the code point. 125 | 126 | > 127 | > #: gucharmap/gucharmap-window.c:577 128 | > msgid "Snap Columns to Power of Two" 129 | > msgstr "" 130 | > 131 | > snap? As in the way metacity has some sort of "snapping"? 132 | 133 | Yes, I think it's the same idea. 134 | 135 | > 136 | > And these are strings I want to check we give the right sense 137 | > for: 138 | > 139 | > #: gucharmap/gucharmap-charmap.c:437 gucharmap/gucharmap-table.c:332 140 | > msgid "[not a printable character]" 141 | > msgstr "" 142 | > -- can we say "character which cannot be printed"? And is this 143 | > printed on a printer, or displayed on a monitor as well? 144 | 145 | Yes, you can say that. Displayed on a monitor as well. 146 | 147 | > 148 | > #: gucharmap/gucharmap-charmap.c:529 149 | > msgid "Approximate equivalents:" 150 | > msgstr "" 151 | > 152 | > #: gucharmap/gucharmap-charmap.c:538 153 | > msgid "Equivalents:" 154 | > msgstr "" 155 | > -- For these, is equivalent the "mathematical" "exactly the same" 156 | > sort of concept, or something different? 157 | 158 | Yeah, I'm pretty sure "exactly the same" works here. 159 | 160 | > 161 | > #: gucharmap/unicode/unicode_blocks.cI:101 162 | > msgid "Private Use Area" 163 | > msgstr "" 164 | > -- This is the part of unicode reserved for people to do what they 165 | > want with? 166 | 167 | Exactly. 168 | 169 | > 170 | > #: gucharmap/unicode/unicode_blocks.cI:110 171 | > msgid "Halfwidth and Fullwidth Forms" 172 | > msgstr "" 173 | > -- forms of... characters? 174 | 175 | Yes. 176 | 177 | Noah 178 | 179 | 180 | Date: Mon, 28 Jul 2003 12:12:54 -0400 181 | From: Noah Levitt 182 | To: Telsa Gwynne 183 | Subject: Re: How to translate some of the gucharmap strings? 184 | 185 | On Mon, Jul 28, 2003 at 16:50:02 +0100, Telsa Gwynne wrote: 186 | > 187 | > > > #: gucharmap/gucharmap-charmap.c:466 188 | > > > msgid "Various Useful Representations" 189 | > > > msgstr "" 190 | > > 191 | 192 | Ah. Yes, of characters. For example, this section lists the 193 | numeric entity reference for use in html and xml, e.g. 194 | ೎, and stuff along those lines. 195 | 196 | Noah 197 | 198 | -------------------------------------------------------------------------------- /po/am.po: -------------------------------------------------------------------------------- 1 | # Translations into the Amharic Language. 2 | # Copyright (C) 2002 Free Software Foundation, Inc. 3 | # This file is distributed under the same license as the gucharmap package. 4 | # Ge'ez Frontier Foundation , 2002. 5 | # 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: gucharmap\n" 10 | "POT-Creation-Date: 2003-02-07 19:23+0100\n" 11 | "PO-Revision-Date: 2003-02-07 17:46+EDT\n" 12 | "Last-Translator: Ge'ez Frontier Foundation \n" 13 | "Language-Team: Amharic \n" 14 | "Language: am\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: src/charmap.c:699 20 | msgid "Zoom mode disabled." 21 | msgstr "" 22 | 23 | #: src/charmap.c:1388 24 | msgid "Zoom mode enabled. Press to disable zoom." 25 | msgstr "" 26 | 27 | #: src/charmap.c:1457 28 | msgid "Zoom mode enabled." 29 | msgstr "" 30 | 31 | #: src/charmap.c:1693 32 | msgid "Clipboard is empty." 33 | msgstr "" 34 | 35 | #: src/charmap.c:1695 36 | msgid "There is no selected text." 37 | msgstr "" 38 | 39 | #: src/charmap.c:1703 src/charmap.c:1907 40 | msgid "Unknown character, unable to identify." 41 | msgstr "" 42 | 43 | #: src/charmap.c:1707 src/charmap.c:1911 44 | msgid "Character found." 45 | msgstr "" 46 | 47 | #: src/charmap.c:2016 48 | msgid "Character Map" 49 | msgstr "" 50 | 51 | #: src/charmap.c:2020 52 | msgid "Character" 53 | msgstr "ፊደል ሎች" 54 | 55 | #: src/charmap.c:2021 56 | msgid "Unicode category" 57 | msgstr "የዩኒኮድ ምድብ" 58 | 59 | #: src/charmap.c:2022 60 | msgid "Canonical decomposition" 61 | msgstr "" 62 | 63 | #: src/charmap.c:2023 64 | msgid "UTF-8" 65 | msgstr "UTF-8" 66 | 67 | #: src/charmap.c:2024 68 | msgid "Other representations" 69 | msgstr "" 70 | 71 | #: src/charmap.c:2026 72 | msgid "CJK ideograph definition" 73 | msgstr "" 74 | 75 | #: src/charmap.c:2027 76 | msgid "Mandarin pronunciation" 77 | msgstr "" 78 | 79 | #: src/charmap.c:2028 80 | msgid "Japanese On pronunciation" 81 | msgstr "" 82 | 83 | #: src/charmap.c:2029 84 | msgid "Japanese Kun pronunciation" 85 | msgstr "" 86 | 87 | #: src/charmap.c:2030 88 | msgid "Cantonese pronunciation" 89 | msgstr "" 90 | 91 | #: src/charmap.c:2031 92 | msgid "Tang pronunciation" 93 | msgstr "" 94 | 95 | #: src/charmap.c:2032 96 | msgid "Korean pronunciation" 97 | msgstr "" 98 | 99 | #: src/charmap.c:2048 100 | msgid "Character Table" 101 | msgstr "የፊደል ሠንጠረዥ" 102 | 103 | #: src/charmap.c:2053 104 | msgid "Details on the Current Character" 105 | msgstr "" 106 | 107 | #: src/charmap.c:2064 108 | msgid "List of Unicode Blocks" 109 | msgstr "" 110 | 111 | #: src/main.c:180 src/main.c:662 112 | msgid "category" 113 | msgstr "ምድብ" 114 | 115 | #: src/main.c:182 src/main.c:670 116 | msgid "decomposition" 117 | msgstr "" 118 | 119 | #: src/main.c:184 src/main.c:677 120 | msgid "utf8" 121 | msgstr "utf8" 122 | 123 | #: src/main.c:186 src/main.c:685 124 | msgid "other_reps" 125 | msgstr "" 126 | 127 | #: src/main.c:189 src/main.c:712 128 | msgid "kdefinition" 129 | msgstr "" 130 | 131 | #: src/main.c:191 src/main.c:720 132 | msgid "kmandarin" 133 | msgstr "" 134 | 135 | #: src/main.c:193 src/main.c:728 136 | msgid "kjapaneseon" 137 | msgstr "" 138 | 139 | #: src/main.c:195 src/main.c:736 140 | msgid "kjapanesekun" 141 | msgstr "" 142 | 143 | #: src/main.c:197 src/main.c:744 144 | msgid "kcantonese" 145 | msgstr "" 146 | 147 | #: src/main.c:199 src/main.c:752 148 | msgid "ktang" 149 | msgstr "" 150 | 151 | #: src/main.c:201 src/main.c:760 152 | msgid "kkorean" 153 | msgstr "" 154 | 155 | #: src/main.c:261 156 | #, c-format 157 | msgid "" 158 | "Not a valid code point to jump to. Must be a hexadecimal number between 0 " 159 | "and %4.4X." 160 | msgstr "" 161 | 162 | #: src/main.c:283 163 | msgid "Go to hex code point" 164 | msgstr "" 165 | 166 | #: src/main.c:304 167 | msgid "_Enter unicode code point" 168 | msgstr "" 169 | 170 | #: src/main.c:348 171 | msgid "The selected code point is not a valid unicode character." 172 | msgstr "" 173 | 174 | #: src/main.c:379 175 | msgid "Text copied to clipboard." 176 | msgstr "" 177 | 178 | #: src/main.c:389 179 | msgid "Text-to-copy entry box cleared." 180 | msgstr "" 181 | 182 | #: src/main.c:403 183 | msgid "Not found." 184 | msgstr "አልተገኘም።" 185 | 186 | #: src/main.c:407 187 | msgid "Found." 188 | msgstr "" 189 | 190 | #: src/main.c:411 191 | msgid "Search wrapped." 192 | msgstr "" 193 | 194 | #: src/main.c:415 195 | msgid "Nothing to search for." 196 | msgstr "" 197 | 198 | #: src/main.c:438 199 | msgid "_Search:" 200 | msgstr "ፈልግ፦ (_S)" 201 | 202 | #: src/main.c:456 203 | msgid "" 204 | "Search for the next occurrence of this string in a character's Unicode name." 205 | msgstr "" 206 | 207 | #: src/main.c:485 208 | msgid "_Text to copy:" 209 | msgstr "ጽሑፉን ቅጁ፦ (_T)" 210 | 211 | #: src/main.c:504 212 | msgid "Copy to the clipboard." 213 | msgstr "" 214 | 215 | #: src/main.c:529 216 | msgid "translator-credits" 217 | msgstr "ዘግዕዝ Frontier Foundation" 218 | 219 | #: src/main.c:536 src/main.c:822 220 | msgid "Unicode Character Map" 221 | msgstr "" 222 | 223 | #: src/main.c:586 224 | msgid "Char_map" 225 | msgstr "" 226 | 227 | #: src/main.c:588 228 | msgid "_View" 229 | msgstr "ተመልከት (_T)" 230 | 231 | #: src/main.c:590 232 | msgid "_Go To" 233 | msgstr "ሂድ ወደ (_G)" 234 | 235 | #: src/main.c:609 236 | msgid "Expand/Collapse All" 237 | msgstr "" 238 | 239 | #. ctrl-+ or ctrl-= 240 | #: src/main.c:618 241 | msgid "Zoom _In" 242 | msgstr "ከቅርበት ዕይታ (_I)" 243 | 244 | #. ctrl-- 245 | #: src/main.c:630 246 | msgid "Zoom _Out" 247 | msgstr "ከርቀት ዕይታ (_O)" 248 | 249 | #: src/main.c:643 250 | msgid "_Unicode Details" 251 | msgstr "የዩኒኮድ ዝርዝሮች (_U)" 252 | 253 | #. the unicode details submenu 254 | #: src/main.c:649 src/main.c:698 255 | msgid "Options" 256 | msgstr "ምርጫዎች" 257 | 258 | #: src/main.c:657 259 | msgid "_Category" 260 | msgstr "ምድብ (_C)" 261 | 262 | #: src/main.c:665 263 | msgid "Canonical _Decomposition" 264 | msgstr "" 265 | 266 | #: src/main.c:672 267 | msgid "_UTF-8" 268 | msgstr "_UTF-8" 269 | 270 | #: src/main.c:680 271 | msgid "_Other Representations" 272 | msgstr "" 273 | 274 | #: src/main.c:692 275 | msgid "_CJK Ideograph Details" 276 | msgstr "" 277 | 278 | #: src/main.c:707 279 | msgid "CJK Ideograph _Definition" 280 | msgstr "" 281 | 282 | #: src/main.c:715 283 | msgid "_Mandarin Pronunciation" 284 | msgstr "" 285 | 286 | #: src/main.c:723 287 | msgid "Japanese _On Pronunciation" 288 | msgstr "" 289 | 290 | #: src/main.c:731 291 | msgid "_Japanese Kun Pronunciation" 292 | msgstr "" 293 | 294 | #: src/main.c:739 295 | msgid "_Cantonese Pronunciation" 296 | msgstr "" 297 | 298 | #: src/main.c:747 299 | msgid "_Tang Pronunciation" 300 | msgstr "" 301 | 302 | #: src/main.c:755 303 | msgid "_Korean Pronunciation" 304 | msgstr "" 305 | 306 | #. ctrl-h 307 | #: src/main.c:770 308 | msgid "_Hex Code Point..." 309 | msgstr "" 310 | 311 | #. ctrl-v 312 | #: src/main.c:778 313 | msgid "Character in _Clipboard" 314 | msgstr "" 315 | 316 | #. make the help menu 317 | #: src/main.c:788 318 | msgid "_Help" 319 | msgstr "መረጃ (_H)" 320 | 321 | #: src/mini_fontsel.c:280 322 | msgid "Font" 323 | msgstr "የፊደል ቅርጽ" 324 | 325 | #: src/mini_fontsel.c:289 326 | msgid "Font Family" 327 | msgstr "የፊደል ቅርጽ ቤተሰብ" 328 | 329 | #: src/mini_fontsel.c:293 330 | msgid "Font Style" 331 | msgstr "የፊደል ቅርጽ ዘይቤ" 332 | 333 | #: src/mini_fontsel.c:300 334 | msgid "Font Size" 335 | msgstr "የፊደሉ ቅርጽ መጠን" 336 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | # Copyright © 2019 Christian Persch 2 | # 3 | # This programme is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 3 of the License, or (at your 6 | # option) any later version. 7 | # 8 | # This programme is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this programme. If not, see . 15 | 16 | po_dir = meson.current_source_dir() 17 | 18 | gettext_targets = i18n.gettext( 19 | gucharmap_gettext_domain, 20 | preset: 'glib', 21 | ) 22 | --------------------------------------------------------------------------------