├── .gitignore ├── .gitlab-ci.yml ├── AUTHORS ├── COPYING ├── NEWS ├── README.md ├── copyfile.py ├── docs ├── meson.build └── reference │ ├── images │ └── peas-gtk-plugin-manager.png │ ├── libpeas-urlmap.js │ ├── libpeas.toml.in │ ├── meson.build │ └── migrating-1to2.md ├── libpeas.doap ├── libpeas ├── gconstructor.h ├── libpeas.h ├── meson.build ├── peas-debug.c ├── peas-debug.h ├── peas-dirs.c ├── peas-dirs.h ├── peas-engine-priv.h ├── peas-engine.c ├── peas-engine.h ├── peas-extension-base.c ├── peas-extension-base.h ├── peas-extension-set.c ├── peas-extension-set.h ├── peas-i18n-priv.h ├── peas-i18n.c ├── peas-marshal.list ├── peas-object-module.c ├── peas-object-module.h ├── peas-plugin-info-priv.h ├── peas-plugin-info.c ├── peas-plugin-info.h ├── peas-plugin-loader-c.c ├── peas-plugin-loader-c.h ├── peas-plugin-loader.c ├── peas-plugin-loader.h ├── peas-utils-osx.h ├── peas-utils-osx.m ├── peas-utils.c ├── peas-utils.h ├── peas-version-macros.h └── peas-version.h.in ├── license_change ├── loaders ├── gjs │ ├── meson.build │ ├── peas-plugin-loader-gjs.cpp │ └── peas-plugin-loader-gjs.h ├── lua5.1 │ ├── meson.build │ ├── peas-lua-internal.c │ ├── peas-lua-internal.h │ ├── peas-lua-utils.c │ ├── peas-lua-utils.h │ ├── peas-plugin-loader-lua.c │ ├── peas-plugin-loader-lua.h │ └── resources │ │ ├── meson.build │ │ ├── peas-lua-compile.lua │ │ ├── peas-lua-internal.lua │ │ ├── peas-lua-strict.lua │ │ └── peas-lua.gresource.xml ├── meson.build └── python │ ├── meson.build │ ├── peas-plugin-loader-python.c │ ├── peas-plugin-loader-python.h │ ├── peas-python-compile.py │ ├── peas-python-internal.c │ ├── peas-python-internal.h │ ├── peas-python-internal.py │ └── peas-python.gresource.xml ├── meson.build ├── meson_options.txt ├── po ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── ab.po ├── an.po ├── ar.po ├── as.po ├── ast.po ├── be.po ├── bg.po ├── bn.po ├── bn_IN.po ├── bs.po ├── ca.po ├── ca@valencia.po ├── cs.po ├── da.po ├── de.po ├── el.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── fur.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hr.po ├── hu.po ├── ia.po ├── id.po ├── ie.po ├── is.po ├── it.po ├── ja.po ├── ka.po ├── kab.po ├── kk.po ├── kn.po ├── ko.po ├── lt.po ├── lv.po ├── meson.build ├── ml.po ├── mr.po ├── ms.po ├── nb.po ├── nds.po ├── ne.po ├── nl.po ├── oc.po ├── or.po ├── pa.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ro.po ├── ru.po ├── sk.po ├── sl.po ├── sr.po ├── sr@latin.po ├── sv.po ├── ta.po ├── te.po ├── tg.po ├── th.po ├── tr.po ├── ug.po ├── uk.po ├── vi.po ├── zh_CN.po ├── zh_HK.po └── zh_TW.po ├── subprojects └── gi-docgen.wrap └── tests ├── libpeas ├── engine.c ├── extension-c.c ├── extension-gjs.c ├── extension-lua.c ├── extension-py.c ├── extension-set.c ├── introspection │ ├── introspection-abstract.c │ ├── introspection-abstract.h │ ├── introspection-activatable.c │ ├── introspection-activatable.h │ ├── introspection-base.c │ ├── introspection-base.h │ ├── introspection-callable.c │ ├── introspection-callable.h │ ├── introspection-has-prerequisite.c │ ├── introspection-has-prerequisite.h │ ├── introspection-prerequisite.c │ ├── introspection-prerequisite.h │ ├── introspection-unimplemented.c │ ├── introspection-unimplemented.h │ └── meson.build ├── meson.build ├── plugin-info.c ├── plugins │ ├── embedded │ │ ├── embedded-invalid-loader.plugin │ │ ├── embedded-missing-symbol.plugin │ │ ├── embedded-plugin.c │ │ ├── embedded-plugin.h │ │ ├── embedded.gresource.xml │ │ ├── embedded.plugin │ │ └── meson.build │ ├── extension-c-nonexistent.plugin │ ├── extension-c │ │ ├── extension-c-abstract.c │ │ ├── extension-c-abstract.h │ │ ├── extension-c-missing-symbol-plugin.c │ │ ├── extension-c-missing-symbol.plugin │ │ ├── extension-c-plugin.c │ │ ├── extension-c-plugin.h │ │ ├── extension-c.gschema.xml │ │ ├── extension-c.plugin │ │ └── meson.build │ ├── extension-gjs-nonexistent.plugin │ ├── extension-gjs │ │ ├── extension-gjs.gschema.xml │ │ ├── extension-gjs.js │ │ ├── extension-gjs.plugin │ │ └── meson.build │ ├── extension-lua │ │ ├── extension-lua51.gschema.xml │ │ ├── extension-lua51.lua │ │ ├── extension-lua51.plugin │ │ └── meson.build │ ├── extension-lua51-nonexistent.plugin │ ├── extension-python-nonexistent.plugin │ ├── extension-python │ │ ├── extension-py.gschema.xml.in │ │ ├── extension-py.plugin.in │ │ ├── extension-py.py.in │ │ └── meson.build │ ├── info-missing-module.plugin │ ├── info-missing-name.plugin │ ├── invalid.plugin │ ├── meson.build │ ├── nonexistent-dep.plugin │ ├── not-loadable.plugin │ ├── os-dependant-help.plugin │ ├── two-deps.plugin │ └── unkown-loader.plugin └── testing │ ├── meson.build │ ├── testing-extension.c │ ├── testing-extension.h │ ├── testing.c │ └── testing.h ├── meson.build ├── plugins ├── builtin │ ├── builtin-plugin.c │ ├── builtin-plugin.h │ ├── builtin.plugin │ └── meson.build ├── full-info.plugin ├── has-dep │ ├── has-dep-plugin.c │ ├── has-dep-plugin.h │ ├── has-dep.plugin │ └── meson.build ├── loadable │ ├── loadable-plugin.c │ ├── loadable-plugin.h │ ├── loadable.plugin │ └── meson.build ├── meson.build ├── min-info.plugin ├── self-dep │ ├── meson.build │ ├── self-dep-plugin.c │ ├── self-dep-plugin.h │ └── self-dep.plugin └── unavailable.plugin ├── testing-util ├── meson.build ├── peas-test-common.h ├── testing-util.c └── testing-util.h └── valgrind.suppressions /.gitignore: -------------------------------------------------------------------------------- 1 | *.bak 2 | *.luac 3 | *.o 4 | *.pyc 5 | *.gir 6 | *.typelib 7 | *~ 8 | .*.sw[nop] 9 | *.gcov 10 | /build 11 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: "GNOME/citemplates" 3 | file: "templates/default-rules.yml" 4 | - component: "gitlab.gnome.org/GNOME/citemplates/gnomeos-basic-ci@master" 5 | inputs: 6 | # FIXME: currently we don't have lua, should fix that at some point 7 | meson-options: "-Dlua51=false -Dgtk_doc=true" 8 | run-tests: "no" 9 | - component: "gitlab.gnome.org/GNOME/citemplates/basic-deploy-docs@master" 10 | - component: "gitlab.gnome.org/GNOME/citemplates/release-service@master" 11 | inputs: 12 | dist-job-name: "build-gnomeos" 13 | tarball-artifact-path: "_builddir/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz" 14 | 15 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Contributors to libpeas: 2 | 3 | Steve Frécinaux 4 | Ignacio Casal Quinteiro 5 | 6 | Contributors to the gedit plugin system: 7 | 8 | Paolo Maggi 9 | Paolo Borelli 10 | Steve Frécinaux 11 | Jesse van den Kieboom 12 | Ignacio Casal Quinteiro 13 | Raphaël Slinckx 14 | 15 | Contributors to Epiphany's plugin system: 16 | 17 | Marco Pesenti Gritti 18 | Christian Persch 19 | James Willcox 20 | Crispin Flowerday 21 | Adam Hooper 22 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | # Libpeas 2.0.7 2 | 3 | * CI fixes 4 | 5 | # Libpeas 2.0.6 6 | 7 | * Translation updates 8 | 9 | # Libpeas 2.0.5 10 | 11 | * Fix UB in memcpy 12 | * Fix weak pointer usage in testsuite 13 | 14 | # Libpeas 2.0.4 15 | 16 | * Update to mozjs 128 17 | 18 | # Libpeas 2.0.3 19 | 20 | * Various non-critical resiliency fixes 21 | * Translation updates 22 | 23 | # Libpeas 2.0.2 24 | 25 | Changes since 2.0.1: 26 | 27 | * Translation updates 28 | 29 | # Libpeas 2.0.1 30 | 31 | Changes since 2.0.0: 32 | 33 | * Improve dependency searching for Python when building 34 | * Fix g_object_ref() usage with PeasExtensionSet as a GListModel 35 | * Translation updates 36 | 37 | It is recommended that distributions update to 2.0.1. 38 | 39 | # Libpeas 2.0.0 40 | 41 | This release corresponds with GNOME 45.0. 42 | 43 | Changes since 1.99.1: 44 | 45 | * Translation updates 46 | 47 | # Libpeas 1.99.1 48 | 49 | This release corresponds with GNOME 45.rc. 50 | 51 | It contains various build system improvements that were found when 52 | integrating 1.99.0 with various distribution channels. 53 | 54 | # Libpeas 1.99.0 55 | 56 | This is the beginning of the libpeas 2.0 series. It breaks ABI with previous 57 | versions of libpeas and therefore can be installed along-side libpeas-1.0. 58 | 59 | This allows libpeas to improve API ergonomics as well as implement features 60 | which will improve integration with GTK 4. 61 | 62 | ## GJS 63 | 64 | With libpeas-2 we are gaining a new plugin loader in GJS. This is the same 65 | JavaScript engine (powered by SpiderMonkey) that GNOME Shell uses and allows 66 | for modern JavaScript programming with clean integration of GObject. 67 | 68 | This works using new-style JavaScript modules and recent feature additions 69 | to GJS. See https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/846 for 70 | more information. 71 | 72 | ## Removal of libpeas-gtk 73 | 74 | libpeas-gtk is not part of libpeas-2. 75 | 76 | Application developers are encouraged to use GTK 4's integration with 77 | GtkListView and similar widgets with PeasEngine. It provides a GListModel 78 | implementation with PeasPluginInfo to bind into row widgets. 79 | 80 | ## Removal of PeasActivatable 81 | 82 | Interfaces are cheap and easy to create in GObject these days. Application 83 | developers are encouraged to create their own interfaces or base-objects 84 | which can implemented by their plugins. 85 | 86 | ## Removal of Python 2 support 87 | 88 | Everything of consequence is on Python 3 now. There is no need for us to 89 | maintain the Python 2 loader for new applications targeting libpeas-2. 90 | 91 | ## Deprecated API 92 | 93 | Previously deprecated API has been removed from libpeas such as the very 94 | old GObject Introspection integration using "call" on extension objects. 95 | 96 | ## PeasEngine 97 | 98 | The PeasEngine object now implements a GListModel of PeasPluginInfo. Now 99 | that PeasPluginInfo is a GObject, you may bind its properties to labels 100 | within rows of a GtkListView with relative ease. 101 | 102 | Additionally, you can easily filter lists based on type-to-search with 103 | GtkFilterListModel, more than you could ever do with libpeas-gtk. 104 | 105 | ## PeasExtensionSet 106 | 107 | PeasExtensionSet is also a GListModel which improves situations where an 108 | application wants to limit which extensions within a set are active based 109 | on arbitrary conditions. 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introducing libpeas 2 | 3 | libpeas is a gobject-based plugins engine, and is targetted at giving every 4 | application the chance to assume its own extensibility. It is currently used by 5 | several Gnome applications like gedit and Totem. 6 | 7 | It takes its roots in the old gedit plugins engine, and provides an extensive set 8 | of features mirroring the desiderata of most of the applications providing an 9 | extension framework. 10 | 11 | # Documentation 12 | 13 | Documentation can be found at: 14 | 15 | * Peas-2: https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-2/ 16 | 17 | See the [Migration Guide](https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-2/migrating-1to2.html) 18 | for help migrating from Peas-1.0 to Peas-2. 19 | 20 | # Multiple extension points 21 | 22 | One of the most frustrating limitations of the Gedit plugins engine was that it 23 | only allows extending a single class, called GeditPlugin. With libpeas, this 24 | limitation vanishes, and the application writer is now able to provide a set of 25 | GInterfaces the plugin writer will be able to implement as his plugin requires. 26 | 27 | # On-demand programming language support 28 | 29 | libpeas comes with a set of supported languages (currently, C, Lua 5.1, 30 | and Python 3). Those languages are supported through “loaders” which 31 | are loaded on demand. What it means is that you only pay for what you use: if 32 | you have no Python plugin, the Python interpreter won't be loaded in memory. 33 | Of course, the same goes for the C loader. 34 | 35 | # Damn simple to use (or at least we try hard) 36 | 37 | Adding support for libpeas-enabled plugins in your own application is a matter 38 | of minutes. You only have to create an instance of the plugins engine, and 39 | call methods on the implementations of the various extension points. That's it, 40 | no clock harmed. 41 | 42 | # A shared library for everyone 43 | 44 | As I noted earlier, the latest improvements of our beloved development platform 45 | made it possible to create bindings for apps very quickly. And with the Gnome 3 46 | announcement, this looked like the perfect timing to make the plugins engine 47 | and its latest improvements available to everyone, with a library. Also, 48 | hopefully it will reduce code duplication and allow bugs to be fixed at the 49 | right place, once and for all, improving the quality of our applications. 50 | 51 | As a member of the Gnome community and as an offspring of gedit, libpeas already 52 | shares most of the Gnome infrastructure and philosophy: 53 | 54 | * You can download the first release tarball on the Gnome FTP server. 55 | * You can browse the source and contribute using our git repository. 56 | * You can come and discuss with me and others on #libpeas (GimpNet) 57 | * And you can report bug or propose new features through the good old Gnome 58 | Bugzilla, against the libpeas module. 59 | 60 | # A few hints on using libpeas 61 | 62 | As always for the new projects, it can take some time to grasp all the 63 | subtleties at first. 64 | 65 | ## Plugins versus Extensions 66 | 67 | Something that is going to puzzle most of the newcomers is the fact that the 68 | libpeas API talks about both plugins and extensions, two terms that are usually 69 | used interchangeably, but who have very different meanings in libpeas. 70 | 71 | Let's try and give a definition of both of these words in this context: 72 | 73 | * Plugin: In the context of libpeas, a plugin is a logical package. It's what 74 | you will enable or disable from the UI, and at the end it is what the user 75 | will see. An example of plugin for gedit would be the file browser plugin. 76 | 77 | * Extension. An extension is an object which implements an interface 78 | associated to an extension point. There can be several extensions in a single 79 | plugin. Examples of extensions provided by the file browser plugin would be 80 | the configuration dialog, the left panel pane and a completion provider for 81 | file names. 82 | 83 | Copied from http://log.istique.net/2010/announcing-libpeas 84 | -------------------------------------------------------------------------------- /copyfile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Replace calls to 'cp' with Python 4 | 5 | import shutil 6 | import sys 7 | 8 | if len(sys.argv) < 3: 9 | raise ValueError('Usage: %s ' % sys.argv[0]) 10 | 11 | last_arg_index = len(sys.argv) - 1 12 | destdir = sys.argv[last_arg_index] 13 | 14 | for x in range(1, last_arg_index): 15 | shutil.copy(sys.argv[x], destdir) 16 | -------------------------------------------------------------------------------- /docs/meson.build: -------------------------------------------------------------------------------- 1 | subdir('reference') 2 | -------------------------------------------------------------------------------- /docs/reference/images/peas-gtk-plugin-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/libpeas/b1b88ba58eafaf0975ff1d3f9acf85eece1e9517/docs/reference/images/peas-gtk-plugin-manager.png -------------------------------------------------------------------------------- /docs/reference/libpeas-urlmap.js: -------------------------------------------------------------------------------- 1 | // A map between namespaces and base URLs for their online documentation 2 | baseURLs = [ 3 | [ 'GLib', 'https://docs.gtk.org/glib/' ], 4 | [ 'GObject', 'https://docs.gtk.org/gobject/' ], 5 | [ 'Gio', 'https://docs.gtk.org/gio/' ], 6 | [ 'Gtk', 'https://docs.gtk.org/gtk4/' ], 7 | ] 8 | -------------------------------------------------------------------------------- /docs/reference/libpeas.toml.in: -------------------------------------------------------------------------------- 1 | [library] 2 | version = "@VERSION@" 3 | browse_url = "https://gitlab.gnome.org/GNOME/libpeas" 4 | repository_url = "https://gitlab.gnome.org/GNOME/libpeas.git" 5 | docs_url = "https://gnome.pages.gitlab.gnome.org/libpeas/libpeas-1.0/" 6 | website_url = "https://gitlab.gnome.org/GNOME/libpeas" 7 | authors = "Steve Frécinaux, Garrett Regier, Christian Hergert" 8 | license = "LGPL-2.0-or-later" 9 | description = "GObject-based plugins engine" 10 | dependencies = [ "GObject-2.0", "GLib-1.0", "Gio-2.0" ] 11 | devhelp = true 12 | search_index = true 13 | 14 | [dependencies."GObject-2.0"] 15 | name = "GObject" 16 | description = "The base type system library" 17 | docs_url = "https://docs.gtk.org/gobject/" 18 | 19 | [dependencies."GLib-2.0"] 20 | name = "GLib" 21 | description = "The base type system library" 22 | docs_url = "https://docs.gtk.org/glib/" 23 | 24 | [dependencies."Gio-2.0"] 25 | name = "GIO" 26 | description = "GObject Interfaces and Objects, Networking, IPC, and I/O" 27 | docs_url = "https://docs.gtk.org/gio/" 28 | 29 | [theme] 30 | name = "basic" 31 | show_index_summary = true 32 | show_class_hierarchy = true 33 | 34 | [source-location] 35 | base_url = "https://gitlab.gnome.org/GNOME/libpeas/-/blob/master/" 36 | 37 | [extra] 38 | # The same order will be used when generating the index 39 | content_files = [ 40 | "migrating-1to2.md" 41 | ] 42 | 43 | content_images = [ 44 | ] 45 | urlmap_file = "libpeas-urlmap.js" 46 | -------------------------------------------------------------------------------- /docs/reference/meson.build: -------------------------------------------------------------------------------- 1 | expand_content_md_files = [ 2 | 'migrating-1to2.md', 3 | ] 4 | 5 | toml_data = configuration_data() 6 | toml_data.set('VERSION', meson.project_version()) 7 | 8 | libpeas_toml = configure_file( 9 | input: 'libpeas.toml.in', 10 | output: 'libpeas.toml', 11 | configuration: toml_data 12 | ) 13 | 14 | gidocgen = find_program('gi-docgen') 15 | 16 | docs_dir = get_option('datadir') / 'doc' 17 | 18 | custom_target('libpeas-doc', 19 | input: [libpeas_toml, libpeas_gir[0]], 20 | output: 'libpeas-@0@'.format(api_version), 21 | command: [ 22 | gidocgen, 23 | 'generate', 24 | '--quiet', 25 | '--add-include-path=@0@'.format(meson.current_build_dir() / '../../libpeas'), 26 | '--config=@INPUT0@', 27 | '--output-dir=@OUTPUT@', 28 | '--no-namespace-dir', 29 | '--content-dir=@0@'.format(meson.current_source_dir()), 30 | '@INPUT1@', 31 | ], 32 | depend_files: [ expand_content_md_files ], 33 | build_by_default: true, 34 | install: true, 35 | install_dir: docs_dir, 36 | ) 37 | -------------------------------------------------------------------------------- /libpeas.doap: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | libpeas 9 | A GObject plugins library 10 | libpeas is a GObject-based plugins engine, and is targeted 11 | at giving every application the chance to assume its own extensibility. 12 | 13 | 14 | 15 | 16 | 17 | C 18 | 19 | 20 | 21 | Christian Hergert 22 | 23 | chergert 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /libpeas/libpeas.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libpeas.h 3 | * This file is part of libpeas 4 | * 5 | * libpeas is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * libpeas 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 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | * 19 | * SPDX-License-Identifier: LGPL-2.1-or-later 20 | */ 21 | 22 | #pragma once 23 | 24 | #define LIBPEAS_INSIDE 25 | # include "peas-engine.h" 26 | # include "peas-extension-base.h" 27 | # include "peas-extension-set.h" 28 | # include "peas-object-module.h" 29 | # include "peas-plugin-info.h" 30 | # include "peas-version.h" 31 | # include "peas-version-macros.h" 32 | #undef LIBPEAS_INSIDE 33 | -------------------------------------------------------------------------------- /libpeas/meson.build: -------------------------------------------------------------------------------- 1 | libpeas_srcdir = include_directories('.') 2 | 3 | version_data = configuration_data() 4 | version_data.set('PEAS_MAJOR_VERSION', version_major) 5 | version_data.set('PEAS_MINOR_VERSION', version_minor) 6 | version_data.set('PEAS_MICRO_VERSION', version_micro) 7 | version_data.set('PEAS_VERSION', meson.project_version()) 8 | 9 | peas_version_h = configure_file( 10 | input: 'peas-version.h.in', 11 | output: 'peas-version.h', 12 | configuration: version_data, 13 | install_dir: pkgincludedir, 14 | ) 15 | 16 | libpeas_public_h = files( 17 | 'peas-engine.h', 18 | 'peas-extension-base.h', 19 | 'peas-extension-set.h', 20 | 'peas-object-module.h', 21 | 'peas-plugin-info.h', 22 | 'peas-version-macros.h', 23 | 'libpeas.h', 24 | ) 25 | 26 | libpeas_sources = files( 27 | 'peas-debug.c', 28 | 'peas-dirs.c', 29 | 'peas-engine.c', 30 | 'peas-extension-base.c', 31 | 'peas-extension-set.c', 32 | 'peas-i18n.c', 33 | 'peas-object-module.c', 34 | 'peas-plugin-info.c', 35 | 'peas-plugin-loader.c', 36 | 'peas-plugin-loader-c.c', 37 | 'peas-utils.c', 38 | ) 39 | 40 | if build_machine.system() == 'darwin' 41 | libpeas_sources += [ 42 | 'peas-utils-osx.m', 43 | 'peas-utils-osx.h', 44 | ] 45 | endif 46 | 47 | 48 | libpeas_deps = [ 49 | glib_dep, 50 | gobject_dep, 51 | gmodule_dep, 52 | gio_dep, 53 | ] 54 | 55 | libpeas_c_args = [ 56 | '-DG_LOG_DOMAIN="libpeas"', 57 | '-DDATADIR="@0@"'.format(datadir), 58 | '-DLIBDIR="@0@"'.format(libdir), 59 | ] 60 | 61 | libpeas_link_args = [ 62 | ] 63 | 64 | if build_machine.system() == 'darwin' 65 | libpeas_link_args += [ 66 | '-Wl,-framework', '-Wl,Foundation', 67 | '-Wl,-framework', '-Wl,AppKit', 68 | ] 69 | endif 70 | 71 | libpeas_marshal = gnome.genmarshal( 72 | 'peas-marshal', 73 | sources: 'peas-marshal.list', 74 | prefix: 'peas_cclosure_marshal', 75 | install_header: false, 76 | valist_marshallers: true, 77 | ) 78 | 79 | libpeas_marshals_h = libpeas_marshal.get(1) 80 | 81 | install_headers(libpeas_public_h, install_dir: pkgincludedir) 82 | 83 | libpeas_sha = library( 84 | package_string.strip('lib'), 85 | libpeas_sources + libpeas_marshal, 86 | version: lib_version, 87 | darwin_versions: lib_version_osx, 88 | include_directories: [rootdir, libpeas_srcdir], 89 | dependencies: libpeas_deps, 90 | c_args: libpeas_c_args + hidden_visibility_args, 91 | objc_args: libpeas_c_args, 92 | link_args: libpeas_link_args, 93 | install: true, 94 | ) 95 | 96 | libpeas_dep_sources = [ 97 | libpeas_marshals_h, 98 | ] 99 | 100 | if generate_gir == true 101 | libpeas_gir_includes = [ 102 | 'GObject-2.0', 103 | 'GModule-2.0', 104 | 'Gio-2.0', 105 | ] 106 | 107 | libpeas_gir = gnome.generate_gir( 108 | libpeas_sha, 109 | sources: libpeas_sources + libpeas_public_h, 110 | nsversion: api_version, 111 | namespace: 'Peas', 112 | symbol_prefix: 'peas', 113 | identifier_prefix: 'Peas', 114 | header: 'libpeas.h', 115 | export_packages: [package_string], 116 | includes: libpeas_gir_includes, 117 | link_with: libpeas_sha, 118 | install: true, 119 | install_dir_gir: girdir, 120 | install_dir_typelib: typelibdir, 121 | extra_args: [ 122 | '--warn-all', 123 | ], 124 | ) 125 | 126 | if generate_vapi == true 127 | vapi_dependencies = [ 128 | 'gmodule-2.0', 129 | 'gio-2.0', 130 | ] 131 | gnome.generate_vapi( 132 | package_string, 133 | install: true, 134 | packages: vapi_dependencies, 135 | sources: libpeas_gir[0] 136 | ) 137 | endif 138 | 139 | libpeas_dep_sources += [ 140 | libpeas_gir, 141 | ] 142 | endif 143 | 144 | libpeas_dep = declare_dependency( 145 | link_with: libpeas_sha, 146 | include_directories: [rootdir, libpeas_srcdir], 147 | dependencies: libpeas_deps, 148 | sources: libpeas_dep_sources, 149 | ) 150 | 151 | libpeas_pc_reqs = [ 152 | 'glib-2.0 @0@'.format(glib_req), 153 | 'gobject-2.0 @0@'.format(glib_req), 154 | 'gmodule-2.0 @0@'.format(glib_req), 155 | 'gio-2.0 @0@'.format(glib_req), 156 | ] 157 | 158 | libpeas_pc = pkg.generate( 159 | libpeas_sha, 160 | name: package_string, 161 | description: 'GObject plugins library', 162 | subdirs: package_string, 163 | install_dir: pkgconfigdir, 164 | requires: libpeas_pc_reqs, 165 | ) 166 | -------------------------------------------------------------------------------- /libpeas/peas-debug.c: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-debug.c 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "peas-debug.h" 27 | 28 | 29 | static void 30 | debug_log_handler (const char *log_domain, 31 | GLogLevelFlags log_level, 32 | const char *message, 33 | gpointer user_data) 34 | { 35 | } 36 | 37 | void 38 | peas_debug_init (void) 39 | { 40 | if (g_getenv ("PEAS_DEBUG") == NULL) 41 | { 42 | g_log_set_handler (G_LOG_DOMAIN, 43 | G_LOG_LEVEL_DEBUG, 44 | debug_log_handler, 45 | NULL); 46 | } 47 | else 48 | { 49 | const char *g_messages_debug; 50 | 51 | g_messages_debug = g_getenv ("G_MESSAGES_DEBUG"); 52 | 53 | if (g_messages_debug == NULL) 54 | { 55 | g_setenv ("G_MESSAGES_DEBUG", G_LOG_DOMAIN, TRUE); 56 | } 57 | else 58 | { 59 | char *new_g_messages_debug; 60 | 61 | new_g_messages_debug = g_strconcat (g_messages_debug, " ", 62 | G_LOG_DOMAIN, NULL); 63 | g_setenv ("G_MESSAGES_DEBUG", new_g_messages_debug, TRUE); 64 | 65 | g_free (new_g_messages_debug); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /libpeas/peas-debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-debug.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | 25 | #pragma once 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | void peas_debug_init (void); 32 | 33 | G_END_DECLS 34 | -------------------------------------------------------------------------------- /libpeas/peas-dirs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-dirs.c 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 Ignacio Casal Quinteiro 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "peas-dirs.h" 27 | 28 | #ifdef OS_OSX 29 | #include "peas-utils-osx.h" 30 | #endif 31 | 32 | #ifdef G_OS_WIN32 33 | // inspired by gobject-introspection... 34 | 35 | #define WIN32_LEAN_AND_MEAN 36 | #include 37 | 38 | static HMODULE libpeas_dll = NULL; 39 | 40 | #ifdef DLL_EXPORT 41 | 42 | BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); 43 | 44 | BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 45 | { 46 | if (fdwReason == DLL_PROCESS_ATTACH) 47 | libpeas_dll = hinstDLL; 48 | return TRUE; 49 | } 50 | 51 | #endif 52 | #endif 53 | 54 | char * 55 | peas_dirs_get_data_dir (void) 56 | { 57 | char *data_dir; 58 | 59 | #ifdef G_OS_WIN32 60 | char *win32_dir; 61 | 62 | win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll); 63 | 64 | data_dir = g_build_filename (win32_dir, "share", "libpeas-2", NULL); 65 | g_free (win32_dir); 66 | #elif defined (OS_OSX) 67 | data_dir = peas_dirs_os_x_get_data_dir (); 68 | #else 69 | data_dir = g_build_filename (DATADIR, "libpeas-2", NULL); 70 | #endif 71 | 72 | return data_dir; 73 | } 74 | 75 | char * 76 | peas_dirs_get_lib_dir (void) 77 | { 78 | char *lib_dir; 79 | 80 | #ifdef G_OS_WIN32 81 | char *win32_dir; 82 | 83 | win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll); 84 | 85 | lib_dir = g_build_filename (win32_dir, "lib", "libpeas-2", NULL); 86 | g_free (win32_dir); 87 | #elif defined (OS_OSX) 88 | lib_dir = peas_dirs_os_x_get_lib_dir (); 89 | #else 90 | lib_dir = g_build_filename (LIBDIR, "libpeas-2", NULL); 91 | #endif 92 | 93 | return lib_dir; 94 | } 95 | 96 | char * 97 | peas_dirs_get_plugin_loader_dir (const char *loader_name) 98 | { 99 | const char *env_var; 100 | char *lib_dir; 101 | char *loader_dir; 102 | 103 | env_var = g_getenv ("PEAS_PLUGIN_LOADERS_DIR"); 104 | if (env_var != NULL) 105 | return g_build_filename (env_var, loader_name, NULL); 106 | 107 | lib_dir = peas_dirs_get_lib_dir (); 108 | loader_dir = g_build_filename (lib_dir, "loaders", NULL); 109 | 110 | g_free (lib_dir); 111 | 112 | return loader_dir; 113 | } 114 | 115 | char * 116 | peas_dirs_get_locale_dir (void) 117 | { 118 | char *locale_dir; 119 | 120 | #ifdef G_OS_WIN32 121 | char *win32_dir; 122 | 123 | win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll); 124 | 125 | locale_dir = g_build_filename (win32_dir, "share", "locale", NULL); 126 | 127 | g_free (win32_dir); 128 | #elif defined (OS_OSX) 129 | locale_dir = peas_dirs_os_x_get_locale_dir (); 130 | #else 131 | locale_dir = g_build_filename (DATADIR, "locale", NULL); 132 | #endif 133 | 134 | return locale_dir; 135 | } 136 | -------------------------------------------------------------------------------- /libpeas/peas-dirs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-dirs.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 Ignacio Casal Quinteiro 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | 25 | #pragma once 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | char *peas_dirs_get_data_dir (void); 32 | char *peas_dirs_get_lib_dir (void); 33 | char *peas_dirs_get_plugin_loader_dir (const char *loader_name); 34 | char *peas_dirs_get_locale_dir (void); 35 | 36 | G_END_DECLS 37 | -------------------------------------------------------------------------------- /libpeas/peas-engine-priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-engine-priv.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "peas-engine.h" 29 | #include "peas-plugin-info.h" 30 | #include "peas-version-macros.h" 31 | 32 | G_BEGIN_DECLS 33 | 34 | PEAS_AVAILABLE_IN_ALL 35 | void _peas_engine_shutdown (void); 36 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 37 | GObject *_peas_engine_create_extensionv (PeasEngine *engine, 38 | PeasPluginInfo *info, 39 | GType extension_type, 40 | guint n_parameters, 41 | GParameter *parameters); 42 | G_GNUC_END_IGNORE_DEPRECATIONS 43 | 44 | G_END_DECLS 45 | -------------------------------------------------------------------------------- /libpeas/peas-extension-base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-extension-base.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2002-2005 - Paolo Maggi 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #if !defined (LIBPEAS_INSIDE) && !defined (LIBPEAS_COMPILATION) 27 | # error "Only can be included directly." 28 | #endif 29 | 30 | #include 31 | 32 | #include "peas-plugin-info.h" 33 | #include "peas-version-macros.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | #define PEAS_TYPE_EXTENSION_BASE (peas_extension_base_get_type()) 38 | 39 | PEAS_AVAILABLE_IN_ALL 40 | G_DECLARE_DERIVABLE_TYPE (PeasExtensionBase, peas_extension_base, PEAS, EXTENSION_BASE, GObject) 41 | 42 | /** 43 | * PeasExtensionBaseClass: 44 | * @parent_class: The parent class. 45 | * 46 | * The class structure of #PeasExtensionBase. 47 | */ 48 | struct _PeasExtensionBaseClass 49 | { 50 | GObjectClass parent_class; 51 | 52 | /*< private >*/ 53 | gpointer _reserved[8]; 54 | }; 55 | 56 | PEAS_AVAILABLE_IN_ALL 57 | PeasPluginInfo *peas_extension_base_get_plugin_info (PeasExtensionBase *extbase); 58 | PEAS_AVAILABLE_IN_ALL 59 | char *peas_extension_base_get_data_dir (PeasExtensionBase *extbase); 60 | 61 | G_END_DECLS 62 | -------------------------------------------------------------------------------- /libpeas/peas-extension-set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-extension-set.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Steve Frécinaux 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #if !defined (LIBPEAS_INSIDE) && !defined (LIBPEAS_COMPILATION) 27 | # error "Only can be included directly." 28 | #endif 29 | 30 | #include 31 | 32 | #include "peas-engine.h" 33 | #include "peas-version-macros.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | #define PEAS_TYPE_EXTENSION_SET (peas_extension_set_get_type()) 38 | 39 | PEAS_AVAILABLE_IN_ALL 40 | G_DECLARE_FINAL_TYPE (PeasExtensionSet, peas_extension_set, PEAS, EXTENSION_SET, GObject) 41 | 42 | /** 43 | * PeasExtensionSetForeachFunc: 44 | * @set: A #PeasExtensionSet. 45 | * @info: A #PeasPluginInfo. 46 | * @extension: The extension instance. 47 | * @data: Optional data passed to the function. 48 | * 49 | * This function is passed to [method@ExtensionSet.foreach] and 50 | * will be called for each extension in @set. 51 | */ 52 | typedef void (*PeasExtensionSetForeachFunc) (PeasExtensionSet *set, 53 | PeasPluginInfo *info, 54 | GObject *extension, 55 | gpointer data); 56 | 57 | PEAS_AVAILABLE_IN_ALL 58 | void peas_extension_set_foreach (PeasExtensionSet *set, 59 | PeasExtensionSetForeachFunc func, 60 | gpointer data); 61 | PEAS_AVAILABLE_IN_ALL 62 | GObject *peas_extension_set_get_extension (PeasExtensionSet *set, 63 | PeasPluginInfo *info); 64 | PEAS_AVAILABLE_IN_ALL 65 | PeasExtensionSet *peas_extension_set_new_with_properties (PeasEngine *engine, 66 | GType exten_type, 67 | guint n_properties, 68 | const char **prop_names, 69 | const GValue *prop_values); 70 | PEAS_AVAILABLE_IN_ALL 71 | PeasExtensionSet *peas_extension_set_new_valist (PeasEngine *engine, 72 | GType exten_type, 73 | const char *first_property, 74 | va_list var_args); 75 | PEAS_AVAILABLE_IN_ALL 76 | PeasExtensionSet *peas_extension_set_new (PeasEngine *engine, 77 | GType exten_type, 78 | const char *first_property, 79 | ...); 80 | 81 | G_END_DECLS 82 | -------------------------------------------------------------------------------- /libpeas/peas-i18n-priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation 3 | * All rights reserved. 4 | * 5 | * libpeas is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * libpeas 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 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | * 19 | * SPDX-License-Identifier: LGPL-2.1-or-later 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define _(s) g_dgettext(GETTEXT_PACKAGE, s) 29 | #define I_(s) g_intern_string(s) 30 | 31 | G_END_DECLS 32 | -------------------------------------------------------------------------------- /libpeas/peas-i18n.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation 3 | * All rights reserved. 4 | * 5 | * libpeas is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * libpeas 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 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | * 19 | * SPDX-License-Identifier: LGPL-2.1-or-later 20 | */ 21 | 22 | #include "config.h" 23 | 24 | #include 25 | #include 26 | 27 | #include "peas-dirs.h" 28 | 29 | #include "gconstructor.h" 30 | 31 | #if defined (G_HAS_CONSTRUCTORS) 32 | # ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 33 | # pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(peas_init_ctor) 34 | # endif 35 | G_DEFINE_CONSTRUCTOR(peas_init_ctor) 36 | #else 37 | # error Your platform/compiler is missing constructor support 38 | #endif 39 | 40 | static void 41 | peas_init_ctor (void) 42 | { 43 | char *locale_dir = peas_dirs_get_locale_dir (); 44 | 45 | bindtextdomain (GETTEXT_PACKAGE, locale_dir); 46 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 47 | 48 | g_free (locale_dir); 49 | } 50 | -------------------------------------------------------------------------------- /libpeas/peas-marshal.list: -------------------------------------------------------------------------------- 1 | VOID:OBJECT 2 | VOID:OBJECT,OBJECT 3 | -------------------------------------------------------------------------------- /libpeas/peas-plugin-info-priv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-info-priv.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2002-2005 - Paolo Maggi 6 | * Copyright (C) 2007 - Steve Frécinaux 7 | * 8 | * libpeas is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * libpeas is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 | * 22 | * SPDX-License-Identifier: LGPL-2.1-or-later 23 | */ 24 | 25 | #pragma once 26 | 27 | #include "peas-plugin-info.h" 28 | 29 | struct _PeasPluginInfo { 30 | GObject parent_instance; 31 | 32 | /*< private >*/ 33 | 34 | /* Used and managed by PeasPluginLoader */ 35 | gpointer loader_data; 36 | 37 | char *filename; 38 | char *module_dir; 39 | char *data_dir; 40 | 41 | int loader_id; 42 | char *embedded; 43 | char *module_name; 44 | char **dependencies; 45 | 46 | char *name; 47 | char *desc; 48 | char *icon_name; 49 | char **authors; 50 | char *copyright; 51 | char *website; 52 | char *version; 53 | char *help_uri; 54 | 55 | GHashTable *external_data; 56 | 57 | GPtrArray *resources; 58 | GSettingsSchemaSource *schema_source; 59 | 60 | GError *error; 61 | 62 | guint loaded : 1; 63 | /* A plugin is unavailable if it is not possible to load it 64 | due to an error loading the plugin module (e.g. for Python plugins 65 | when the interpreter has not been correctly initializated) */ 66 | guint available : 1; 67 | 68 | guint builtin : 1; 69 | guint hidden : 1; 70 | }; 71 | 72 | PeasPluginInfo *_peas_plugin_info_new (const char *filename, 73 | const char *module_dir, 74 | const char *data_dir); 75 | -------------------------------------------------------------------------------- /libpeas/peas-plugin-loader-c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-loader-c.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 - Jesse van den Kieboom 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "peas-plugin-loader.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define PEAS_TYPE_PLUGIN_LOADER_C (peas_plugin_loader_c_get_type()) 31 | 32 | G_DECLARE_FINAL_TYPE (PeasPluginLoaderC, peas_plugin_loader_c, PEAS, PLUGIN_LOADER_C, PeasPluginLoader) 33 | 34 | PeasPluginLoader *peas_plugin_loader_c_new (void); 35 | 36 | G_END_DECLS 37 | -------------------------------------------------------------------------------- /libpeas/peas-plugin-loader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-loader.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 - Jesse van den Kieboom 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | #include "peas-plugin-info.h" 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define PEAS_TYPE_PLUGIN_LOADER (peas_plugin_loader_get_type()) 34 | 35 | PEAS_AVAILABLE_IN_ALL 36 | G_DECLARE_DERIVABLE_TYPE (PeasPluginLoader, peas_plugin_loader, PEAS, PLUGIN_LOADER, GObject) 37 | 38 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 39 | struct _PeasPluginLoaderClass { 40 | GObjectClass parent; 41 | 42 | gboolean (*initialize) (PeasPluginLoader *loader); 43 | gboolean (*is_global) (PeasPluginLoader *loader); 44 | gboolean (*load) (PeasPluginLoader *loader, 45 | PeasPluginInfo *info); 46 | void (*unload) (PeasPluginLoader *loader, 47 | PeasPluginInfo *info); 48 | gboolean (*provides_extension) (PeasPluginLoader *loader, 49 | PeasPluginInfo *info, 50 | GType ext_type); 51 | GObject *(*create_extension) (PeasPluginLoader *loader, 52 | PeasPluginInfo *info, 53 | GType ext_type, 54 | guint n_parameters, 55 | GParameter *parameters); 56 | void (*garbage_collect) (PeasPluginLoader *loader); 57 | 58 | /*< private >*/ 59 | gpointer _reserved[8]; 60 | }; 61 | G_GNUC_END_IGNORE_DEPRECATIONS 62 | 63 | PEAS_AVAILABLE_IN_ALL 64 | gboolean peas_plugin_loader_initialize (PeasPluginLoader *loader); 65 | PEAS_AVAILABLE_IN_ALL 66 | gboolean peas_plugin_loader_is_global (PeasPluginLoader *loader); 67 | PEAS_AVAILABLE_IN_ALL 68 | gboolean peas_plugin_loader_load (PeasPluginLoader *loader, 69 | PeasPluginInfo *info); 70 | PEAS_AVAILABLE_IN_ALL 71 | void peas_plugin_loader_unload (PeasPluginLoader *loader, 72 | PeasPluginInfo *info); 73 | PEAS_AVAILABLE_IN_ALL 74 | gboolean peas_plugin_loader_provides_extension (PeasPluginLoader *loader, 75 | PeasPluginInfo *info, 76 | GType ext_type); 77 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 78 | PEAS_AVAILABLE_IN_ALL 79 | GObject *peas_plugin_loader_create_extension (PeasPluginLoader *loader, 80 | PeasPluginInfo *info, 81 | GType ext_type, 82 | guint n_parameters, 83 | GParameter *parameters); 84 | G_GNUC_END_IGNORE_DEPRECATIONS 85 | PEAS_AVAILABLE_IN_ALL 86 | void peas_plugin_loader_garbage_collect (PeasPluginLoader *loader); 87 | 88 | G_END_DECLS 89 | -------------------------------------------------------------------------------- /libpeas/peas-utils-osx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-utils-osx.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 Ignacio Casal Quinteiro 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Author: Tom Schoonjans 22 | * 23 | * SPDX-License-Identifier: LGPL-2.1-or-later 24 | */ 25 | #pragma once 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | char *peas_dirs_os_x_get_bundle_resource_dir (void); 32 | char *peas_dirs_os_x_get_resource_dir (const char *subdir, 33 | const char *default_dir); 34 | char *peas_dirs_os_x_get_data_dir (void); 35 | char *peas_dirs_os_x_get_lib_dir (void); 36 | char *peas_dirs_os_x_get_locale_dir (void); 37 | void peas_open_url_osx (const char *uri); 38 | 39 | G_END_DECLS 40 | -------------------------------------------------------------------------------- /libpeas/peas-utils-osx.m: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-utils-osx.m 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 Ignacio Casal Quinteiro 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Author: Tom Schoonjans 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "peas-utils-osx.h" 27 | 28 | #import 29 | 30 | #import 31 | 32 | void 33 | peas_open_url_osx (const char *uri) 34 | { 35 | [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:uri]]]; 36 | } 37 | 38 | char * 39 | peas_dirs_os_x_get_bundle_resource_dir (void) 40 | { 41 | NSAutoreleasePool *pool; 42 | char *str = NULL; 43 | NSString *path; 44 | 45 | pool = [[NSAutoreleasePool alloc] init]; 46 | 47 | if ([[NSBundle mainBundle] bundleIdentifier] == nil) 48 | { 49 | [pool release]; 50 | return NULL; 51 | } 52 | 53 | path = [[NSBundle mainBundle] resourcePath]; 54 | 55 | if (!path) 56 | { 57 | [pool release]; 58 | return NULL; 59 | } 60 | 61 | str = g_strdup ([path UTF8String]); 62 | [pool release]; 63 | return str; 64 | } 65 | 66 | char * 67 | peas_dirs_os_x_get_resource_dir (const char *subdir, 68 | const char *default_dir) 69 | { 70 | char *res_dir; 71 | char *ret; 72 | 73 | res_dir = peas_dirs_os_x_get_bundle_resource_dir (); 74 | 75 | if (res_dir == NULL) 76 | { 77 | ret = g_build_filename (default_dir, "libpeas-1.0", NULL); 78 | } 79 | else 80 | { 81 | ret = g_build_filename (res_dir, subdir, "libpeas-1.0", NULL); 82 | g_free (res_dir); 83 | } 84 | 85 | return ret; 86 | } 87 | 88 | char * 89 | peas_dirs_os_x_get_data_dir (void) 90 | { 91 | return peas_dirs_os_x_get_resource_dir ("share", DATADIR); 92 | } 93 | 94 | char * 95 | peas_dirs_os_x_get_lib_dir (void) 96 | { 97 | return peas_dirs_os_x_get_resource_dir ("lib", LIBDIR); 98 | } 99 | 100 | char * 101 | peas_dirs_os_x_get_locale_dir (void) 102 | { 103 | char *res_dir; 104 | char *ret; 105 | 106 | res_dir = peas_dirs_os_x_get_bundle_resource_dir (); 107 | 108 | if (res_dir == NULL) 109 | { 110 | ret = g_build_filename (DATADIR, "locale", NULL); 111 | } 112 | else 113 | { 114 | ret = g_build_filename (res_dir, "share", "locale", NULL); 115 | g_free (res_dir); 116 | } 117 | 118 | return ret; 119 | } 120 | -------------------------------------------------------------------------------- /libpeas/peas-utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-utils.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 Steve Frécinaux 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #define PEAS_UTILS_C_LOADER_ID 0 29 | #define PEAS_UTILS_N_LOADERS 4 30 | #define PEAS_UTILS_GJS_LOADER_ID 3 31 | 32 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 33 | gboolean peas_utils_properties_array_to_parameter_list (GType exten_type, 34 | guint n_properties, 35 | const char **prop_names, 36 | const GValue *prop_values, 37 | GParameter *params); 38 | gboolean peas_utils_valist_to_parameter_list (GType exten_type, 39 | const char *first_property, 40 | va_list var_args, 41 | GParameter **params, 42 | guint *n_params); 43 | G_GNUC_END_IGNORE_DEPRECATIONS 44 | int peas_utils_get_loader_id (const char *loader) G_GNUC_CONST; 45 | const char *peas_utils_get_loader_from_id (int loader_id) G_GNUC_CONST; 46 | const char *peas_utils_get_loader_module_from_id (int loader_id) G_GNUC_CONST; 47 | const int *peas_utils_get_conflicting_loaders_from_id (int loader_id) G_GNUC_CONST; 48 | -------------------------------------------------------------------------------- /libpeas/peas-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-version.h 3 | * This file is part of libpeas 4 | * 5 | * libpeas is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * libpeas 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 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef __PEAS_VERSION_H__ 21 | #define __PEAS_VERSION_H__ 22 | 23 | /** 24 | * PEAS_MAJOR_VERSION: 25 | * 26 | * Peas major version component (e.g. 1 if %PEAS_VERSION is 1.2.3) 27 | */ 28 | #define PEAS_MAJOR_VERSION (@PEAS_MAJOR_VERSION@) 29 | 30 | /** 31 | * PEAS_MINOR_VERSION: 32 | * 33 | * Peas minor version component (e.g. 2 if %PEAS_VERSION is 1.2.3) 34 | */ 35 | #define PEAS_MINOR_VERSION (@PEAS_MINOR_VERSION@) 36 | 37 | /** 38 | * PEAS_MICRO_VERSION: 39 | * 40 | * Peas micro version component (e.g. 3 if %PEAS_VERSION is 1.2.3) 41 | */ 42 | #define PEAS_MICRO_VERSION (@PEAS_MICRO_VERSION@) 43 | 44 | /** 45 | * PEAS_VERSION: 46 | * 47 | * Peas version. 48 | */ 49 | #define PEAS_VERSION (@PEAS_VERSION@) 50 | 51 | /** 52 | * PEAS_VERSION_S: 53 | * 54 | * Peas version, encoded as a string, useful for printing and 55 | * concatenation. 56 | */ 57 | #define PEAS_VERSION_S "@PEAS_VERSION@" 58 | 59 | #define PEAS_ENCODE_VERSION(major,minor,micro) \ 60 | ((major) << 24 | (minor) << 16 | (micro) << 8) 61 | 62 | /** 63 | * PEAS_VERSION_HEX: 64 | * 65 | * Peas version, encoded as an hexadecimal number, useful for 66 | * integer comparisons. 67 | */ 68 | #define PEAS_VERSION_HEX \ 69 | (PEAS_ENCODE_VERSION (PEAS_MAJOR_VERSION, PEAS_MINOR_VERSION, PEAS_MICRO_VERSION)) 70 | 71 | /** 72 | * PEAS_CHECK_VERSION: 73 | * @major: required major version 74 | * @minor: required minor version 75 | * @micro: required micro version 76 | * 77 | * Compile-time version checking. Evaluates to %TRUE if the version 78 | * of peas is greater than the required one. 79 | */ 80 | #define PEAS_CHECK_VERSION(major,minor,micro) \ 81 | (PEAS_MAJOR_VERSION > (major) || \ 82 | (PEAS_MAJOR_VERSION == (major) && PEAS_MINOR_VERSION > (minor)) || \ 83 | (PEAS_MAJOR_VERSION == (major) && PEAS_MINOR_VERSION == (minor) && \ 84 | PEAS_MICRO_VERSION >= (micro))) 85 | 86 | #endif /* __PEAS_VERSION_H__ */ 87 | -------------------------------------------------------------------------------- /license_change: -------------------------------------------------------------------------------- 1 | Ignacio Casal Quinteiro: Friday 30th Octuber 2009 2 | - Changed license from GPL to LGPL 3 | (See https://bugzilla.gnome.org/show_bug.cgi?id=599120 for details) 4 | This was done with the permission of all copyright holders as listed below: 5 | 6 | Paolo Maggi 7 | Paolo Borelli 8 | Jesse van den Kieboom 9 | Steve Frécinaux 10 | Ignacio Casal Quinteiro 11 | Raphaël Slinckx 12 | James Willcox 13 | Adam Hooper 14 | Christian Persch 16 | Marco Pesenti Gritti 17 | -------------------------------------------------------------------------------- /loaders/gjs/meson.build: -------------------------------------------------------------------------------- 1 | add_languages('cpp') 2 | 3 | cxx = meson.get_compiler('cpp') 4 | 5 | gjs_loader_name = 'gjsloader' 6 | 7 | gjs_loader_c = files( 8 | 'peas-plugin-loader-gjs.cpp', 9 | ) 10 | 11 | gjs_loader_deps = [ 12 | libpeas_dep, 13 | gjs_dep, 14 | mozjs_dep, 15 | ] 16 | 17 | gjs_loader_c_args = [ 18 | '-DPEAS_LOCALEDIR="@0@"'.format(localedir), 19 | ] 20 | 21 | gjs_loader_cpp_args = [] 22 | test_cpp_args = [] 23 | if cxx.get_argument_syntax() == 'msvc' 24 | # Visual Studio and clang-cl use the Windows SDK, which has no ssize_t 25 | test_cpp_args += ['-Dssize_t=gssize'] 26 | if cxx.get_id() == 'msvc' 27 | # We need additional flags for building with Visual C++ to use the 28 | # SpiderMonkey headers 29 | test_cpp_args += [ 30 | '-Zc:externConstexpr', # Required for 'extern constexpr' on MSVC 31 | '-Zc:preprocessor', # Required to consume the mozjs-102 headers on MSVC 32 | ] 33 | endif 34 | endif 35 | if cxx.get_id() != 'msvc' 36 | test_cpp_args += [ 37 | '-Wno-missing-field-initializers', 38 | '-Wno-unused-parameter', 39 | ] 40 | endif 41 | 42 | foreach arg: test_cpp_args 43 | if cxx.has_multi_arguments(arg) 44 | gjs_loader_cpp_args += arg 45 | endif 46 | endforeach 47 | 48 | 49 | gjs_loader_sha = shared_module( 50 | gjs_loader_name, 51 | gjs_loader_c, 52 | include_directories: rootdir, 53 | dependencies: gjs_loader_deps, 54 | c_args: project_c_args + gjs_loader_c_args, 55 | cpp_args: gjs_loader_cpp_args, 56 | install: true, 57 | install_dir: join_paths( 58 | pkglibdir, 59 | 'loaders', 60 | ), 61 | name_suffix: module_suffix, 62 | gnu_symbol_visibility: 'hidden' 63 | ) 64 | -------------------------------------------------------------------------------- /loaders/gjs/peas-plugin-loader-gjs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-loader-gjs.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright 2023 Christian Hergert 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #pragma once 23 | 24 | #include 25 | 26 | #include "libpeas/peas-plugin-loader.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define PEAS_TYPE_PLUGIN_LOADER_GJS (peas_plugin_loader_gjs_get_type()) 31 | 32 | G_DECLARE_FINAL_TYPE (PeasPluginLoaderGjs, peas_plugin_loader_gjs, PEAS, PLUGIN_LOADER_GJS, PeasPluginLoader) 33 | 34 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 35 | 36 | G_END_DECLS 37 | -------------------------------------------------------------------------------- /loaders/lua5.1/meson.build: -------------------------------------------------------------------------------- 1 | lua51_loader_name = 'lua51loader' 2 | 3 | lua51_lgi_version = lua51_lgi_dep.version() 4 | lua51_lgi_version_arr = lua51_lgi_version.split('.') 5 | lua51_lgi_version_major = lua51_lgi_version_arr[0].to_int() 6 | lua51_lgi_version_minor = lua51_lgi_version_arr[1].to_int() 7 | lua51_lgi_version_micro = lua51_lgi_version_arr[2].to_int() 8 | 9 | lua51_loader_c = files( 10 | 'peas-lua-internal.c', 11 | 'peas-lua-utils.c', 12 | 'peas-plugin-loader-lua.c', 13 | ) 14 | 15 | subdir('resources') # Declares 'lua51_loader_res' 16 | 17 | lua51_loader_deps = [ 18 | libpeas_dep, 19 | lua51_dep, 20 | lua51_lgi_dep, 21 | luajit_dep, 22 | ] 23 | 24 | lua51_loader_c_args = [ 25 | '-DLGI_MAJOR_VERSION=@0@'.format(lua51_lgi_version_major), 26 | '-DLGI_MINOR_VERSION=@0@'.format(lua51_lgi_version_minor), 27 | '-DLGI_MICRO_VERSION=@0@'.format(lua51_lgi_version_micro), 28 | ] 29 | 30 | lua51_loader_sha = shared_module( 31 | lua51_loader_name, 32 | lua51_loader_c + lua51_loader_res, 33 | include_directories: rootdir, 34 | dependencies: lua51_loader_deps, 35 | c_args: lua51_loader_c_args, 36 | install: true, 37 | install_dir: join_paths( 38 | pkglibdir, 39 | 'loaders', 40 | ), 41 | name_suffix: module_suffix, 42 | gnu_symbol_visibility: 'hidden', 43 | ) 44 | -------------------------------------------------------------------------------- /loaders/lua5.1/peas-lua-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-lua-internal.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2015 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | gboolean peas_lua_internal_setup (lua_State *L); 32 | void peas_lua_internal_shutdown (lua_State *L); 33 | gboolean peas_lua_internal_call (lua_State *L, 34 | const char *name, 35 | guint n_args, 36 | int return_type); 37 | 38 | G_END_DECLS 39 | -------------------------------------------------------------------------------- /loaders/lua5.1/peas-lua-utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-lua-utils.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2014-2015 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | 32 | gboolean peas_lua_utils_require (lua_State *L, 33 | const char *name); 34 | gboolean peas_lua_utils_check_version (lua_State *L, 35 | guint req_major, 36 | guint req_minor, 37 | guint req_micro); 38 | gboolean peas_lua_utils_call (lua_State *L, 39 | guint n_args, 40 | guint n_results); 41 | gboolean peas_lua_utils_load_resource (lua_State *L, 42 | const char *name, 43 | guint n_args, 44 | guint n_results); 45 | 46 | G_END_DECLS 47 | -------------------------------------------------------------------------------- /loaders/lua5.1/peas-plugin-loader-lua.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-loader-lua.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2014 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define PEAS_TYPE_PLUGIN_LOADER_LUA (peas_plugin_loader_lua_get_type ()) 32 | #define PEAS_PLUGIN_LOADER_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLua)) 33 | #define PEAS_PLUGIN_LOADER_LUA_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLua const)) 34 | #define PEAS_PLUGIN_LOADER_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLuaClass)) 35 | #define PEAS_IS_PLUGIN_LOADER_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA)) 36 | #define PEAS_IS_PLUGIN_LOADER_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PEAS_TYPE_PLUGIN_LOADER_LUA)) 37 | #define PEAS_PLUGIN_LOADER_LUA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PEAS_TYPE_PLUGIN_LOADER_LUA, PeasPluginLoaderLuaClass)) 38 | 39 | typedef struct _PeasPluginLoaderLua PeasPluginLoaderLua; 40 | typedef struct _PeasPluginLoaderLuaClass PeasPluginLoaderLuaClass; 41 | 42 | struct _PeasPluginLoaderLua { 43 | PeasPluginLoader parent; 44 | }; 45 | 46 | struct _PeasPluginLoaderLuaClass { 47 | PeasPluginLoaderClass parent_class; 48 | }; 49 | 50 | GType peas_plugin_loader_lua_get_type (void) G_GNUC_CONST; 51 | 52 | /* All the loaders must implement this function */ 53 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 54 | 55 | G_END_DECLS 56 | -------------------------------------------------------------------------------- /loaders/lua5.1/resources/meson.build: -------------------------------------------------------------------------------- 1 | lua51_loader_res = gnome.compile_resources( 2 | 'peas-lua-resources', 3 | 'peas-lua.gresource.xml', 4 | export: false, 5 | ) 6 | -------------------------------------------------------------------------------- /loaders/lua5.1/resources/peas-lua-compile.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright (C) 2015 - Garrett Regier 3 | -- 4 | -- libpeas 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 2.1 of the License, or (at your option) any later version. 8 | -- 9 | -- libpeas 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 St, Fifth Floor, Boston, MA 02110-1301 USA. 17 | 18 | local io = require 'io' 19 | local os = require 'os' 20 | 21 | 22 | local function check(err, format, ...) 23 | if err == nil then 24 | return 25 | end 26 | 27 | io.stderr:write(('Error: %s:\n%s\n'):format(format:format(...), err)) 28 | os.exit(1) 29 | end 30 | 31 | 32 | local function main(arg) 33 | for i = 1, #arg, 2 do 34 | local filename = arg[i] 35 | local output = arg[i + 1] 36 | 37 | local input_file, err = io.open(filename, 'rb') 38 | check(err, 'Failed to open file "%s"', filename) 39 | 40 | -- Error includes the filename 41 | local compiled, err = loadstring(input_file:read('*a'), 42 | '@' .. filename) 43 | check(err, 'Invalid Lua file') 44 | 45 | local f, err = io.open(output, 'wb') 46 | check(err, 'Failed to open file "%s"', output) 47 | 48 | local success, err = f:write(string.dump(compiled)) 49 | check(err, 'Failed to write to "%s"', output) 50 | 51 | local success, err = f:close() 52 | check(err, 'Failed to save "%s"', output) 53 | end 54 | end 55 | 56 | 57 | os.exit(main(arg) or 0) 58 | 59 | -- ex:ts=4:et: 60 | -------------------------------------------------------------------------------- /loaders/lua5.1/resources/peas-lua-strict.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright (C) 2015 - Garrett Regier 3 | -- 4 | -- libpeas 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 2.1 of the License, or (at your option) any later version. 8 | -- 9 | -- libpeas 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 St, Fifth Floor, Boston, MA 02110-1301 USA. 17 | -- 18 | -- Modified version of: http://metalua.luaforge.net/src/lib/strict.lua.html 19 | 20 | __STRICT = true 21 | 22 | local mt = getmetatable(_G) 23 | if mt == nil then 24 | mt = {} 25 | setmetatable(_G, mt) 26 | end 27 | 28 | function mt:__newindex(name, value) 29 | if __STRICT then 30 | local what = debug.getinfo(2, 'S').what 31 | 32 | if what ~= 'C' then 33 | error("Attempted to create global variable '" .. 34 | tostring(name) .. "'", 2) 35 | end 36 | end 37 | 38 | rawset(self, name, value) 39 | end 40 | 41 | function mt:__index(name) 42 | if not __STRICT or debug.getinfo(2, 'S').what == 'C' then 43 | return rawget(self, name) 44 | end 45 | 46 | error("Attempted to access nonexistent " .. 47 | "global variable '" .. tostring(name) .. "'", 2) 48 | end 49 | 50 | -- ex:ts=4:et: 51 | -------------------------------------------------------------------------------- /loaders/lua5.1/resources/peas-lua.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | peas-lua-internal.lua 5 | peas-lua-strict.lua 6 | 7 | 8 | -------------------------------------------------------------------------------- /loaders/meson.build: -------------------------------------------------------------------------------- 1 | if build_lua51_loader == true 2 | subdir('lua5.1') 3 | endif 4 | 5 | if build_python3_loader == true 6 | subdir('python') 7 | endif 8 | 9 | if build_gjs_loader == true 10 | subdir('gjs') 11 | endif 12 | -------------------------------------------------------------------------------- /loaders/python/meson.build: -------------------------------------------------------------------------------- 1 | python3_loader_name = 'pythonloader' 2 | 3 | pygobject_version = pygobject_dep.version() 4 | pygobject_version_arr = pygobject_version.split('.') 5 | pygobject_version_major = pygobject_version_arr[0].to_int() 6 | pygobject_version_minor = pygobject_version_arr[1].to_int() 7 | pygobject_version_micro = pygobject_version_arr[2].to_int() 8 | 9 | python3_loader_c = files( 10 | 'peas-plugin-loader-python.c', 11 | 'peas-python-internal.c', 12 | ) 13 | 14 | python3_loader_res = gnome.compile_resources( 15 | 'peas-python-resources', 16 | 'peas-python.gresource.xml', 17 | export: false, 18 | ) 19 | 20 | python3_loader_deps = [ 21 | libpeas_dep, 22 | python3_dep, 23 | pygobject_dep, 24 | ] 25 | 26 | python3_loader_c_args = [ 27 | '-DPEAS_LOCALEDIR="@0@"'.format(localedir), 28 | '-DPYGOBJECT_MAJOR_VERSION=@0@'.format(pygobject_version_major), 29 | '-DPYGOBJECT_MINOR_VERSION=@0@'.format(pygobject_version_minor), 30 | '-DPYGOBJECT_MICRO_VERSION=@0@'.format(pygobject_version_micro), 31 | ] 32 | 33 | python3_loader_sha = shared_module( 34 | python3_loader_name, 35 | python3_loader_c + python3_loader_res, 36 | include_directories: rootdir, 37 | dependencies: python3_loader_deps, 38 | c_args: python3_loader_c_args, 39 | install: true, 40 | install_dir: join_paths( 41 | pkglibdir, 42 | 'loaders', 43 | ), 44 | name_suffix: module_suffix, 45 | gnu_symbol_visibility: 'hidden', 46 | ) 47 | -------------------------------------------------------------------------------- /loaders/python/peas-plugin-loader-python.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-plugin-loader-python.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2008 - Jesse van den Kieboom 6 | * Copyright (C) 2009 - Steve Frécinaux 7 | * 8 | * libpeas is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * libpeas is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 | * 22 | * SPDX-License-Identifier: LGPL-2.1-or-later 23 | */ 24 | 25 | #pragma once 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define PEAS_TYPE_PLUGIN_LOADER_PYTHON (peas_plugin_loader_python_get_type()) 33 | 34 | G_DECLARE_FINAL_TYPE (PeasPluginLoaderPython, peas_plugin_loader_python, PEAS, PLUGIN_LOADER_PYTHON, PeasPluginLoader) 35 | 36 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 37 | 38 | G_END_DECLS 39 | -------------------------------------------------------------------------------- /loaders/python/peas-python-compile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright (C) 2015 - Garrett Regier 4 | # 5 | # libpeas is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # libpeas 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 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 | 19 | import marshal 20 | import sys 21 | import traceback 22 | 23 | 24 | def compile_file(filename, output): 25 | """Byte-compiles a Python source file to Python bytecode. 26 | 27 | Unlike py_compile the output is not prefixed 28 | by a magic value, mtime or size. 29 | """ 30 | # Open with universal newlines 31 | with open(filename, 'U') as f: 32 | code = f.read() + '\n' 33 | 34 | try: 35 | code_object = compile(code, filename, 'exec') 36 | 37 | except (SyntaxError, TypeError) as error: 38 | tb = traceback.format_exc(0).rstrip('\n') 39 | raise Exception('Failed to compile "{0}":\n{1}'.format(filename, tb)) 40 | 41 | with open(output, 'wb') as f: 42 | marshal.dump(code_object, f) 43 | f.flush() 44 | 45 | 46 | def main(args): 47 | try: 48 | for i in range(0, len(args), 2): 49 | compile_file(args[i], args[i + 1]) 50 | 51 | except Exception as error: 52 | sys.exit('Error: {0!s}'.format(error)) 53 | 54 | 55 | if __name__ == '__main__': 56 | sys.exit(main(sys.argv[1:])) 57 | 58 | # ex:ts=4:et: 59 | -------------------------------------------------------------------------------- /loaders/python/peas-python-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-python-internal.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2015 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | /* Disable redundant-decls warning introduced in Python 3.12 */ 29 | #pragma GCC diagnostic push 30 | #pragma GCC diagnostic ignored "-Wredundant-decls" 31 | /* _POSIX_C_SOURCE is defined in Python.h and in limits.h included by 32 | * glib-object.h, so we unset it here to avoid a warning. Yep, that's bad. 33 | */ 34 | #undef _POSIX_C_SOURCE 35 | #include 36 | #pragma GCC diagnostic pop 37 | 38 | G_BEGIN_DECLS 39 | 40 | gboolean peas_python_internal_setup (gboolean already_initialized); 41 | void peas_python_internal_shutdown (void); 42 | PyObject *peas_python_internal_call (const char *name, 43 | PyTypeObject *return_type, 44 | const char *format, 45 | ...); 46 | 47 | G_END_DECLS 48 | -------------------------------------------------------------------------------- /loaders/python/peas-python.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | peas-python-internal.py 5 | 6 | 7 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('gjs', 2 | type: 'boolean', value: true, 3 | description: 'Enable GJS support (requires gjs-1.0)') 4 | 5 | option('lua51', 6 | type: 'boolean', value: true, 7 | description: 'Enable Lua 5.1 support (requires lua-lgi)') 8 | 9 | option('python3', 10 | type: 'boolean', value: true, 11 | description: 'Enable Python 3 support (requires pygobject)') 12 | 13 | option('python3_path', 14 | type: 'string', value: '', 15 | description: 'Path to Python 3.x interpreter to override the default one used') 16 | 17 | option('introspection', 18 | type: 'boolean', value: true, 19 | description: 'Generate introspection data (requires gobject-introspection)') 20 | option('vapi', 21 | type: 'boolean', value: false, 22 | description: 'Generate vapi data (requires vapigen)') 23 | 24 | option('gtk_doc', 25 | type: 'boolean', value: false, 26 | description: 'Build reference manual (requires gi-docgen)') 27 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically 2 | ab 3 | an 4 | ar 5 | as 6 | ast 7 | be 8 | bg 9 | bn 10 | bn_IN 11 | bs 12 | ca 13 | ca@valencia 14 | cs 15 | da 16 | de 17 | el 18 | en_GB 19 | eo 20 | es 21 | et 22 | eu 23 | fa 24 | fi 25 | fr 26 | fur 27 | gl 28 | gu 29 | he 30 | hr 31 | hu 32 | hi 33 | ia 34 | id 35 | ie 36 | is 37 | it 38 | ja 39 | ka 40 | kab 41 | kk 42 | kn 43 | ko 44 | lt 45 | lv 46 | ml 47 | mr 48 | ms 49 | nb 50 | nds 51 | ne 52 | nl 53 | oc 54 | or 55 | pa 56 | pl 57 | pt 58 | pt_BR 59 | ro 60 | ru 61 | sl 62 | sk 63 | sr 64 | sr@latin 65 | sv 66 | ta 67 | te 68 | tg 69 | th 70 | tr 71 | ug 72 | uk 73 | vi 74 | zh_CN 75 | zh_HK 76 | zh_TW 77 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | libpeas/peas-dirs.c 4 | libpeas/peas-engine.c 5 | libpeas/peas-extension-set.c 6 | libpeas/peas-object-module.c 7 | libpeas/peas-plugin-info.c 8 | libpeas/peas-plugin-loader.c 9 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files to skip. 2 | # Please keep this file sorted alphabetically. 3 | -------------------------------------------------------------------------------- /po/bn.po: -------------------------------------------------------------------------------- 1 | # Bengali translation for libpeas. 2 | # Copyright (C) 2011 libpeas's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # Robin Mehdee , 2011. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas master\n" 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" 10 | "product=libpeas&keywords=I18N+L10N&component=general\n" 11 | "POT-Creation-Date: 2011-11-20 14:22+0000\n" 12 | "PO-Revision-Date: 2011-11-28 14:50+0000\n" 13 | "Last-Translator: Robin Mehdee \n" 14 | "Language-Team: Bengali \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: ../data/glade/libpeas-gtk.xml.in.h:1 20 | msgid "Peas Gtk" 21 | msgstr "Peas Gtk" 22 | 23 | #: ../data/glade/libpeas-gtk.xml.in.h:2 24 | msgid "Plugin Manager" 25 | msgstr "প্লাগইন ব্যবস্থাপনা" 26 | 27 | #: ../data/glade/libpeas-gtk.xml.in.h:3 28 | msgid "Plugin Manager View" 29 | msgstr "প্লাগইন ব্যবস্থাপনা প্রদর্শন" 30 | 31 | #. Translators: Whether builtin plugins should appear in the view (property name) 32 | #: ../data/glade/libpeas-gtk.xml.in.h:5 33 | msgid "Show Builtin" 34 | msgstr "বিল্টইন প্রদর্শন করুন" 35 | 36 | #: ../data/glade/libpeas-gtk.xml.in.h:6 37 | msgid "View" 38 | msgstr "প্রদর্শন" 39 | 40 | #: ../libpeas/peas-engine.c:785 41 | #, c-format 42 | msgid "Dependency '%s' was not found" 43 | msgstr "'%s' নির্ভরশীলতা খুঁজে পাওয়া যায়নি" 44 | 45 | #: ../libpeas/peas-engine.c:795 46 | #, c-format 47 | msgid "Dependency '%s' failed to load" 48 | msgstr "'%s' নির্ভরশীলতা লোড করতে ব্যর্থ" 49 | 50 | #: ../libpeas/peas-engine.c:810 51 | #, c-format 52 | msgid "Plugin loader '%s' was not found" 53 | msgstr "'%s' প্লাগইন লোডার খুঁজে পাওয়া যায়নি" 54 | 55 | #: ../libpeas/peas-engine.c:822 56 | #, c-format 57 | msgid "Failed to load" 58 | msgstr "লোড করতে ব্যর্থ" 59 | 60 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:88 61 | msgid "Additional plugins must be disabled" 62 | msgstr "অতিরিক্ত প্লাগইন অবশ্যই নিষ্ক্রিয় করা হবে" 63 | 64 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:95 65 | #, c-format 66 | msgid "The following plugins depend on '%s' and will also be disabled:" 67 | msgstr "নিম্নলিখিত প্লাগইন '%s' এর উপর নির্ভর করে এবং সেইসাথে নিষ্ক্রিয় করা হয়:" 68 | 69 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:137 70 | msgid "Plugins" 71 | msgstr "প্লাগইন" 72 | 73 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:153 74 | msgid "An additional plugin must be disabled" 75 | msgstr "অতিরিক্ত প্লাগইন অবশ্যই নিষ্ক্রিয় করা হবে" 76 | 77 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:160 78 | #, c-format 79 | msgid "" 80 | "The '%s' plugin depends on the '%s' plugin.\n" 81 | "If you disable '%s', '%s' will also be disabled." 82 | msgstr "" 83 | "'%2$s' প্লাগইন এর উপর '%1$s' প্লাগইন নির্ভরশীল।\nআপনি যদি '%3$s' নিষ্ক্রিয় " 84 | "করেন, তাহলে '%4$s' ও নিষ্ক্রিয় হয়ে যাবে।" 85 | 86 | #: ../libpeas-gtk/peas-gtk-disable-plugins-dialog.c:180 87 | msgid "Disable Plugins" 88 | msgstr "প্লাগইন নিষ্ক্রিয় করুন" 89 | 90 | #: ../libpeas-gtk/peas-gtk-plugin-manager.c:179 91 | msgid "There was an error displaying the help." 92 | msgstr "সহায়িকা প্রদর্শনের সময় একটি ত্রুটি হয়েছে।" 93 | 94 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:332 95 | msgid "_Enabled" 96 | msgstr "সক্রিয় করা হয়েছে (_E)" 97 | 98 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:343 99 | msgid "E_nable All" 100 | msgstr "সব কিছু সক্রিয় করা হবে (_n)" 101 | 102 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:347 103 | msgid "_Disable All" 104 | msgstr "সবকিছু নিষ্ক্রিয় করা হবে (_D)" 105 | 106 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:506 107 | msgid "Enabled" 108 | msgstr "সক্রিয় করা হয়েছে" 109 | 110 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:527 111 | msgid "Plugin" 112 | msgstr "প্লাগইন" 113 | 114 | #: ../libpeas-gtk/peas-gtk-plugin-manager-view.c:612 115 | #, c-format 116 | msgid "" 117 | "The plugin '%s' could not be loaded\n" 118 | "An error occurred: %s" 119 | msgstr "'%s' প্লাগইন লোড করা সম্ভব নয়\nএকটি ত্রুটি সংঘটিত হয়েছে: %s" 120 | 121 | #: ../peas-demo/peas-demo.c:40 122 | msgid "Run from build directory" 123 | msgstr "বিল্ড ডিরেক্টরী থেকে চালনা করুন" 124 | 125 | #: ../peas-demo/peas-demo.c:100 126 | msgid "- libpeas demo application" 127 | msgstr "- libpeas এর নমুনা অ্যাপ্লিকেশন" 128 | -------------------------------------------------------------------------------- /po/en_GB.po: -------------------------------------------------------------------------------- 1 | # British English translation of libpeas 2 | # Copyright (C) 2011 libpeas'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # Bruce Cowan , 2011-2024. 5 | # Zander Brown , 2019. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: libpeas\n" 10 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues\n" 11 | "POT-Creation-Date: 2023-03-27 20:02+0000\n" 12 | "PO-Revision-Date: 2024-09-01 12:46+0100\n" 13 | "Last-Translator: Bruce Cowan \n" 14 | "Language-Team: English - United Kingdom \n" 15 | "Language: en_GB\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | "X-Generator: Poedit 3.4.4\n" 21 | 22 | #: libpeas/peas-engine.c:1115 23 | #, c-format 24 | msgid "Dependency “%s” was not found" 25 | msgstr "Dependency “%s” was not found" 26 | 27 | #: libpeas/peas-engine.c:1125 28 | #, c-format 29 | msgid "Dependency “%s” failed to load" 30 | msgstr "Dependency “%s” failed to load" 31 | 32 | #: libpeas/peas-engine.c:1139 33 | #, c-format 34 | msgid "Plugin loader “%s” was not found" 35 | msgstr "Plug-in loader “%s” was not found" 36 | 37 | #: libpeas/peas-engine.c:1151 38 | #, c-format 39 | msgid "Failed to load" 40 | msgstr "Failed to load" 41 | 42 | #~ msgid "Additional plugins must be disabled" 43 | #~ msgstr "Additional plugins must be disabled" 44 | 45 | #, c-format 46 | #~| msgid "The following plugins depend on '%s' and will also be disabled:" 47 | #~ msgid "The following plugins depend on “%s” and will also be disabled:" 48 | #~ msgstr "The following plugins depend on “%s” and will also be disabled:" 49 | 50 | #~ msgid "Plugins" 51 | #~ msgstr "Plugins" 52 | 53 | #~ msgid "An additional plugin must be disabled" 54 | #~ msgstr "An additional plugin must be disabled" 55 | 56 | #, c-format 57 | #~| msgid "" 58 | #~| "The '%s' plugin depends on the '%s' plugin.\n" 59 | #~| "If you disable '%s', '%s' will also be disabled." 60 | #~ msgid "" 61 | #~ "The “%s” plugin depends on the “%s” plugin.\n" 62 | #~ "If you disable “%s”, “%s” will also be disabled." 63 | #~ msgstr "" 64 | #~ "The “%s” plugin depends on the “%s” plugin.\n" 65 | #~ "If you disable “%s”, “%s” will also be disabled." 66 | 67 | #~ msgid "_Cancel" 68 | #~ msgstr "_Cancel" 69 | 70 | #~ msgid "Disable Plugins" 71 | #~ msgstr "Disable Plugins" 72 | 73 | #~ msgid "There was an error displaying the help." 74 | #~ msgstr "There was an error displaying the help." 75 | 76 | #~ msgid "_Close" 77 | #~ msgstr "_Close" 78 | 79 | #~ msgid "_Help" 80 | #~ msgstr "_Help" 81 | 82 | #~ msgid "Pr_eferences" 83 | #~ msgstr "Pr_eferences" 84 | 85 | #~ msgid "_About" 86 | #~ msgstr "_About" 87 | 88 | #~ msgid "_Preferences" 89 | #~ msgstr "_Preferences" 90 | 91 | #~ msgid "_Enabled" 92 | #~ msgstr "_Enabled" 93 | 94 | #~ msgid "E_nable All" 95 | #~ msgstr "E_nable All" 96 | 97 | #~ msgid "_Disable All" 98 | #~ msgstr "_Disable All" 99 | 100 | #~ msgid "Enabled" 101 | #~ msgstr "Enabled" 102 | 103 | #~ msgid "Plugin" 104 | #~ msgstr "Plugin" 105 | 106 | #, c-format 107 | #~| msgid "The plugin '%s' could not be loaded" 108 | #~ msgid "The plugin “%s” could not be loaded" 109 | #~ msgstr "The plugin “%s” could not be loaded" 110 | 111 | #, c-format 112 | #~ msgid "An error occurred: %s" 113 | #~ msgstr "An error occurred: %s" 114 | 115 | #~ msgid "Run from build directory" 116 | #~ msgstr "Run from build directory" 117 | 118 | #~ msgid "_Quit" 119 | #~ msgstr "_Quit" 120 | 121 | #~| msgid "- libpeas demo application" 122 | #~ msgid "— libpeas demo application" 123 | #~ msgstr "— libpeas demo application" 124 | 125 | #~ msgid "About" 126 | #~ msgstr "About" 127 | 128 | #~ msgid "Preferences" 129 | #~ msgstr "Preferences" 130 | 131 | #~ msgid "Plugin Manager" 132 | #~ msgstr "Plugin Manager" 133 | 134 | #~ msgid "View" 135 | #~ msgstr "View" 136 | 137 | #~ msgid "Plugin Manager View" 138 | #~ msgstr "Plugin Manager View" 139 | 140 | #~ msgid "Show Builtin" 141 | #~ msgstr "Show Built-in" 142 | 143 | #~ msgid "Peas Gtk" 144 | #~ msgstr "Peas Gtk" 145 | 146 | #~ msgid "C_onfigure" 147 | #~ msgstr "C_onfigure" 148 | 149 | #~ msgid "_Plugins:" 150 | #~ msgstr "_Plugins:" 151 | -------------------------------------------------------------------------------- /po/eo.po: -------------------------------------------------------------------------------- 1 | # Esperanto translation for libpeas. 2 | # Copyright (C) 2011 Free Software Foundation, Inc. 3 | # Tiffany ANTOPOLSKI , 2011. 4 | # Kristjan SCHMIDT , 2011-2023. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas master\n" 9 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues\n" 10 | "POT-Creation-Date: 2023-03-27 20:02+0000\n" 11 | "PO-Revision-Date: 2023-09-15 21:55+0200\n" 12 | "Last-Translator: Kristjan SCHMIDT \n" 13 | "Language-Team: Esperanto \n" 14 | "Language: eo\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1)\n" 19 | "X-Generator: Gtranslator 42.0\n" 20 | "X-Project-Style: gnome\n" 21 | 22 | #: libpeas/peas-engine.c:1115 23 | #, c-format 24 | msgid "Dependency “%s” was not found" 25 | msgstr "Ne trovis dependecon “%s”" 26 | 27 | #: libpeas/peas-engine.c:1125 28 | #, c-format 29 | msgid "Dependency “%s” failed to load" 30 | msgstr "Malsukcesis ŝargi dependecon “%s”" 31 | 32 | #: libpeas/peas-engine.c:1139 33 | #, c-format 34 | msgid "Plugin loader “%s” was not found" 35 | msgstr "Ne trovis kromprogram-ŝargilon “%s”" 36 | 37 | #: libpeas/peas-engine.c:1151 38 | #, c-format 39 | msgid "Failed to load" 40 | msgstr "Malsukcesis ŝargi" 41 | 42 | #~ msgid "Plugin Manager" 43 | #~ msgstr "Kromprogram-administrilo" 44 | 45 | #~ msgid "View" 46 | #~ msgstr "Vido" 47 | 48 | #~ msgid "Plugin Manager View" 49 | #~ msgstr "Aspekto de la kromprogram-administrilo" 50 | 51 | #~ msgid "Show Builtin" 52 | #~ msgstr "Montri integritajn kromprogramojn" 53 | 54 | #~ msgid "Peas Gtk" 55 | #~ msgstr "Peas Gtk" 56 | 57 | #~ msgid "Additional plugins must be disabled" 58 | #~ msgstr "Pluaj kromprogramoj devas esti elŝaltitaj" 59 | 60 | #, c-format 61 | #~ msgid "The following plugins depend on '%s' and will also be disabled:" 62 | #~ msgstr "" 63 | #~ "La sekvantaj kromprogramoj dependas de '%s' kaj ankaŭ estos elŝaltite:" 64 | 65 | #~ msgid "Plugins" 66 | #~ msgstr "Kromprogramoj" 67 | 68 | #~ msgid "An additional plugin must be disabled" 69 | #~ msgstr "Plua kromprogramo devas esti elŝaltita" 70 | 71 | #, c-format 72 | #~ msgid "" 73 | #~ "The '%s' plugin depends on the '%s' plugin.\n" 74 | #~ "If you disable '%s', '%s' will also be disabled." 75 | #~ msgstr "" 76 | #~ "La kromprogramo '%s' dependas de la kromprogramo '%s'.\n" 77 | #~ "Se vi elŝaltus '%s', estos '%s' ankaŭ elŝaltite." 78 | 79 | #~ msgid "_Cancel" 80 | #~ msgstr "_Rezigni" 81 | 82 | #~ msgid "Disable Plugins" 83 | #~ msgstr "Elŝalti kromprogramojn" 84 | 85 | #~ msgid "There was an error displaying the help." 86 | #~ msgstr "Okazis eraro dum montrado de helpo." 87 | 88 | #~ msgid "_Close" 89 | #~ msgstr "_Fermi" 90 | 91 | #~ msgid "_Help" 92 | #~ msgstr "_Helpo" 93 | 94 | #~ msgid "Pr_eferences" 95 | #~ msgstr "Ag_ordoj" 96 | 97 | #~ msgid "_About" 98 | #~ msgstr "_Pri" 99 | 100 | #~ msgid "_Preferences" 101 | #~ msgstr "_Agordoj" 102 | 103 | #~ msgid "_Enabled" 104 | #~ msgstr "E_nŝaltite" 105 | 106 | #~ msgid "E_nable All" 107 | #~ msgstr "E_nŝalti ĉiujn" 108 | 109 | #~ msgid "_Disable All" 110 | #~ msgstr "E_lŝalti ĉiujn" 111 | 112 | #~ msgid "Enabled" 113 | #~ msgstr "Enŝaltite" 114 | 115 | #~ msgid "Plugin" 116 | #~ msgstr "Kromprogramo" 117 | 118 | #, c-format 119 | #~| msgid "" 120 | #~| "The plugin '%s' could not be loaded\n" 121 | #~| "An error occurred: %s" 122 | #~ msgid "The plugin '%s' could not be loaded" 123 | #~ msgstr "Ne eblis ŝargi la kromprogramon '%s'" 124 | 125 | #, c-format 126 | #~ msgid "An error occurred: %s" 127 | #~ msgstr "Eraro okazis: %s" 128 | 129 | #~ msgid "Run from build directory" 130 | #~ msgstr "Lanĉi de kunmetaĵo-dosierujo" 131 | 132 | #~ msgid "_Quit" 133 | #~ msgstr "Ĉ_esi" 134 | 135 | #~ msgid "- libpeas demo application" 136 | #~ msgstr "- libpeas demonstraĵo-aplikaĵo" 137 | 138 | #~| msgid "_About" 139 | #~ msgid "About" 140 | #~ msgstr "Pri" 141 | 142 | #~ msgid "Preferences" 143 | #~ msgstr "Agordoj" 144 | 145 | #~ msgid "C_onfigure" 146 | #~ msgstr "Ag_ordi" 147 | 148 | #~ msgid "_Plugins:" 149 | #~ msgstr "_Kromprogramoj:" 150 | -------------------------------------------------------------------------------- /po/et.po: -------------------------------------------------------------------------------- 1 | # Estonian translation for libpeas. 2 | # Copyright (C) 2011 libpeas's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # Mattias Põldaru , 2012. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas master\n" 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" 10 | "product=libpeas&keywords=I18N+L10N&component=general\n" 11 | "POT-Creation-Date: 2012-02-29 02:41+0000\n" 12 | "PO-Revision-Date: 2012-03-01 12:56+0200\n" 13 | "Last-Translator: Mattias Põldaru \n" 14 | "Language-Team: Estonian <>\n" 15 | "Language: et\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bits\n" 19 | "Plural-Forms: nplurals=2; plural=(n!=1);\n" 20 | 21 | msgid "Plugin Manager" 22 | msgstr "Pluginahaldur" 23 | 24 | msgid "View" 25 | msgstr "Vaade" 26 | 27 | msgid "Plugin Manager View" 28 | msgstr "Pluginahalduri vaade" 29 | 30 | #. Translators: Whether builtin plugins should appear in the view (property name) 31 | msgid "Show Builtin" 32 | msgstr "Sisseehitatuid kuvatakse" 33 | 34 | msgid "Peas Gtk" 35 | msgstr "Peas Gtk" 36 | 37 | #, c-format 38 | msgid "Dependency '%s' was not found" 39 | msgstr "Sõltuvust '%s' ei leitud" 40 | 41 | #, c-format 42 | msgid "Dependency '%s' failed to load" 43 | msgstr "Sõltuvuse '%s' laadimine nurjus" 44 | 45 | #, c-format 46 | msgid "Plugin loader '%s' was not found" 47 | msgstr "Plugina laadijat '%s' ei leitud" 48 | 49 | #, c-format 50 | msgid "Failed to load" 51 | msgstr "Laadimine nurjus" 52 | 53 | msgid "Additional plugins must be disabled" 54 | msgstr "Lisapluginad tuleb keelata" 55 | 56 | #, c-format 57 | msgid "The following plugins depend on '%s' and will also be disabled:" 58 | msgstr "Järgnevad pluginad, mis sõltuvad pluginast '%s' keelatakse samuti:" 59 | 60 | msgid "Plugins" 61 | msgstr "Pluginad" 62 | 63 | msgid "An additional plugin must be disabled" 64 | msgstr "Veel pluginaid tuleb keelata" 65 | 66 | #, c-format 67 | msgid "" 68 | "The '%s' plugin depends on the '%s' plugin.\n" 69 | "If you disable '%s', '%s' will also be disabled." 70 | msgstr "" 71 | "Plugin '%s' sõltub pluginast '%s'.\n" 72 | "Kui sa keelad plugina '%s', keelatakse\n" 73 | "ka '%s'." 74 | 75 | msgid "Disable Plugins" 76 | msgstr "Pluginate keelamine" 77 | 78 | msgid "There was an error displaying the help." 79 | msgstr "Abi kuvamisel esines viga." 80 | 81 | msgid "_About" 82 | msgstr "_Lähemalt" 83 | 84 | msgid "_Preferences" 85 | msgstr "_Eelistused" 86 | 87 | msgid "_Enabled" 88 | msgstr "_Lubatud" 89 | 90 | msgid "E_nable All" 91 | msgstr "_Luba kõik" 92 | 93 | msgid "_Disable All" 94 | msgstr "_Keela kõik" 95 | 96 | msgid "Enabled" 97 | msgstr "Lubatud" 98 | 99 | msgid "Plugin" 100 | msgstr "Plugin" 101 | 102 | #, c-format 103 | msgid "" 104 | "The plugin '%s' could not be loaded\n" 105 | "An error occurred: %s" 106 | msgstr "" 107 | "Pluginat '%s' polnud võimalik laadida\n" 108 | "Esines viga: %s" 109 | 110 | msgid "Run from build directory" 111 | msgstr "Käivitamine kompileerimise kataloogist" 112 | 113 | msgid "- libpeas demo application" 114 | msgstr "- libpeas demorakendus" 115 | -------------------------------------------------------------------------------- /po/hi.po: -------------------------------------------------------------------------------- 1 | # translation of libpeas.po.master.hi.po to Hindi 2 | # Hindi translation for libpeas. 3 | # Copyright (C) 2011 libpeas's COPYRIGHT HOLDER 4 | # This file is distributed under the same license as the libpeas package. 5 | # 6 | # chandankumar , 2012. 7 | # rajesh , 2014. 8 | # Scrambled777 , 2024. 9 | # 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: libpeas.po.master.hi\n" 13 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues\n" 14 | "POT-Creation-Date: 2023-03-27 20:02+0000\n" 15 | "PO-Revision-Date: 2024-04-17 17:12+0530\n" 16 | "Last-Translator: Scrambled777 \n" 17 | "Language-Team: Hindi\n" 18 | "Language: hi\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "X-Generator: Gtranslator 46.0\n" 23 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 24 | 25 | #: libpeas/peas-engine.c:1115 26 | #, c-format 27 | msgid "Dependency “%s” was not found" 28 | msgstr "निर्भरता “%s” नहीं मिली" 29 | 30 | #: libpeas/peas-engine.c:1125 31 | #, c-format 32 | msgid "Dependency “%s” failed to load" 33 | msgstr "निर्भरता “%s” लोड होने में विफल रही" 34 | 35 | #: libpeas/peas-engine.c:1139 36 | #, c-format 37 | msgid "Plugin loader “%s” was not found" 38 | msgstr "प्लगइन लोडर “%s” नहीं मिला" 39 | 40 | #: libpeas/peas-engine.c:1151 41 | #, c-format 42 | msgid "Failed to load" 43 | msgstr "लोड करने में असफल" 44 | 45 | #~ msgid "Plugin Manager" 46 | #~ msgstr "प्लगइन प्रबंधक" 47 | 48 | #~ msgid "View" 49 | #~ msgstr "दृश्य" 50 | 51 | #~ msgid "Plugin Manager View" 52 | #~ msgstr "प्लगइन प्रबंधक दृश्य" 53 | 54 | #~ msgid "Show Builtin" 55 | #~ msgstr "अंतर्निहित दिखाएँ" 56 | 57 | #~ msgid "Peas Gtk" 58 | #~ msgstr "Peas Gtk" 59 | 60 | #~ msgid "Additional plugins must be disabled" 61 | #~ msgstr "अतिरिक्त प्लगइन निष्क्रिय किया जाना चाहिए" 62 | 63 | #, c-format 64 | #~ msgid "The following plugins depend on '%s' and will also be disabled:" 65 | #~ msgstr "निम्नलिखित प्लगिन '%s' पर निर्भर करती है और यह भी निष्क्रिय किया जाएगा:" 66 | 67 | #~ msgid "Plugins" 68 | #~ msgstr "प्लगइन्स" 69 | 70 | #~ msgid "An additional plugin must be disabled" 71 | #~ msgstr "अतिरिक्त प्लगइन निष्क्रिय किया जाना चाहिए" 72 | 73 | #, c-format 74 | #~ msgid "" 75 | #~ "The '%s' plugin depends on the '%s' plugin.\n" 76 | #~ "If you disable '%s', '%s' will also be disabled." 77 | #~ msgstr "" 78 | #~ "'%s' प्लगइन '%s' प्लगइन पर पर निर्भर करता है.\n" 79 | #~ " यदि आप '%s' को अक्षम करते है तो '%s' भी निष्क्रिय हो जायेगा." 80 | 81 | #~ msgid "_Cancel" 82 | #~ msgstr "रद्द करें (_C)" 83 | 84 | #~ msgid "Disable Plugins" 85 | #~ msgstr "प्लगिन निष्क्रिय करें" 86 | 87 | #~ msgid "There was an error displaying the help." 88 | #~ msgstr "मदद दिखाने में कोई त्रुटि हुई." 89 | 90 | #~ msgid "_Close" 91 | #~ msgstr "बंद करें (_C)" 92 | 93 | #~ msgid "_Help" 94 | #~ msgstr "मदद (_H)" 95 | 96 | #~| msgid "_Preferences" 97 | #~ msgid "Pr_eferences" 98 | #~ msgstr "वरीयता (_e)" 99 | 100 | #~ msgid "_About" 101 | #~ msgstr "के बारे में (_A)" 102 | 103 | #~ msgid "_Preferences" 104 | #~ msgstr "वरीयताएँ (_P)" 105 | 106 | #~ msgid "_Enabled" 107 | #~ msgstr "सक्षम (_E)" 108 | 109 | #~ msgid "E_nable All" 110 | #~ msgstr "सभी सक्रिय (_n)" 111 | 112 | #~ msgid "_Disable All" 113 | #~ msgstr "सभी अक्रिय (_D)" 114 | 115 | #~ msgid "Enabled" 116 | #~ msgstr "सक्षम" 117 | 118 | #~ msgid "Plugin" 119 | #~ msgstr "प्लगइन" 120 | 121 | #, c-format 122 | #~ msgid "" 123 | #~ "The plugin '%s' could not be loaded\n" 124 | #~ "An error occurred: %s" 125 | #~ msgstr "" 126 | #~ "प्लगइन '%s' लोड नहीं किया जा सकता है.\n" 127 | #~ "एक त्रुटि हुई: %s" 128 | 129 | #~ msgid "Run from build directory" 130 | #~ msgstr "बिल्ड डिरेक्ट्री से चलाएँ" 131 | 132 | #~ msgid "_Quit" 133 | #~ msgstr "बाहर (_Q)" 134 | 135 | #~ msgid "- libpeas demo application" 136 | #~ msgstr "- libpeas डेमो अनुप्रयोग" 137 | 138 | #~ msgid "C_onfigure" 139 | #~ msgstr "कॉन्फ़िगर करें (_o)" 140 | -------------------------------------------------------------------------------- /po/ia.po: -------------------------------------------------------------------------------- 1 | # Interlingua translation for libpeas. 2 | # Copyright (C) 2025 libpeas's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # FIRST AUTHOR , YEAR. 5 | # FULL NAME , 2025. 6 | # Emilio Sepúlveda , 2025. 7 | # 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: libpeas main\n" 11 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues/\n" 12 | "POT-Creation-Date: 2025-01-14 10:17+0000\n" 13 | "PO-Revision-Date: 2025-02-04 17:22-0300\n" 14 | "Last-Translator: Emilio Sepúlveda \n" 15 | "Language-Team: Interlingua \n" 16 | "Language: ia\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "X-DL-Lang: ia\n" 21 | "X-DL-Module: libpeas\n" 22 | "X-DL-Branch: main\n" 23 | "X-DL-Domain: po\n" 24 | "X-DL-State: None\n" 25 | "X-Generator: Gtranslator 47.1\n" 26 | 27 | #: libpeas/peas-engine.c:1121 28 | #, c-format 29 | msgid "Dependency “%s” was not found" 30 | msgstr "Dependentia “%s” non trovate" 31 | 32 | #: libpeas/peas-engine.c:1131 33 | #, c-format 34 | msgid "Dependency “%s” failed to load" 35 | msgstr "Falleva le cargamento del dependentia “%s”" 36 | 37 | #: libpeas/peas-engine.c:1145 38 | #, c-format 39 | msgid "Plugin loader “%s” was not found" 40 | msgstr "Cargator de plug-in “%s” non trovate" 41 | 42 | #: libpeas/peas-engine.c:1157 43 | #, c-format 44 | msgid "Failed to load" 45 | msgstr "Falleva le cargamento" 46 | -------------------------------------------------------------------------------- /po/kab.po: -------------------------------------------------------------------------------- 1 | # Kabyle translation for libpeas. 2 | # Copyright (C) 2024 libpeas's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # Rachida SACI , 2024. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas main\n" 9 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues/\n" 10 | "POT-Creation-Date: 2024-03-16 05:48+0000\n" 11 | "PO-Revision-Date: 2024-03-21 22:10+0100\n" 12 | "Last-Translator: sa\n" 13 | "Language-Team: Kabyle \n" 14 | "Language: kab\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 3.4.2\n" 19 | 20 | #: libpeas/peas-engine.c:1115 21 | #, c-format 22 | msgid "Dependency “%s” was not found" 23 | msgstr "Aḍaraε \"%s\" ulac-it" 24 | 25 | #: libpeas/peas-engine.c:1125 26 | #, c-format 27 | msgid "Dependency “%s” failed to load" 28 | msgstr "Aḍaraε \"%s\" yecceḍ deg walluy" 29 | 30 | #: libpeas/peas-engine.c:1139 31 | #, c-format 32 | msgid "Plugin loader “%s” was not found" 33 | msgstr "Asaly n uzegrir \"%s\" ulac-it" 34 | 35 | #: libpeas/peas-engine.c:1151 36 | #, c-format 37 | msgid "Failed to load" 38 | msgstr "Yecceḍ usali" 39 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext( 2 | package_string, 3 | preset: 'glib', 4 | ) 5 | -------------------------------------------------------------------------------- /po/nds.po: -------------------------------------------------------------------------------- 1 | # Low German translation for libpeas. 2 | # Copyright (C) 2010 libpeas's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the libpeas package. 4 | # Nils-Christoph Fiedler , 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas master\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2010-08-08 18:03+0000\n" 11 | "PO-Revision-Date: 2010-08-11 01:45+0200\n" 12 | "Last-Translator: Nils-Christoph Fiedler \n" 13 | "Language-Team: Low German \n" 14 | "Language: nds\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | 19 | #: ../libpeasui/peas-ui-plugin-manager.c:177 20 | msgid "There was an error displaying the help." 21 | msgstr "Künn de Hölp nich opwiesen." 22 | 23 | #: ../libpeasui/peas-ui-plugin-manager.c:335 24 | msgid "C_onfigure" 25 | msgstr "K_onfigureren" 26 | 27 | #: ../libpeasui/peas-ui-plugin-manager.c:343 28 | msgid "_About" 29 | msgstr "_Över" 30 | 31 | #: ../libpeasui/peas-ui-plugin-manager.c:364 32 | msgid "_Plugins:" 33 | msgstr "_Plugins:" 34 | 35 | #: ../libpeasui/peas-ui-plugin-manager-view.c:295 36 | msgid "_Enabled" 37 | msgstr "Aktiv_ert" 38 | 39 | #: ../libpeasui/peas-ui-plugin-manager-view.c:306 40 | msgid "E_nable All" 41 | msgstr "Allens aktivere_n" 42 | 43 | #: ../libpeasui/peas-ui-plugin-manager-view.c:310 44 | msgid "_Disable All" 45 | msgstr "Allens _deaktiveren" 46 | 47 | #: ../libpeasui/peas-ui-plugin-manager-view.c:467 48 | msgid "Enabled" 49 | msgstr "Aktivert" 50 | 51 | #: ../libpeasui/peas-ui-plugin-manager-view.c:488 52 | msgid "Plugin" 53 | msgstr "Plugin" 54 | 55 | #: ../peas-demo/peas-demo.c:39 56 | msgid "Run from build directory" 57 | msgstr "Ut Erstellensverteeknis lööpen laten" 58 | 59 | #: ../peas-demo/peas-demo.c:130 60 | msgid "- libpeas demo application" 61 | msgstr "- libpeas Demonstratschoonsprogramm" 62 | -------------------------------------------------------------------------------- /po/th.po: -------------------------------------------------------------------------------- 1 | # Thai translation for libpeas. 2 | # Copyright (C) 2011-2015 Free Software Foundation, Inc. 3 | # This file is distributed under the same license as the libpeas package. 4 | # Akom Chotiphantawanon , 2011-2012, 2015. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: libpeas master\n" 9 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues\n" 10 | "POT-Creation-Date: 2023-03-27 20:02+0000\n" 11 | "PO-Revision-Date: 2024-03-12 18:03+0700\n" 12 | "Last-Translator: Akom Chotiphantawanon \n" 13 | "Language-Team: Thai \n" 14 | "Language: th\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=1; plural=0;\n" 19 | "X-Generator: Poedit 3.4.2\n" 20 | 21 | #: libpeas/peas-engine.c:1115 22 | #, c-format 23 | msgid "Dependency “%s” was not found" 24 | msgstr "ไม่พบ “%s” ที่ต้องใช้" 25 | 26 | #: libpeas/peas-engine.c:1125 27 | #, c-format 28 | msgid "Dependency “%s” failed to load" 29 | msgstr "โหลด “%s” ที่ต้องใช้ไม่สำเร็จ" 30 | 31 | #: libpeas/peas-engine.c:1139 32 | #, c-format 33 | msgid "Plugin loader “%s” was not found" 34 | msgstr "ไม่พบเครื่องมือโหลดปลั๊กอิน “%s”" 35 | 36 | #: libpeas/peas-engine.c:1151 37 | #, c-format 38 | msgid "Failed to load" 39 | msgstr "โหลดไม่สำเร็จ" 40 | 41 | #~ msgid "Plugin Manager" 42 | #~ msgstr "เครื่องมือจัดการปลั๊กอิน" 43 | 44 | #~ msgid "View" 45 | #~ msgstr "มุมมอง" 46 | 47 | #~ msgid "Plugin Manager View" 48 | #~ msgstr "มุมมองเครื่องมือจัดการปลั๊กอิน" 49 | 50 | #~ msgid "Show Builtin" 51 | #~ msgstr "แสดงปลั๊กอินที่มีในตัว" 52 | 53 | #~ msgid "Peas Gtk" 54 | #~ msgstr "Peas Gtk" 55 | 56 | #~ msgid "Additional plugins must be disabled" 57 | #~ msgstr "ต้องปิดปลั๊กอินเพิ่มเติม" 58 | 59 | #, c-format 60 | #~ msgid "The following plugins depend on '%s' and will also be disabled:" 61 | #~ msgstr "ปลั๊กอินต่อไปนี้ต้องใช้ '%s' และจะถูกปิดการใช้งานด้วย:" 62 | 63 | #~ msgid "Plugins" 64 | #~ msgstr "ปลั๊กอิน" 65 | 66 | #~ msgid "An additional plugin must be disabled" 67 | #~ msgstr "ต้องปิดปลั๊กอินเพิ่มเติม" 68 | 69 | #, c-format 70 | #~ msgid "" 71 | #~ "The '%s' plugin depends on the '%s' plugin.\n" 72 | #~ "If you disable '%s', '%s' will also be disabled." 73 | #~ msgstr "" 74 | #~ "ปลั๊กอิน '%s' ต้องใช้ปลั๊กอิน '%s'\n" 75 | #~ "ถ้าคุณปิดการใช้งาน '%s', ก็จะเป็นการปิด '%s' ด้วย" 76 | 77 | #~ msgid "_Cancel" 78 | #~ msgstr "_ยกเลิก" 79 | 80 | #~ msgid "Disable Plugins" 81 | #~ msgstr "ปิดการใช้งานปลั๊กอิน" 82 | 83 | #~ msgid "There was an error displaying the help." 84 | #~ msgstr "เกิดข้อผิดพลาดขณะแสดงวิธีใช้" 85 | 86 | #~ msgid "_Close" 87 | #~ msgstr "ปิ_ด" 88 | 89 | #~ msgid "_Help" 90 | #~ msgstr "_วิธีใช้" 91 | 92 | #~ msgid "Pr_eferences" 93 | #~ msgstr "_ปรับแต่ง" 94 | 95 | #~ msgid "_About" 96 | #~ msgstr "เ_กี่ยวกับ" 97 | 98 | #~ msgid "_Preferences" 99 | #~ msgstr "_ปรับแต่ง" 100 | 101 | #~ msgid "_Enabled" 102 | #~ msgstr "_เปิดใช้งาน" 103 | 104 | #~ msgid "E_nable All" 105 | #~ msgstr "เปิดใช้งาน_ทั้งหมด" 106 | 107 | #~ msgid "_Disable All" 108 | #~ msgstr "ปิ_ดการใช้งานทั้งหมด" 109 | 110 | #~ msgid "Enabled" 111 | #~ msgstr "เปิดใช้งาน" 112 | 113 | #~ msgid "Plugin" 114 | #~ msgstr "ปลั๊กอิน" 115 | 116 | #, c-format 117 | #~ msgid "The plugin '%s' could not be loaded" 118 | #~ msgstr "ปลั๊กอิน '%s' ไม่สามารถโหลดได้" 119 | 120 | #, c-format 121 | #~ msgid "An error occurred: %s" 122 | #~ msgstr "เกิดข้อผิดพลาด: %s" 123 | 124 | #~ msgid "Run from build directory" 125 | #~ msgstr "เรียกจากไดเรกทอรีที่ใช้ประกอบสร้าง" 126 | 127 | #~ msgid "_Quit" 128 | #~ msgstr "_ออก" 129 | 130 | #~ msgid "- libpeas demo application" 131 | #~ msgstr "- โปรแกรมตัวอย่างของ libpeas" 132 | 133 | #~ msgid "About" 134 | #~ msgstr "เกี่ยวกับ" 135 | 136 | #~ msgid "Preferences" 137 | #~ msgstr "ปรับแต่ง" 138 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | # Turkish translation for libpeas. 2 | # Copyright (C) 2011 the Free Software Foundation, Inc. 3 | # Copyright (C) 2012-2023 libpeas'S COPYRIGHT HOLDER 4 | # This file is distributed under the same license as the libpeas package. 5 | # 6 | # Muhammed Eken , 2011. 7 | # Muhammet Kara , 2011, 2012, 2015. 8 | # Necdet Yücel , 2015. 9 | # Sabri Ünal , 2019. 10 | # 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: libpeas master\n" 14 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libpeas/issues\n" 15 | "POT-Creation-Date: 2023-03-28 17:44+0000\n" 16 | "PO-Revision-Date: 2023-02-20 21:57+0300\n" 17 | "Last-Translator: Sabri Ünal \n" 18 | "Language-Team: Turkish \n" 19 | "Language: tr\n" 20 | "MIME-Version: 1.0\n" 21 | "Content-Type: text/plain; charset=UTF-8\n" 22 | "Content-Transfer-Encoding: 8bit\n" 23 | "Plural-Forms: nplurals=1; plural=0;\n" 24 | "X-Generator: Poedit 3.1.1\n" 25 | "X-POOTLE-MTIME: 1433229099.000000\n" 26 | 27 | #: libpeas/peas-engine.c:1115 28 | #, c-format 29 | msgid "Dependency “%s” was not found" 30 | msgstr "“%s” bağımlılığı bulunamadı" 31 | 32 | #: libpeas/peas-engine.c:1125 33 | #, c-format 34 | msgid "Dependency “%s” failed to load" 35 | msgstr "“%s” bağımlılığı yüklenemedi" 36 | 37 | #: libpeas/peas-engine.c:1139 38 | #, c-format 39 | msgid "Plugin loader “%s” was not found" 40 | msgstr "Eklenti yükleyicisi “%s” bulunamadı" 41 | 42 | #: libpeas/peas-engine.c:1151 43 | #, c-format 44 | msgid "Failed to load" 45 | msgstr "Yüklenemedi" 46 | 47 | #~ msgid "Additional plugins must be disabled" 48 | #~ msgstr "İlave eklentilerin devre dışı bırakılması gerekiyor" 49 | 50 | #, c-format 51 | #~ msgid "The following plugins depend on “%s” and will also be disabled:" 52 | #~ msgstr "Şu eklentiler “%s” eklentisine bağlı ve devre dışı bırakılacak:" 53 | 54 | #~ msgid "Plugins" 55 | #~ msgstr "Eklentiler" 56 | 57 | #~ msgid "An additional plugin must be disabled" 58 | #~ msgstr "İlave bir eklentinin devre dışı bırakılması gerekiyor" 59 | 60 | #, c-format 61 | #~ msgid "" 62 | #~ "The “%s” plugin depends on the “%s” plugin.\n" 63 | #~ "If you disable “%s”, “%s” will also be disabled." 64 | #~ msgstr "" 65 | #~ "“%s” eklentisi “%s” eklentisine bağlı.\n" 66 | #~ "Eğer “%s” eklentisini devre dışı bırakırsanız, “%s” eklentisi de devre " 67 | #~ "dışı kalacak." 68 | 69 | #~ msgid "_Cancel" 70 | #~ msgstr "_İptal" 71 | 72 | #~ msgid "Disable Plugins" 73 | #~ msgstr "Eklentileri Devre Dışı Bırak" 74 | 75 | #~ msgid "There was an error displaying the help." 76 | #~ msgstr "Yardım görüntülenirken bir hata oluştu." 77 | 78 | #~ msgid "_Close" 79 | #~ msgstr "_Kapat" 80 | 81 | #~ msgid "_Help" 82 | #~ msgstr "_Yardım" 83 | 84 | #~ msgid "Pr_eferences" 85 | #~ msgstr "T_ercihler" 86 | 87 | #~ msgid "_About" 88 | #~ msgstr "_Hakkında" 89 | 90 | #~ msgid "_Preferences" 91 | #~ msgstr "_Tercihler" 92 | 93 | #~ msgid "_Enabled" 94 | #~ msgstr "_Etkinleştirildi" 95 | 96 | #~ msgid "E_nable All" 97 | #~ msgstr "_Tümünü Etkinleştir" 98 | 99 | #~ msgid "_Disable All" 100 | #~ msgstr "Tü_münü Devre Dışı Bırak" 101 | 102 | #~ msgid "Enabled" 103 | #~ msgstr "Etkinleştirildi" 104 | 105 | #~ msgid "Plugin" 106 | #~ msgstr "Eklenti" 107 | 108 | #, c-format 109 | #~ msgid "The plugin “%s” could not be loaded" 110 | #~ msgstr "“%s” eklentisi yüklenemedi" 111 | 112 | #, c-format 113 | #~ msgid "An error occurred: %s" 114 | #~ msgstr "Bir hata oluştu: %s" 115 | 116 | #~ msgid "Run from build directory" 117 | #~ msgstr "İnşa dizininden çalıştır" 118 | 119 | #~ msgid "_Quit" 120 | #~ msgstr "_Çık" 121 | 122 | #~ msgid "— libpeas demo application" 123 | #~ msgstr "— libpeas deneme uygulaması" 124 | 125 | #~ msgid "About" 126 | #~ msgstr "Hakkında" 127 | 128 | #~ msgid "Preferences" 129 | #~ msgstr "Tercihler" 130 | -------------------------------------------------------------------------------- /subprojects/gi-docgen.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | directory=gi-docgen 3 | url=https://gitlab.gnome.org/GNOME/gi-docgen.git 4 | push-url=ssh://git@gitlab.gnome.org:GNOME/gi-docgen.git 5 | revision=main 6 | depth=1 7 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-abstract.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-abstract.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-abstract.h" 27 | 28 | typedef struct { 29 | int value; 30 | } IntrospectionAbstractPrivate; 31 | 32 | G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (IntrospectionAbstract, 33 | introspection_abstract, 34 | PEAS_TYPE_EXTENSION_BASE) 35 | 36 | #define GET_PRIV(o) \ 37 | (introspection_abstract_get_instance_private (o)) 38 | 39 | enum { 40 | PROP_0, 41 | PROP_ABSTRACT_PROPERTY, 42 | N_PROPERTIES 43 | }; 44 | 45 | static GParamSpec *properties[N_PROPERTIES] = { NULL }; 46 | 47 | static void 48 | introspection_abstract_get_property (GObject *object, 49 | guint prop_id, 50 | GValue *value, 51 | GParamSpec *pspec) 52 | { 53 | IntrospectionAbstract *abstract = INTROSPECTION_ABSTRACT (object); 54 | IntrospectionAbstractPrivate *priv = GET_PRIV (abstract); 55 | 56 | switch (prop_id) 57 | { 58 | case PROP_ABSTRACT_PROPERTY: 59 | g_value_set_int (value, priv->value); 60 | break; 61 | default: 62 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 63 | break; 64 | } 65 | } 66 | 67 | static void 68 | introspection_abstract_set_property (GObject *object, 69 | guint prop_id, 70 | const GValue *value, 71 | GParamSpec *pspec) 72 | { 73 | IntrospectionAbstract *abstract = INTROSPECTION_ABSTRACT (object); 74 | IntrospectionAbstractPrivate *priv = GET_PRIV (abstract); 75 | 76 | switch (prop_id) 77 | { 78 | case PROP_ABSTRACT_PROPERTY: 79 | priv->value = g_value_get_int (value); 80 | break; 81 | default: 82 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 83 | break; 84 | } 85 | } 86 | 87 | static void 88 | introspection_abstract_class_init (IntrospectionAbstractClass *klass) 89 | { 90 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 91 | 92 | object_class->get_property = introspection_abstract_get_property; 93 | object_class->set_property = introspection_abstract_set_property; 94 | 95 | properties[PROP_ABSTRACT_PROPERTY] = 96 | g_param_spec_int ("abstract-property", 97 | "Abstract Property", 98 | "The IntrospectionAbstract", 99 | G_MININT, 100 | G_MAXINT, 101 | -1, 102 | G_PARAM_READWRITE | 103 | G_PARAM_STATIC_STRINGS); 104 | 105 | g_object_class_install_properties (object_class, N_PROPERTIES, properties); 106 | } 107 | 108 | static void 109 | introspection_abstract_init (IntrospectionAbstract *prereq) 110 | { 111 | } 112 | 113 | int 114 | introspection_abstract_get_value (IntrospectionAbstract *abstract) 115 | { 116 | IntrospectionAbstractPrivate *priv = GET_PRIV (abstract); 117 | 118 | g_return_val_if_fail (INTROSPECTION_IS_ABSTRACT (abstract), -1); 119 | 120 | return priv->value; 121 | } 122 | 123 | void 124 | introspection_abstract_set_value (IntrospectionAbstract *abstract, 125 | int value) 126 | { 127 | IntrospectionAbstractPrivate *priv = GET_PRIV (abstract); 128 | 129 | g_return_if_fail (INTROSPECTION_IS_ABSTRACT (abstract)); 130 | 131 | priv->value = value; 132 | } 133 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-abstract.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-abstract.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_ABSTRACT (introspection_abstract_get_type ()) 36 | #define INTROSPECTION_ABSTRACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_ABSTRACT, IntrospectionAbstract)) 37 | #define INTROSPECTION_ABSTRACT_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_ABSTRACT, IntrospectionAbstractClass)) 38 | #define INTROSPECTION_IS_ABSTRACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_ABSTRACT)) 39 | #define INTROSPECTION_ABSTRACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INTROSPECTION_TYPE_ABSTRACT, IntrospectionAbstractClass)) 40 | 41 | typedef struct _IntrospectionAbstract IntrospectionAbstract; 42 | typedef struct _IntrospectionAbstractClass IntrospectionAbstractClass; 43 | 44 | struct _IntrospectionAbstract { 45 | PeasExtensionBase parent; 46 | }; 47 | 48 | struct _IntrospectionAbstractClass { 49 | PeasExtensionBaseClass parent_class; 50 | }; 51 | 52 | /* 53 | * Public methods 54 | */ 55 | PEAS_TEST_EXPORT 56 | GType introspection_abstract_get_type (void) G_GNUC_CONST; 57 | 58 | 59 | PEAS_TEST_EXPORT 60 | int introspection_abstract_get_value (IntrospectionAbstract *abstract); 61 | 62 | PEAS_TEST_EXPORT 63 | void introspection_abstract_set_value (IntrospectionAbstract *abstract, 64 | int value); 65 | 66 | G_END_DECLS 67 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-activatable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-activatable.h 3 | * This file is part of libintrospection 4 | * 5 | * Copyright (C) 2010 - Steve Frécinaux 6 | * 7 | * libintrospection is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libintrospection is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define INTROSPECTION_TYPE_ACTIVATABLE (introspection_activatable_get_type ()) 33 | #define INTROSPECTION_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_ACTIVATABLE, IntrospectionActivatable)) 34 | #define INTROSPECTION_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_ACTIVATABLE, IntrospectionActivatableInterface)) 35 | #define INTROSPECTION_IS_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_ACTIVATABLE)) 36 | #define INTROSPECTION_ACTIVATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_ACTIVATABLE, IntrospectionActivatableInterface)) 37 | 38 | typedef struct _IntrospectionActivatable IntrospectionActivatable; /* dummy typedef */ 39 | typedef struct _IntrospectionActivatableInterface IntrospectionActivatableInterface; 40 | 41 | struct _IntrospectionActivatableInterface { 42 | GTypeInterface g_iface; 43 | void (*activate) (IntrospectionActivatable *activatable); 44 | void (*deactivate) (IntrospectionActivatable *activatable); 45 | void (*update_state) (IntrospectionActivatable *activatable); 46 | }; 47 | 48 | PEAS_TEST_EXPORT 49 | GType introspection_activatable_get_type (void) G_GNUC_CONST; 50 | PEAS_TEST_EXPORT 51 | void introspection_activatable_activate (IntrospectionActivatable *activatable); 52 | PEAS_TEST_EXPORT 53 | void introspection_activatable_deactivate (IntrospectionActivatable *activatable); 54 | PEAS_TEST_EXPORT 55 | void introspection_activatable_update_state (IntrospectionActivatable *activatable); 56 | 57 | G_END_DECLS 58 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-base.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-base.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-base.h" 27 | 28 | G_DEFINE_INTERFACE(IntrospectionBase, introspection_base, G_TYPE_OBJECT) 29 | 30 | void 31 | introspection_base_default_init (IntrospectionBaseInterface *iface) 32 | { 33 | } 34 | 35 | /** 36 | * introspection_base_get_plugin_info: 37 | * @base: 38 | * 39 | * Returns: (transfer none): 40 | */ 41 | const PeasPluginInfo * 42 | introspection_base_get_plugin_info (IntrospectionBase *base) 43 | { 44 | IntrospectionBaseInterface *iface; 45 | 46 | g_return_val_if_fail (INTROSPECTION_IS_BASE (base), NULL); 47 | 48 | iface = INTROSPECTION_BASE_GET_IFACE (base); 49 | g_assert_true (iface->get_plugin_info != NULL); 50 | 51 | return iface->get_plugin_info (base); 52 | } 53 | 54 | /** 55 | * introspection_base_get_settings: 56 | * @base: 57 | * 58 | * Returns: (transfer full): 59 | */ 60 | GSettings * 61 | introspection_base_get_settings (IntrospectionBase *base) 62 | { 63 | IntrospectionBaseInterface *iface; 64 | 65 | g_return_val_if_fail (INTROSPECTION_IS_BASE (base), NULL); 66 | 67 | iface = INTROSPECTION_BASE_GET_IFACE (base); 68 | g_assert_true (iface->get_settings != NULL); 69 | 70 | return iface->get_settings (base); 71 | } 72 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-base.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_BASE (introspection_base_get_type ()) 36 | #define INTROSPECTION_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_BASE, IntrospectionBase)) 37 | #define INTROSPECTION_BASE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_BASE, IntrospectionBaseInterface)) 38 | #define INTROSPECTION_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_BASE)) 39 | #define INTROSPECTION_BASE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_BASE, IntrospectionBaseInterface)) 40 | 41 | typedef struct _IntrospectionBase IntrospectionBase; /* dummy typedef */ 42 | typedef struct _IntrospectionBaseInterface IntrospectionBaseInterface; 43 | 44 | struct _IntrospectionBaseInterface { 45 | GTypeInterface g_iface; 46 | 47 | /* Virtual public methods */ 48 | const PeasPluginInfo *(*get_plugin_info) (IntrospectionBase *base); 49 | GSettings *(*get_settings) (IntrospectionBase *base); 50 | }; 51 | 52 | /* 53 | * Public methods 54 | */ 55 | PEAS_TEST_EXPORT 56 | GType introspection_base_get_type (void) G_GNUC_CONST; 57 | 58 | 59 | PEAS_TEST_EXPORT 60 | const PeasPluginInfo *introspection_base_get_plugin_info (IntrospectionBase *base); 61 | 62 | PEAS_TEST_EXPORT 63 | GSettings *introspection_base_get_settings (IntrospectionBase *base); 64 | 65 | G_END_DECLS 66 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-callable.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-callable.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-callable.h" 27 | 28 | G_DEFINE_INTERFACE(IntrospectionCallable, introspection_callable, G_TYPE_OBJECT) 29 | 30 | void 31 | introspection_callable_default_init (IntrospectionCallableInterface *iface) 32 | { 33 | } 34 | 35 | /** 36 | * introspection_callable_call_with_return: 37 | * @callable: 38 | * 39 | * Returns: (transfer full): 40 | */ 41 | char * 42 | introspection_callable_call_with_return (IntrospectionCallable *callable) 43 | { 44 | IntrospectionCallableInterface *iface; 45 | 46 | g_return_val_if_fail (INTROSPECTION_IS_CALLABLE (callable), NULL); 47 | 48 | iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); 49 | g_assert_true (iface->call_with_return != NULL); 50 | 51 | return iface->call_with_return (callable); 52 | } 53 | 54 | /** 55 | * introspection_callable_call_no_args: 56 | * @callable: 57 | */ 58 | void 59 | introspection_callable_call_no_args (IntrospectionCallable *callable) 60 | { 61 | IntrospectionCallableInterface *iface; 62 | 63 | g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); 64 | 65 | iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); 66 | g_assert_true (iface->call_no_args != NULL); 67 | 68 | iface->call_no_args (callable); 69 | } 70 | 71 | /** 72 | * introspection_callable_call_single_arg: 73 | * @callable: 74 | * @called: (out): 75 | */ 76 | void 77 | introspection_callable_call_single_arg (IntrospectionCallable *callable, 78 | gboolean *called) 79 | { 80 | IntrospectionCallableInterface *iface; 81 | 82 | g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); 83 | 84 | iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); 85 | g_assert_true (iface->call_single_arg != NULL); 86 | 87 | iface->call_single_arg (callable, called); 88 | } 89 | 90 | /** 91 | * introspection_callable_call_multi_args: 92 | * @callable: 93 | * @in: (in): 94 | * @out: (out): 95 | * @inout: (inout): 96 | */ 97 | void 98 | introspection_callable_call_multi_args (IntrospectionCallable *callable, 99 | int in, 100 | int *out, 101 | int *inout) 102 | { 103 | IntrospectionCallableInterface *iface; 104 | 105 | g_return_if_fail (INTROSPECTION_IS_CALLABLE (callable)); 106 | 107 | iface = INTROSPECTION_CALLABLE_GET_IFACE (callable); 108 | g_assert_true (iface->call_multi_args != NULL); 109 | 110 | iface->call_multi_args (callable, in, out, inout); 111 | } 112 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-callable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-callable.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_CALLABLE (introspection_callable_get_type ()) 36 | #define INTROSPECTION_CALLABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_CALLABLE, IntrospectionCallable)) 37 | #define INTROSPECTION_CALLABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_CALLABLE, IntrospectionCallableInterface)) 38 | #define INTROSPECTION_IS_CALLABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_CALLABLE)) 39 | #define INTROSPECTION_CALLABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_CALLABLE, IntrospectionCallableInterface)) 40 | 41 | typedef struct _IntrospectionCallable IntrospectionCallable; /* dummy typedef */ 42 | typedef struct _IntrospectionCallableInterface IntrospectionCallableInterface; 43 | 44 | struct _IntrospectionCallableInterface { 45 | GTypeInterface g_iface; 46 | 47 | /* Virtual public methods */ 48 | char *(*call_with_return) (IntrospectionCallable *callable); 49 | void (*call_no_args) (IntrospectionCallable *callable); 50 | void (*call_single_arg) (IntrospectionCallable *callable, 51 | gboolean *called); 52 | void (*call_multi_args) (IntrospectionCallable *callable, 53 | int in, 54 | int *out, 55 | int *inout); 56 | 57 | /* libpeas must have an invoker to implement an interface's vfunc */ 58 | void (*no_invoker_) (IntrospectionCallable *callable); 59 | }; 60 | 61 | /* 62 | * Public methods 63 | */ 64 | PEAS_TEST_EXPORT 65 | GType introspection_callable_get_type (void) G_GNUC_CONST; 66 | 67 | PEAS_TEST_EXPORT 68 | char *introspection_callable_call_with_return (IntrospectionCallable *callable); 69 | 70 | 71 | PEAS_TEST_EXPORT 72 | void introspection_callable_call_no_args (IntrospectionCallable *callable); 73 | 74 | PEAS_TEST_EXPORT 75 | void introspection_callable_call_single_arg (IntrospectionCallable *callable, 76 | gboolean *called); 77 | 78 | PEAS_TEST_EXPORT 79 | void introspection_callable_call_multi_args (IntrospectionCallable *callable, 80 | int in, 81 | int *out, 82 | int *inout); 83 | 84 | G_END_DECLS 85 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-has-prerequisite.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-has-prerequisite.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011-2017 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-base.h" 27 | #include "introspection-callable.h" 28 | #include "introspection-has-prerequisite.h" 29 | 30 | #include "introspection-prerequisite.h" 31 | 32 | G_DEFINE_INTERFACE_WITH_CODE(IntrospectionHasPrerequisite, 33 | introspection_has_prerequisite, 34 | INTROSPECTION_TYPE_PREREQUISITE, 35 | g_type_interface_add_prerequisite (g_define_type_id, 36 | INTROSPECTION_TYPE_BASE); 37 | g_type_interface_add_prerequisite (g_define_type_id, 38 | INTROSPECTION_TYPE_CALLABLE);) 39 | 40 | void 41 | introspection_has_prerequisite_default_init (IntrospectionHasPrerequisiteInterface *iface) 42 | { 43 | } 44 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-has-prerequisite.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-has-prerequisite.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_HAS_PREREQUISITE (introspection_has_prerequisite_get_type ()) 36 | #define INTROSPECTION_HAS_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_HAS_PREREQUISITE, IntrospectionHasPrerequisite)) 37 | #define INTROSPECTION_HAS_PREREQUISITE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_HAS_PREREQUISITE, IntrospectionHasPrerequisiteInterface)) 38 | #define INTROSPECTION_IS_HAS_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_HAS_PREREQUISITE)) 39 | #define INTROSPECTION_HAS_PREREQUISITE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_HAS_PREREQUISITE, IntrospectionHasPrerequisiteInterface)) 40 | 41 | typedef struct _IntrospectionHasPrerequisite IntrospectionHasPrerequisite; /* dummy typedef */ 42 | typedef struct _IntrospectionHasPrerequisiteInterface IntrospectionHasPrerequisiteInterface; 43 | 44 | struct _IntrospectionHasPrerequisiteInterface { 45 | GTypeInterface g_iface; 46 | }; 47 | 48 | /* 49 | * Public methods 50 | */ 51 | PEAS_TEST_EXPORT 52 | GType introspection_has_prerequisite_get_type (void) G_GNUC_CONST; 53 | 54 | G_END_DECLS 55 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-prerequisite.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-prerequisite.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-prerequisite.h" 27 | 28 | typedef struct { 29 | int value; 30 | } IntrospectionPrerequisitePrivate; 31 | 32 | G_DEFINE_TYPE_WITH_PRIVATE (IntrospectionPrerequisite, 33 | introspection_prerequisite, 34 | PEAS_TYPE_EXTENSION_BASE) 35 | 36 | #define GET_PRIV(o) \ 37 | (introspection_prerequisite_get_instance_private (o)) 38 | 39 | enum { 40 | PROP_0, 41 | PROP_PREREQUISITE_PROPERTY, 42 | N_PROPERTIES 43 | }; 44 | 45 | static GParamSpec *properties[N_PROPERTIES] = { NULL }; 46 | 47 | static void 48 | introspection_prerequisite_get_property (GObject *object, 49 | guint prop_id, 50 | GValue *value, 51 | GParamSpec *pspec) 52 | { 53 | IntrospectionPrerequisite *prereq = INTROSPECTION_PREREQUISITE (object); 54 | IntrospectionPrerequisitePrivate *priv = GET_PRIV (prereq); 55 | 56 | switch (prop_id) 57 | { 58 | case PROP_PREREQUISITE_PROPERTY: 59 | g_value_set_int (value, priv->value); 60 | break; 61 | default: 62 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 63 | break; 64 | } 65 | } 66 | 67 | static void 68 | introspection_prerequisite_set_property (GObject *object, 69 | guint prop_id, 70 | const GValue *value, 71 | GParamSpec *pspec) 72 | { 73 | IntrospectionPrerequisite *prereq = INTROSPECTION_PREREQUISITE (object); 74 | IntrospectionPrerequisitePrivate *priv = GET_PRIV (prereq); 75 | 76 | switch (prop_id) 77 | { 78 | case PROP_PREREQUISITE_PROPERTY: 79 | priv->value = g_value_get_int (value); 80 | break; 81 | default: 82 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 83 | break; 84 | } 85 | } 86 | 87 | static void 88 | introspection_prerequisite_class_init (IntrospectionPrerequisiteClass *klass) 89 | { 90 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 91 | 92 | object_class->get_property = introspection_prerequisite_get_property; 93 | object_class->set_property = introspection_prerequisite_set_property; 94 | 95 | properties[PROP_PREREQUISITE_PROPERTY] = 96 | g_param_spec_int ("prerequisite-property", 97 | "Prerequisite Property", 98 | "The IntrospectionPrerequisite", 99 | G_MININT, 100 | G_MAXINT, 101 | -1, 102 | G_PARAM_READWRITE | 103 | G_PARAM_STATIC_STRINGS); 104 | 105 | g_object_class_install_properties (object_class, N_PROPERTIES, properties); 106 | } 107 | 108 | static void 109 | introspection_prerequisite_init (IntrospectionPrerequisite *prereq) 110 | { 111 | } 112 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-prerequisite.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-prerequisite.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_PREREQUISITE (introspection_prerequisite_get_type ()) 36 | #define INTROSPECTION_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_PREREQUISITE, IntrospectionPrerequisite)) 37 | #define INTROSPECTION_PREREQUISITE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_PREREQUISITE, IntrospectionPrerequisiteClass)) 38 | #define INTROSPECTION_IS_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_PREREQUISITE)) 39 | #define INTROSPECTION_PREREQUISITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INTROSPECTION_TYPE_PREREQUISITE, IntrospectionPrerequisiteClass)) 40 | 41 | typedef struct _IntrospectionPrerequisite IntrospectionPrerequisite; 42 | typedef struct _IntrospectionPrerequisiteClass IntrospectionPrerequisiteClass; 43 | 44 | struct _IntrospectionPrerequisite { 45 | PeasExtensionBase parent; 46 | }; 47 | 48 | struct _IntrospectionPrerequisiteClass { 49 | PeasExtensionBaseClass parent_class; 50 | }; 51 | 52 | /* 53 | * Public methods 54 | */ 55 | PEAS_TEST_EXPORT 56 | GType introspection_prerequisite_get_type (void) G_GNUC_CONST; 57 | 58 | G_END_DECLS 59 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-unimplemented.c: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-unimplemented.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include "introspection-unimplemented.h" 27 | 28 | #include 29 | 30 | G_DEFINE_INTERFACE(IntrospectionUnimplemented, introspection_unimplemented, G_TYPE_OBJECT) 31 | 32 | void 33 | introspection_unimplemented_default_init (IntrospectionUnimplementedInterface *iface) 34 | { 35 | /* AFAIK there is no way to make this unimplemented but 36 | * in the tests no one will implement it so its fine. 37 | */ 38 | } 39 | 40 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/introspection-unimplemented.h: -------------------------------------------------------------------------------- 1 | /* 2 | * introspection-unimplemented.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Type checking and casting macros 34 | */ 35 | #define INTROSPECTION_TYPE_UNIMPLEMENTED (introspection_unimplemented_get_type ()) 36 | #define INTROSPECTION_UNIMPLEMENTED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_UNIMPLEMENTED, IntrospectionUnimplemented)) 37 | #define INTROSPECTION_UNIMPLEMENTED_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_UNIMPLEMENTED, IntrospectionUnimplementedInterface)) 38 | #define INTROSPECTION_IS_UNIMPLEMENTED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_UNIMPLEMENTED)) 39 | #define INTROSPECTION_UNIMPLEMENTED_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_UNIMPLEMENTED, IntrospectionUnimplementedInterface)) 40 | 41 | typedef struct _IntrospectionUnimplemented IntrospectionUnimplemented; /* dummy typedef */ 42 | typedef struct _IntrospectionUnimplementedInterface IntrospectionUnimplementedInterface; 43 | 44 | struct _IntrospectionUnimplementedInterface { 45 | GTypeInterface g_iface; 46 | }; 47 | 48 | /* 49 | * Public methods 50 | */ 51 | PEAS_TEST_EXPORT 52 | GType introspection_unimplemented_get_type (void) G_GNUC_CONST; 53 | 54 | G_END_DECLS 55 | -------------------------------------------------------------------------------- /tests/libpeas/introspection/meson.build: -------------------------------------------------------------------------------- 1 | libintrospection_name = 'introspection' 2 | libintrospection_string = '@0@-@1@'.format(libintrospection_name, api_version) 3 | 4 | libintrospection_public_h = [ 5 | 'introspection-abstract.h', 6 | 'introspection-activatable.h', 7 | 'introspection-base.h', 8 | 'introspection-callable.h', 9 | 'introspection-has-prerequisite.h', 10 | 'introspection-prerequisite.h', 11 | 'introspection-unimplemented.h', 12 | ] 13 | 14 | libintrospection_c = [ 15 | 'introspection-abstract.c', 16 | 'introspection-activatable.c', 17 | 'introspection-base.c', 18 | 'introspection-callable.c', 19 | 'introspection-has-prerequisite.c', 20 | 'introspection-prerequisite.c', 21 | 'introspection-unimplemented.c', 22 | ] 23 | 24 | libintrospection_deps = [ 25 | glib_dep, 26 | gobject_dep, 27 | libpeas_dep, 28 | ] 29 | 30 | libintrospection_c_args = [ 31 | ] 32 | 33 | libintrospection_lib = library( 34 | libintrospection_string, 35 | libintrospection_c, 36 | include_directories: rootdir, 37 | dependencies: libintrospection_deps, 38 | c_args: libintrospection_c_args, 39 | install: false, 40 | ) 41 | 42 | libintrospection_dep = declare_dependency( 43 | link_with: libintrospection_lib, 44 | include_directories: include_directories('.'), 45 | dependencies: libintrospection_deps, 46 | ) 47 | 48 | libintrospection_gir = gnome.generate_gir( 49 | libintrospection_lib, 50 | sources: libintrospection_c + libintrospection_public_h, 51 | nsversion: api_version, 52 | namespace: 'Introspection', 53 | symbol_prefix: 'introspection', 54 | identifier_prefix: 'Introspection', 55 | dependencies: [libintrospection_dep], 56 | export_packages: [libintrospection_string], 57 | link_with: libintrospection_lib, 58 | includes: ['GObject-2.0', libpeas_gir.get(0)], 59 | install: false, 60 | extra_args: [ 61 | '--warn-all', 62 | ], 63 | ) 64 | 65 | libintrospection_gir_dep = declare_dependency( 66 | sources: libintrospection_gir 67 | ) 68 | -------------------------------------------------------------------------------- /tests/libpeas/meson.build: -------------------------------------------------------------------------------- 1 | 2 | libpeas_tests_sources = [ 3 | ['engine'], 4 | ['extension-c'], 5 | ['extension-set'], 6 | ['plugin-info'], 7 | ] 8 | 9 | libpeas_tests_c_args = ['-UG_DISABLE_ASSERT', '-UG_DISABLE_CAST_CHECKS'] 10 | 11 | if build_gjs_loader == true 12 | libpeas_tests_sources += [['extension-gjs', [gjs_dep]]] 13 | endif 14 | 15 | if build_lua51_loader == true 16 | libpeas_tests_sources += [['extension-lua', [lua51_dep, luajit_dep]]] 17 | endif 18 | 19 | if build_python3_loader == true 20 | libpeas_tests_sources += [['extension-py', [python3_dep, pygobject_dep]]] 21 | 22 | libpeas_tests_c_args += [ 23 | '-DPYGOBJECT_MAJOR_VERSION=@0@'.format(pygobject_version_major), 24 | '-DPYGOBJECT_MINOR_VERSION=@0@'.format(pygobject_version_minor), 25 | '-DPYGOBJECT_MICRO_VERSION=@0@'.format(pygobject_version_micro), 26 | ] 27 | endif 28 | 29 | subdir('introspection') 30 | subdir('testing') 31 | 32 | subdir('plugins') 33 | 34 | libpeas_tests_deps = [ 35 | glib_dep, 36 | libpeas_dep, 37 | libintrospection_dep, 38 | libintrospection_gir_dep, 39 | libtesting_util_dep, 40 | libpeas_testing_dep, 41 | libembedded_dep, 42 | ] 43 | 44 | foreach test: libpeas_tests_sources 45 | test_name = test.get(0) 46 | test_sources = ['@0@.c'.format(test_name)] 47 | test_deps = libpeas_tests_deps 48 | 49 | if test.length() > 1 50 | test_deps += test.get(1) 51 | endif 52 | 53 | test_exe = executable( 54 | test_name, 55 | test_sources, 56 | dependencies: test_deps, 57 | c_args: libpeas_tests_c_args, 58 | ) 59 | 60 | test( 61 | 'test-@0@'.format(test_name), 62 | test_exe, 63 | depends: [libintrospection_gir], 64 | env: test_env, 65 | ) 66 | endforeach 67 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/embedded-invalid-loader.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=embedded-invalid-loader 3 | Embedded=peas_engine_new 4 | Loader=python 5 | Name=Embedded Invalid Loader 6 | Description=This plugin is embedded with an invalid loader. 7 | Authors=Garrett Regier 8 | Copyright=Copyright © 2015 Garrett Regier 9 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/embedded-missing-symbol.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=embedded-missing-symbol 3 | Embedded=embedded_missing_symbol__this_symbol_does_not_exist__register_types 4 | Name=Embedded Missing Symbol 5 | Description=This plugin is embedded with a missing symbol. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2015 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/embedded-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * embedded-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2015 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "../../../testing-util/peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define TESTING_TYPE_EMBEDDED_PLUGIN (testing_embedded_plugin_get_type ()) 33 | #define TESTING_EMBEDDED_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_EMBEDDED_PLUGIN, TestingEmbeddedPlugin)) 34 | #define TESTING_EMBEDDED_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_EMBEDDED_PLUGIN, TestingEmbeddedPlugin)) 35 | #define TESTING_IS_EMBEDDED_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_EMBEDDED_PLUGIN)) 36 | #define TESTING_IS_EMBEDDED_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_EMBEDDED_PLUGIN)) 37 | #define TESTING_EMBEDDED_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_EMBEDDED_PLUGIN, TestingEmbeddedPluginClass)) 38 | 39 | typedef struct _TestingEmbeddedPlugin TestingEmbeddedPlugin; 40 | typedef struct _TestingEmbeddedPluginClass TestingEmbeddedPluginClass; 41 | 42 | struct _TestingEmbeddedPlugin { 43 | PeasExtensionBase parent_instance; 44 | }; 45 | 46 | struct _TestingEmbeddedPluginClass { 47 | PeasExtensionBaseClass parent_class; 48 | }; 49 | 50 | PEAS_TEST_EXPORT 51 | GType testing_embedded_plugin_get_type (void) G_GNUC_CONST; 52 | G_MODULE_EXPORT void testing_embedded_plugin_register_types (PeasObjectModule *module); 53 | 54 | G_END_DECLS 55 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/embedded.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | embedded.plugin 5 | embedded-missing-symbol.plugin 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/embedded.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=embedded 3 | Embedded=testing_embedded_plugin_register_types 4 | Name=Embedded 5 | Description=A plugin that is embedded. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2015 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/embedded/meson.build: -------------------------------------------------------------------------------- 1 | libembedded_name = 'embedded' 2 | 3 | if cc.get_id() == 'msvc' and glib_dep.version() < '2.64.4' 4 | libembedded_link_args = ['-export:embedded_register_resource'] 5 | else 6 | libembedded_link_args = [] 7 | endif 8 | 9 | libembedded_public_h = [ 10 | 'embedded-plugin.h', 11 | ] 12 | 13 | libembedded_c = [ 14 | 'embedded-plugin.c', 15 | ] 16 | 17 | libembedded_plugin_data = [ 18 | 'embedded.gresource.xml', 19 | 'embedded.plugin', 20 | 'embedded-invalid-loader.plugin', 21 | 'embedded-missing-symbol.plugin', 22 | ] 23 | 24 | libembedded_res = gnome.compile_resources( 25 | 'embedded-resources', 26 | 'embedded.gresource.xml', 27 | export: true, 28 | extra_args: [ 29 | '--manual-register', 30 | ], 31 | ) 32 | 33 | libembedded_deps = [ 34 | glib_dep, 35 | libpeas_dep, 36 | libintrospection_dep, 37 | ] 38 | 39 | libembedded_lib = shared_library( 40 | libembedded_name, 41 | libembedded_c + libembedded_res, 42 | include_directories: rootdir, 43 | dependencies: libembedded_deps, 44 | link_args: libembedded_link_args, 45 | install: false, 46 | ) 47 | 48 | libembedded_dep = declare_dependency( 49 | sources: libembedded_res[1], 50 | link_with: libembedded_lib, 51 | include_directories: include_directories('.'), 52 | dependencies: libembedded_deps, 53 | ) 54 | 55 | custom_target( 56 | '@0@-data'.format(libembedded_name), 57 | input: libembedded_plugin_data, 58 | output: libembedded_plugin_data, 59 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 60 | build_by_default: true, 61 | ) 62 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c-nonexistent.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-c-nonexistent 3 | Name=Extension C Nonexistent 4 | Description=This plugin is nonexistent. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2011 Garrett Regier 7 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c-abstract.c: -------------------------------------------------------------------------------- 1 | /* 2 | * extension-c-abstract.c 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include 27 | 28 | #include 29 | 30 | #include "extension-c-abstract.h" 31 | 32 | G_DEFINE_DYNAMIC_TYPE (TestingExtensionCAbstract, 33 | testing_extension_c_abstract, 34 | INTROSPECTION_TYPE_ABSTRACT) 35 | 36 | static void 37 | testing_extension_c_abstract_init (TestingExtensionCAbstract *abstract) 38 | { 39 | } 40 | 41 | static void 42 | testing_extension_c_abstract_class_init (TestingExtensionCAbstractClass *klass) 43 | { 44 | } 45 | 46 | static void 47 | testing_extension_c_abstract_class_finalize (TestingExtensionCAbstractClass *klass) 48 | { 49 | } 50 | 51 | void 52 | testing_extension_c_abstract_register (GTypeModule *module) 53 | { 54 | testing_extension_c_abstract_register_type (module); 55 | } 56 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c-abstract.h: -------------------------------------------------------------------------------- 1 | /* 2 | * extension-c-abstract.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2017 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "introspection-abstract.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_EXTENSION_C_ABSTRACT (testing_extension_c_abstract_get_type ()) 31 | #define TESTING_EXTENSION_C_ABSTRACT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_EXTENSION_C_ABSTRACT, TestingExtensionCAbstract)) 32 | #define TESTING_EXTENSION_C_ABSTRACT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_EXTENSION_C_ABSTRACT, TestingExtensionCAbstract)) 33 | #define TESTING_IS_EXTENSION_C_ABSTRACT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_EXTENSION_C_ABSTRACT)) 34 | #define TESTING_IS_EXTENSION_C_ABSTRACT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_EXTENSION_C_ABSTRACT)) 35 | #define TESTING_EXTENSION_C_ABSTRACT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_EXTENSION_C_ABSTRACT, TestingExtensionCAbstractClass)) 36 | 37 | typedef struct _TestingExtensionCAbstract TestingExtensionCAbstract; 38 | typedef struct _TestingExtensionCAbstractClass TestingExtensionCAbstractClass; 39 | 40 | struct _TestingExtensionCAbstract { 41 | IntrospectionAbstract parent_instance; 42 | }; 43 | 44 | struct _TestingExtensionCAbstractClass { 45 | IntrospectionAbstractClass parent_class; 46 | }; 47 | 48 | GType testing_extension_c_abstract_get_type (void) G_GNUC_CONST; 49 | void testing_extension_c_abstract_register (GTypeModule *module); 50 | 51 | G_END_DECLS 52 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c-missing-symbol-plugin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * extension-c-missing-symbol-plugin.c 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2014 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #if 0 25 | G_MODULE_EXPORT void 26 | peas_register_types (PeasObjectModule *module) 27 | { 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c-missing-symbol.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-c-missing-symbol 3 | Name=Extension C Missing Symbol 4 | Description=This plugin is missing peas_register_types. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2014 Garrett Regier 7 | Website=https://wiki.gnome.org/Projects/Libpeas 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * extension-c-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_EXTENSION_C_PLUGIN (testing_extension_c_plugin_get_type ()) 31 | #define TESTING_EXTENSION_C_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_EXTENSION_C_PLUGIN, TestingExtensionCPlugin)) 32 | #define TESTING_EXTENSION_C_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_EXTENSION_C_PLUGIN, TestingExtensionCPlugin)) 33 | #define TESTING_IS_EXTENSION_C_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_EXTENSION_C_PLUGIN)) 34 | #define TESTING_IS_EXTENSION_C_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_EXTENSION_C_PLUGIN)) 35 | #define TESTING_EXTENSION_C_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_EXTENSION_C_PLUGIN, TestingExtensionCPluginClass)) 36 | 37 | typedef struct _TestingExtensionCPlugin TestingExtensionCPlugin; 38 | typedef struct _TestingExtensionCPluginClass TestingExtensionCPluginClass; 39 | 40 | struct _TestingExtensionCPlugin { 41 | PeasExtensionBase parent_instance; 42 | }; 43 | 44 | struct _TestingExtensionCPluginClass { 45 | PeasExtensionBaseClass parent_class; 46 | }; 47 | 48 | /* Used by the local linkage test */ 49 | G_MODULE_EXPORT gpointer global_symbol_clash; 50 | 51 | GType testing_extension_c_plugin_get_type (void) G_GNUC_CONST; 52 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 53 | 54 | G_END_DECLS 55 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 'Blah' 5 | Just a setting. 6 | Just a setting. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/extension-c.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-c 3 | Name=Extension C 4 | Description=This plugin is for the C GObject tests. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2010 Garrett Regier 7 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-c/meson.build: -------------------------------------------------------------------------------- 1 | libextension_c_name = 'extension-c' 2 | libextension_c_missing_name = 'extension-c-missing-symbol' 3 | 4 | libextension_c_public_h = [ 5 | 'extension-c-abstract.h', 6 | 'extension-c-plugin.h', 7 | ] 8 | 9 | libextension_c_c = [ 10 | 'extension-c-abstract.c', 11 | 'extension-c-plugin.c', 12 | ] 13 | 14 | libextension_c_plugin_data = [ 15 | 'extension-c.gschema.xml', 16 | 'extension-c.plugin', 17 | ] 18 | 19 | libextension_c_deps = [ 20 | glib_dep, 21 | gmodule_dep, 22 | libpeas_dep, 23 | libintrospection_dep, 24 | ] 25 | 26 | libextension_c_lib = shared_library( 27 | libextension_c_name, 28 | libextension_c_c, 29 | include_directories: rootdir, 30 | dependencies: libextension_c_deps, 31 | install: false, 32 | ) 33 | 34 | custom_target( 35 | 'lib@0@-data'.format(libextension_c_name), 36 | input: libextension_c_plugin_data, 37 | output: libextension_c_plugin_data, 38 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 39 | build_by_default: true, 40 | ) 41 | 42 | libextension_c_missing_c = [ 43 | 'extension-c-missing-symbol-plugin.c', 44 | ] 45 | 46 | libextension_c_missing_plugin_data = [ 47 | 'extension-c-missing-symbol.plugin', 48 | ] 49 | 50 | libextension_c_missing_lib = shared_library( 51 | libextension_c_missing_name, 52 | libextension_c_missing_c, 53 | include_directories: rootdir, 54 | dependencies: libextension_c_deps, 55 | install: false, 56 | ) 57 | 58 | custom_target( 59 | 'lib@0@-data'.format(libextension_c_missing_name), 60 | input: libextension_c_missing_plugin_data, 61 | output: libextension_c_missing_plugin_data, 62 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 63 | build_by_default: true, 64 | ) 65 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-gjs-nonexistent.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-gjs-nonexistent 3 | Loader=gjs 4 | Name=Extension GJS Nonexistent 5 | Description=This plugin is nonexistent. 6 | Authors=Christian Hergert 7 | Copyright=Copyright © 2023 Christian Hergert 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-gjs/extension-gjs.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 'Blah' 5 | Just a setting. 6 | Just a setting. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-gjs/extension-gjs.js: -------------------------------------------------------------------------------- 1 | /* 2 | * extension-gjs.js 3 | * This file is part of libpeas 4 | * 5 | * Copyright 2023 Christian Hergert 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | import Gio from 'gi://Gio'; 25 | import GObject from 'gi://GObject'; 26 | import Introspection from 'gi://Introspection'; 27 | import Peas from 'gi://Peas'; 28 | 29 | export let ExtensionGJSAbstract = GObject.registerClass({ 30 | GTypeName: 'ExtensionGJSAbstract', 31 | }, class ExtensionGJSAbstract extends Introspection.Abstract {}); 32 | 33 | export let ExtensionGJSPlugin = GObject.registerClass({ 34 | GTypeName: 'ExtensionGJSPlugin', 35 | Implements: [ 36 | Introspection.Callable, 37 | Introspection.Activatable, 38 | Introspection.Base, 39 | Introspection.HasPrerequisite, 40 | ], 41 | Properties: { 42 | 'object': GObject.ParamSpec.object('object', null, null, GObject.ParamFlags.READWRITE, GObject.Object), 43 | 'plugin-info': GObject.ParamSpec.object('plugin-info', null, null, GObject.ParamFlags.READWRITE, Peas.PluginInfo), 44 | 'update-count': GObject.ParamSpec.int('update-count', null, null, GObject.ParamFlags.READABLE, 0, 1000000, 0), 45 | }, 46 | }, class ExtensionGJSPlugin extends Introspection.Prerequisite { 47 | 48 | get update_count() { 49 | if (this._update_count === undefined) 50 | this._update_count = 0; 51 | return this._update_count; 52 | } 53 | 54 | vfunc_activate() { 55 | this._update_count += 1; 56 | } 57 | 58 | vfunc_get_plugin_info() { 59 | return this.plugin_info; 60 | } 61 | 62 | vfunc_get_settings() { 63 | return this.plugin_info.get_settings(null); 64 | } 65 | 66 | vfunc_call_with_return() { 67 | return "Hello, World!"; 68 | } 69 | 70 | vfunc_call_single_arg() { 71 | return true; 72 | } 73 | 74 | vfunc_call_multi_args(in_, inout) { 75 | return [inout, in_]; 76 | } 77 | } 78 | ); 79 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-gjs/extension-gjs.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-gjs 3 | Loader=gjs 4 | Name=Extension GJS 5 | Description=This plugin is for the GJS GObject tests. 6 | Authors=Christian Hergert 7 | Copyright=Copyright © 2023 Christian Hergert 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-gjs/meson.build: -------------------------------------------------------------------------------- 1 | extension_gjs_name = 'extension-gjs' 2 | 3 | extension_gjs_plugin_data = [ 4 | 'extension-gjs.gschema.xml', 5 | 'extension-gjs.js', 6 | 'extension-gjs.plugin', 7 | ] 8 | 9 | custom_target( 10 | '@0@-data'.format(extension_gjs_name), 11 | input: extension_gjs_plugin_data, 12 | output: extension_gjs_plugin_data, 13 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 14 | build_by_default: true, 15 | ) 16 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-lua/extension-lua51.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 'Blah' 5 | Just a setting. 6 | Just a setting. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-lua/extension-lua51.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- Copyright (C) 2014 - Garrett Regier 3 | -- 4 | -- libpeas 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 2.1 of the License, or (at your option) any later version. 8 | -- 9 | -- libpeas 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 St, Fifth Floor, Boston, MA 02110-1301 USA. 17 | 18 | local lgi = require 'lgi' 19 | 20 | local GObject = lgi.GObject 21 | local Introspection = lgi.Introspection 22 | local Peas = lgi.Peas 23 | 24 | 25 | local ExtensionLuaAbstract = 26 | Introspection.Abstract:derive('ExtensionLuaAbstract') 27 | 28 | 29 | local ExtensionLuaPlugin = 30 | Introspection.Prerequisite:derive('ExtensionLuaPlugin', { 31 | Introspection.Activatable, 32 | Introspection.Base, 33 | Introspection.Callable, 34 | Introspection.HasPrerequisite }) 35 | 36 | ExtensionLuaPlugin._property.object = 37 | GObject.ParamSpecObject('object', 'object', 'object', 38 | GObject.Object._gtype, 39 | { GObject.ParamFlags.READABLE, 40 | GObject.ParamFlags.WRITABLE }) 41 | 42 | ExtensionLuaPlugin._property.update_count = 43 | GObject.ParamSpecInt('update-count', 'update-count', 'update-count', 44 | 0, 1000000, 0, 45 | { GObject.ParamFlags.READABLE }) 46 | 47 | function ExtensionLuaPlugin:_init() 48 | self.priv.update_count = 0 49 | end 50 | 51 | function ExtensionLuaPlugin:do_activate() 52 | collectgarbage('restart') 53 | end 54 | 55 | function ExtensionLuaPlugin:do_deactivate() 56 | collectgarbage('stop') 57 | end 58 | 59 | function ExtensionLuaPlugin:do_update_state() 60 | self.priv.update_count = self.priv.update_count + 1 61 | end 62 | 63 | function ExtensionLuaPlugin:do_get_plugin_info() 64 | return self.priv.plugin_info 65 | end 66 | 67 | function ExtensionLuaPlugin:do_get_settings() 68 | return self.priv.plugin_info:get_settings(nil) 69 | end 70 | 71 | function ExtensionLuaPlugin:do_call_no_args() 72 | end 73 | 74 | function ExtensionLuaPlugin:do_call_with_return() 75 | return 'Hello, World!' 76 | end 77 | 78 | function ExtensionLuaPlugin:do_call_single_arg() 79 | return true 80 | end 81 | 82 | function ExtensionLuaPlugin:do_call_multi_args(in_, inout) 83 | return inout, in_ 84 | end 85 | 86 | -- Test strict mode 87 | local UNIQUE = {} 88 | 89 | local function assert_error(success, result) 90 | assert(not success, result) 91 | end 92 | 93 | assert_error(pcall(function() _G[UNIQUE] = true end)) 94 | assert(pcall(function() 95 | rawset(_G, UNIQUE, true) 96 | assert(_G[UNIQUE] == true) 97 | _G[UNIQUE] = nil 98 | end)) 99 | assert_error(pcall(function() _G[UNIQUE] = true end)) 100 | assert(pcall(function() 101 | __STRICT = false 102 | _G[UNIQUE] = true 103 | _G[UNIQUE] = nil 104 | __STRICT = true 105 | end)) 106 | 107 | return { ExtensionLuaAbstract, ExtensionLuaPlugin } 108 | 109 | -- ex:set ts=4 et sw=4 ai: 110 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-lua/extension-lua51.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-lua51 3 | Loader=lua5.1 4 | Name=Extension lua5.1 5 | Description=This plugin is for the lua5.1 GObject tests. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2014 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-lua/meson.build: -------------------------------------------------------------------------------- 1 | extension_lua_name = 'extension-lua' 2 | 3 | extension_lua_plugin_data = [ 4 | 'extension-lua51.gschema.xml', 5 | 'extension-lua51.lua', 6 | 'extension-lua51.plugin', 7 | ] 8 | 9 | custom_target( 10 | '@0@-data'.format(extension_lua_name), 11 | input: extension_lua_plugin_data, 12 | output: extension_lua_plugin_data, 13 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 14 | build_by_default: true, 15 | ) 16 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-lua51-nonexistent.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-lua51-nonexistent 3 | Loader=lua5.1 4 | Name=Extension lua5.1 Nonexistent 5 | Description=This plugin is nonexistent. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2014 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-python-nonexistent.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-python-nonexistent 3 | Loader=python 4 | Name=Extension Python Nonexistent 5 | Description=This plugin is nonexistent. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2011 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-python/extension-py.gschema.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 'Blah' 5 | Just a setting. 6 | Just a setting. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-python/extension-py.plugin.in: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=extension-@PY_LOADER@ 3 | Loader=@PY_LOADER@ 4 | Name=Extension @PY_LOADER@ 5 | Description=This plugin is for the @PY_LOADER@ GObject tests. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2010 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-python/extension-py.py.in: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # extension-py.py.in 4 | # This file is part of libpeas 5 | # 6 | # Copyright (C) 2011-2014 Garrett Regier 7 | # 8 | # libpeas is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU Lesser General Public 10 | # License as published by the Free Software Foundation; either 11 | # version 2.1 of the License, or (at your option) any later version. 12 | # 13 | # libpeas is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | # Lesser General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU Lesser General Public 19 | # License along with this library; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21 | 22 | import threading 23 | 24 | from gi.repository import GObject, Introspection 25 | 26 | 27 | __all__ = [ 'ExtensionPythonAbstract', 'ExtensionPythonPlugin' ] 28 | 29 | 30 | class ExtensionPythonAbstract(Introspection.Abstract): 31 | pass 32 | 33 | 34 | class ExtensionPythonPlugin(Introspection.Prerequisite, 35 | Introspection.Activatable, 36 | Introspection.Base, Introspection.Callable, 37 | Introspection.HasPrerequisite): 38 | 39 | object = GObject.Property(type=GObject.Object) 40 | update_count = GObject.Property(type=int, default=0, minimum=0) 41 | 42 | def __init__(self): 43 | self.__lock = threading.Lock() 44 | 45 | def do_activate(self): 46 | pass 47 | 48 | def do_deactivate(self): 49 | pass 50 | 51 | def do_update_state(self): 52 | with self.__lock: 53 | self.update_count += 1 54 | 55 | def do_get_plugin_info(self): 56 | return self.plugin_info 57 | 58 | def do_get_settings(self): 59 | return self.plugin_info.get_settings(None) 60 | 61 | def do_call_with_return(self): 62 | return "Hello, World!" 63 | 64 | def do_call_no_args(self): 65 | pass 66 | 67 | def do_call_single_arg(self): 68 | return True 69 | 70 | def do_call_multi_args(self, in_, inout): 71 | return (inout, in_) 72 | 73 | # ex:set ts=4 et sw=4 ai: 74 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/extension-python/meson.build: -------------------------------------------------------------------------------- 1 | extension_python_name = 'extension-python' 2 | 3 | python3_in = configuration_data() 4 | python3_in.set('PY_LOADER', 'python') 5 | 6 | configure_file( 7 | input: 'extension-py.gschema.xml.in', 8 | output: 'extension-python.gschema.xml', 9 | configuration: python3_in, 10 | ) 11 | 12 | configure_file( 13 | input: 'extension-py.plugin.in', 14 | output: 'extension-python.plugin', 15 | configuration: python3_in, 16 | ) 17 | 18 | configure_file( 19 | input: 'extension-py.py.in', 20 | output: 'extension-python.py', 21 | configuration: python3_in, 22 | ) 23 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/info-missing-module.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Name=Info Missing Module 3 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/info-missing-name.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=info-missing-name 3 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/invalid.plugin: -------------------------------------------------------------------------------- 1 | This is to test for an invalid GKeyFile formatted PeasPluginInfo. 2 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/meson.build: -------------------------------------------------------------------------------- 1 | libpeas_plugins_data = [ 2 | 'extension-c-nonexistent.plugin', 3 | 'extension-gjs-nonexistent.plugin', 4 | 'extension-lua51-nonexistent.plugin', 5 | 'extension-python-nonexistent.plugin', 6 | 'info-missing-module.plugin', 7 | 'info-missing-name.plugin', 8 | 'invalid.plugin', 9 | 'nonexistent-dep.plugin', 10 | 'not-loadable.plugin', 11 | 'os-dependant-help.plugin', 12 | 'two-deps.plugin', 13 | 'unkown-loader.plugin', 14 | ] 15 | 16 | custom_target( 17 | 'libpeas-test-data', 18 | input: libpeas_plugins_data, 19 | output: libpeas_plugins_data, 20 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 21 | build_by_default: true, 22 | ) 23 | 24 | subdir('embedded') 25 | subdir('extension-c') 26 | 27 | if build_gjs_loader == true 28 | subdir('extension-gjs') 29 | endif 30 | 31 | if build_lua51_loader == true 32 | subdir('extension-lua') 33 | endif 34 | 35 | if build_python3_loader == true 36 | subdir('extension-python') 37 | endif 38 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/nonexistent-dep.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=nonexistent-dep 3 | Depends=does-not-exist 4 | Name=Nonexistent Dependency 5 | Description=This plugin has a nonexistent dependency. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2011 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/not-loadable.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=not-loadable 3 | Name=Not loadable 4 | Description=This plugin is not loadable. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2011 Garrett Regier 7 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/os-dependant-help.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=os-dependant-help 3 | Name=OS Dependant Help 4 | Description=This plugin is for the testing OS dependant help. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2011 Garrett Regier 7 | Help=should-not-be-displayed 8 | Help-GNOME=GNOME 9 | Help-MacOS-X=MacOS-X 10 | Help-Windows=Windows 11 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/two-deps.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=two-deps 3 | Depends=loadable;builtin 4 | Name=Two Deps 5 | Description=This plugin cannot be loaded and has two deps. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2015 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/plugins/unkown-loader.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=unkown-loader 3 | Loader=does-not-exist 4 | Name=Unkown Loader 5 | Description=This plugin has an unkown loader. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2011 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/libpeas/testing/meson.build: -------------------------------------------------------------------------------- 1 | libpeas_testing_name = 'libpeas-testing' 2 | libpeas_testing_string = '@0@-@1@'.format(libpeas_testing_name, api_version) 3 | 4 | libpeas_testing_public_h = [ 5 | 'testing.h', 6 | 'testing-extension.h', 7 | ] 8 | 9 | libpeas_testing_c = [ 10 | 'testing.c', 11 | 'testing-extension.c', 12 | ] 13 | 14 | libpeas_testing_deps = [ 15 | glib_dep, 16 | introspection_dep, 17 | libpeas_dep, 18 | libtesting_util_dep, 19 | libintrospection_dep, 20 | ] 21 | 22 | libpeas_testing_c_args = [ 23 | '-DBUILDDIR="@0@"'.format(builddir), 24 | '-DSRCDIR="@0@"'.format(srcdir), 25 | '-UG_DISABLE_ASSERT', 26 | '-UG_DISABLE_CAST_CHEKCS', 27 | ] 28 | 29 | libpeas_testing_lib = library( 30 | libpeas_testing_string, 31 | libpeas_testing_c, 32 | include_directories: rootdir, 33 | dependencies: libpeas_testing_deps, 34 | c_args: libpeas_testing_c_args, 35 | install: false, 36 | ) 37 | 38 | libpeas_testing_dep = declare_dependency( 39 | link_with: libpeas_testing_lib, 40 | include_directories: include_directories('.'), 41 | dependencies: libpeas_testing_deps, 42 | ) 43 | -------------------------------------------------------------------------------- /tests/libpeas/testing/testing-extension.h: -------------------------------------------------------------------------------- 1 | /* 2 | * testing-extension.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "testing.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | PEAS_TEST_EXPORT 33 | void testing_extension_basic (const char *loader); 34 | PEAS_TEST_EXPORT 35 | void testing_extension_add (const char *path, 36 | GTestDataFunc func); 37 | PEAS_TEST_EXPORT 38 | int testing_extension_run_tests (void); 39 | 40 | #define testing_extension_all(loader) \ 41 | testing_extension_basic (loader); 42 | 43 | /* These macros are here to add loader-specific tests. */ 44 | #define EXTENSION_TEST_NAME(loader, path) \ 45 | ("/extension/" G_STRINGIFY (loader) "/" path) 46 | 47 | #define EXTENSION_TEST(loader, path, func) \ 48 | testing_extension_add (EXTENSION_TEST_NAME (loader, path), \ 49 | (GTestDataFunc) test_extension_##loader##_##func) 50 | 51 | #define EXTENSION_TEST_FUNC(loader, path, func) \ 52 | g_test_add_func (EXTENSION_TEST_NAME (loader, path), \ 53 | (GTestFunc) test_extension_##loader##_##func) 54 | 55 | G_END_DECLS 56 | -------------------------------------------------------------------------------- /tests/libpeas/testing/testing.c: -------------------------------------------------------------------------------- 1 | /* 2 | * testing.c 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #include "config.h" 25 | 26 | #include 27 | 28 | #include 29 | 30 | #if GLIB_CHECK_VERSION(2, 85, 0) 31 | # include 32 | #else 33 | # include 34 | #endif 35 | 36 | #include 37 | 38 | #include "testing.h" 39 | 40 | void 41 | testing_init (int *argc, 42 | char ***argv) 43 | { 44 | GError *error = NULL; 45 | static gboolean initialized = FALSE; 46 | GIRepository *repository; 47 | 48 | if (initialized) 49 | return; 50 | 51 | testing_util_envars (); 52 | 53 | g_test_init (argc, argv, NULL); 54 | 55 | /* Must be after g_test_init() changes the log settings*/ 56 | testing_util_init (); 57 | 58 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 59 | #if GLIB_CHECK_VERSION(2, 85, 0) 60 | repository = gi_repository_dup_default (); 61 | gi_repository_require_private (repository, 62 | #else 63 | repository = g_object_ref (g_irepository_get_default ()); 64 | g_irepository_require_private (repository, 65 | #endif 66 | BUILDDIR "/tests/libpeas/introspection", 67 | "Introspection", API_VERSION_S, 0, &error); 68 | g_assert_no_error (error); 69 | g_clear_object (&repository); 70 | 71 | initialized = TRUE; 72 | } 73 | 74 | PeasEngine * 75 | testing_engine_new_full (gboolean nonglobal_loaders) 76 | { 77 | PeasEngine *engine; 78 | 79 | testing_util_push_log_hook ("*Bad plugin file *invalid.plugin*"); 80 | testing_util_push_log_hook ("*Error loading *invalid.plugin*"); 81 | 82 | testing_util_push_log_hook ("*Could not find 'Module' in " 83 | "*info-missing-module.plugin*"); 84 | testing_util_push_log_hook ("*Error loading *info-missing-module.plugin*"); 85 | 86 | testing_util_push_log_hook ("*Could not find 'Name' in " 87 | "*info-missing-name.plugin*"); 88 | testing_util_push_log_hook ("*Error loading *info-missing-name.plugin*"); 89 | 90 | testing_util_push_log_hook ("*Unkown 'Loader' in " 91 | "*unkown-loader.plugin* does-not-exist"); 92 | testing_util_push_log_hook ("*Error loading *unkown-loader.plugin*"); 93 | 94 | testing_util_push_log_hook ("Bad plugin file '" 95 | BUILDDIR "*" G_DIR_SEPARATOR_S "embedded*.plugin': " 96 | "embedded plugins must be a resource"); 97 | testing_util_push_log_hook ("Error loading '" 98 | BUILDDIR "*" G_DIR_SEPARATOR_S "embedded*.plugin'*"); 99 | 100 | testing_util_push_log_hook ("Bad plugin file '" 101 | BUILDDIR "*embedded-invalid-loader.plugin': " 102 | "embedded plugins must use the C plugin loader"); 103 | 104 | /* Must be after pushing log hooks */ 105 | engine = testing_util_engine_new_full (nonglobal_loaders); 106 | 107 | peas_engine_add_search_path (engine, 108 | "resource:///org/gnome/libpeas/" 109 | "tests/plugins", NULL); 110 | peas_engine_add_search_path (engine, 111 | BUILDDIR "/tests/libpeas/plugins", 112 | SRCDIR "/tests/libpeas/plugins"); 113 | 114 | return engine; 115 | } 116 | -------------------------------------------------------------------------------- /tests/libpeas/testing/testing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * testing.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | PEAS_TEST_EXPORT 32 | void testing_init (int *argc, 33 | char ***argv); 34 | 35 | PEAS_TEST_EXPORT 36 | PeasEngine *testing_engine_new_full (gboolean nonglobal_loaders); 37 | 38 | #define testing_engine_new() (testing_engine_new_full (FALSE)) 39 | 40 | /* libtesting-util functions which do not need to be overridden */ 41 | #define testing_engine_free testing_util_engine_free 42 | #define testing_run_tests testing_util_run_tests 43 | 44 | G_END_DECLS 45 | -------------------------------------------------------------------------------- /tests/meson.build: -------------------------------------------------------------------------------- 1 | test_env = [ 2 | 'G_DEBUG=gc-friendly', 3 | 'GSETTINGS_BACKEND=memory', 4 | 'MALLOC_CHECK_=2', 5 | 'NO_AT_BRIDGE=1', 6 | ] 7 | 8 | subdir('testing-util') 9 | subdir('libpeas') 10 | subdir('plugins') 11 | -------------------------------------------------------------------------------- /tests/plugins/builtin/builtin-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * builtin-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_BUILTIN_PLUGIN (testing_builtin_plugin_get_type ()) 31 | #define TESTING_BUILTIN_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_BUILTIN_PLUGIN, TestingBuiltinPlugin)) 32 | #define TESTING_BUILTIN_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_BUILTIN_PLUGIN, TestingBuiltinPlugin)) 33 | #define TESTING_IS_BUILTIN_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_BUILTIN_PLUGIN)) 34 | #define TESTING_IS_BUILTIN_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_BUILTIN_PLUGIN)) 35 | #define TESTING_BUILTIN_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_BUILTIN_PLUGIN, TestingBuiltinPluginClass)) 36 | 37 | typedef struct _TestingBuiltinPlugin TestingBuiltinPlugin; 38 | typedef struct _TestingBuiltinPluginClass TestingBuiltinPluginClass; 39 | 40 | struct _TestingBuiltinPlugin { 41 | PeasExtensionBase parent_instance; 42 | }; 43 | 44 | struct _TestingBuiltinPluginClass { 45 | PeasExtensionBaseClass parent_class; 46 | }; 47 | 48 | GType testing_builtin_plugin_get_type (void) G_GNUC_CONST; 49 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 50 | 51 | G_END_DECLS 52 | -------------------------------------------------------------------------------- /tests/plugins/builtin/builtin.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=builtin 3 | Name=Builtin 4 | Description=A plugin that can be loaded and is builtin. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2010 Garrett Regier 7 | Builtin=true 8 | -------------------------------------------------------------------------------- /tests/plugins/builtin/meson.build: -------------------------------------------------------------------------------- 1 | libbuiltin_name = 'builtin' 2 | 3 | libbuiltin_public_h = [ 4 | 'builtin-plugin.h', 5 | ] 6 | 7 | libbuiltin_c = [ 8 | 'builtin-plugin.c', 9 | ] 10 | 11 | libbuiltin_plugin_data = [ 12 | 'builtin.plugin', 13 | ] 14 | 15 | libbuiltin_plugin_deps = [ 16 | glib_dep, 17 | gobject_dep, 18 | libpeas_dep, 19 | libintrospection_dep, 20 | ] 21 | 22 | libbuiltin_lib = shared_library( 23 | libbuiltin_name, 24 | libbuiltin_c, 25 | dependencies: libbuiltin_plugin_deps, 26 | install: false, 27 | ) 28 | 29 | custom_target( 30 | 'lib@0@-data'.format(libbuiltin_name), 31 | input: libbuiltin_plugin_data, 32 | output: libbuiltin_plugin_data, 33 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 34 | build_by_default: true, 35 | ) 36 | -------------------------------------------------------------------------------- /tests/plugins/full-info.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=full-info 3 | Depends=something;something-else 4 | Builtin=true 5 | Name=Full Info 6 | Description=Has full info. 7 | Authors=Garrett Regier 8 | Copyright=Copyright © 2010 Garrett Regier 9 | Website=https://wiki.gnome.org/Projects/Libpeas 10 | Icon=gtk-ok 11 | Version=1.0 12 | Help=Help Me! 13 | X-External=external data 14 | -------------------------------------------------------------------------------- /tests/plugins/has-dep/has-dep-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * has-dep-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_HAS_DEP_PLUGIN (testing_has_dep_plugin_get_type ()) 31 | #define TESTING_HAS_DEP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_HAS_DEP_PLUGIN, TestingHasDepPlugin)) 32 | #define TESTING_HAS_DEP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_HAS_DEP_PLUGIN, TestingHasDepPlugin)) 33 | #define TESTING_IS_HAS_DEP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_HAS_DEP_PLUGIN)) 34 | #define TESTING_IS_HAS_DEP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_HAS_DEP_PLUGIN)) 35 | #define TESTING_HAS_DEP_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_HAS_DEP_PLUGIN, TestingHasDepPluginClass)) 36 | 37 | typedef struct _TestingHasDepPlugin TestingHasDepPlugin; 38 | typedef struct _TestingHasDepPluginClass TestingHasDepPluginClass; 39 | 40 | struct _TestingHasDepPlugin { 41 | PeasExtensionBase parent_instance; 42 | }; 43 | 44 | struct _TestingHasDepPluginClass { 45 | PeasExtensionBaseClass parent_class; 46 | }; 47 | 48 | GType testing_has_dep_plugin_get_type (void) G_GNUC_CONST; 49 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 50 | 51 | G_END_DECLS 52 | -------------------------------------------------------------------------------- /tests/plugins/has-dep/has-dep.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=has-dep 3 | Depends=loadable 4 | Name=Has Dep 5 | Description=This plugin can be loaded and has a dep. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2010 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/plugins/has-dep/meson.build: -------------------------------------------------------------------------------- 1 | libhas_dep_name = 'has-dep' 2 | 3 | libhas_dep_public_h = [ 4 | 'has-dep-plugin.h', 5 | ] 6 | 7 | libhas_dep_c = [ 8 | 'has-dep-plugin.c', 9 | ] 10 | 11 | libhas_dep_plugin_data = [ 12 | 'has-dep.plugin', 13 | ] 14 | 15 | libhas_dep_plugin_deps = [ 16 | glib_dep, 17 | gobject_dep, 18 | gmodule_dep, 19 | libpeas_dep, 20 | libintrospection_dep, 21 | ] 22 | 23 | libhas_dep_lib = shared_library( 24 | libhas_dep_name, 25 | libhas_dep_c, 26 | dependencies: libhas_dep_plugin_deps, 27 | install: false, 28 | ) 29 | 30 | custom_target( 31 | 'lib@0@-data'.format(libhas_dep_name), 32 | input: libhas_dep_plugin_data, 33 | output: libhas_dep_plugin_data, 34 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 35 | build_by_default: true, 36 | ) 37 | -------------------------------------------------------------------------------- /tests/plugins/loadable/loadable-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * loadable-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_LOADABLE_PLUGIN (testing_loadable_plugin_get_type ()) 31 | #define TESTING_LOADABLE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_LOADABLE_PLUGIN, TestingLoadablePlugin)) 32 | #define TESTING_LOADABLE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_LOADABLE_PLUGIN, TestingLoadablePlugin)) 33 | #define TESTING_IS_LOADABLE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_LOADABLE_PLUGIN)) 34 | #define TESTING_IS_LOADABLE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_LOADABLE_PLUGIN)) 35 | #define TESTING_LOADABLE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_LOADABLE_PLUGIN, TestingLoadablePluginClass)) 36 | 37 | typedef struct _TestingLoadablePlugin TestingLoadablePlugin; 38 | typedef struct _TestingLoadablePluginClass TestingLoadablePluginClass; 39 | 40 | struct _TestingLoadablePlugin { 41 | /* Inherit from GObject and not PeasExtensionBase 42 | * to check that it is possible 43 | */ 44 | GObject parent_instance; 45 | }; 46 | 47 | struct _TestingLoadablePluginClass { 48 | PeasExtensionBaseClass parent_class; 49 | }; 50 | 51 | /* Used by the local linkage test */ 52 | G_MODULE_EXPORT gpointer global_symbol_clash; 53 | 54 | GType testing_loadable_plugin_get_type (void) G_GNUC_CONST; 55 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 56 | 57 | G_END_DECLS 58 | -------------------------------------------------------------------------------- /tests/plugins/loadable/loadable.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=loadable 3 | Name=Loadable 4 | Description=A plugin that can be loaded. 5 | Authors=Garrett Regier 6 | Copyright=Copyright © 2010 Garrett Regier 7 | -------------------------------------------------------------------------------- /tests/plugins/loadable/meson.build: -------------------------------------------------------------------------------- 1 | libloadable_name = 'loadable' 2 | 3 | libloadable_public_h = [ 4 | 'loadable-plugin.h', 5 | ] 6 | 7 | libloadable_c = [ 8 | 'loadable-plugin.c', 9 | ] 10 | 11 | libloadable_plugin_data = [ 12 | 'loadable.plugin', 13 | ] 14 | 15 | libloadable_plugin_deps = [ 16 | glib_dep, 17 | gobject_dep, 18 | libpeas_dep, 19 | libintrospection_dep, 20 | ] 21 | 22 | libloadable_lib = shared_library( 23 | libloadable_name, 24 | libloadable_c, 25 | dependencies: libloadable_plugin_deps, 26 | install: false, 27 | ) 28 | 29 | custom_target( 30 | 'lib@0@-data'.format(libloadable_name), 31 | input: libloadable_plugin_data, 32 | output: libloadable_plugin_data, 33 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 34 | build_by_default: true, 35 | ) 36 | -------------------------------------------------------------------------------- /tests/plugins/meson.build: -------------------------------------------------------------------------------- 1 | generic_name = 'generic' 2 | 3 | generic_plugins_data = [ 4 | 'full-info.plugin', 5 | 'min-info.plugin', 6 | 'unavailable.plugin', 7 | ] 8 | 9 | custom_target( 10 | '@0@-data'.format(generic_name), 11 | input: generic_plugins_data, 12 | output: generic_plugins_data, 13 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 14 | build_by_default: true, 15 | ) 16 | 17 | subdir('builtin') 18 | subdir('has-dep') 19 | subdir('loadable') 20 | subdir('self-dep') 21 | -------------------------------------------------------------------------------- /tests/plugins/min-info.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=min-info 3 | Name=Min Info 4 | -------------------------------------------------------------------------------- /tests/plugins/self-dep/meson.build: -------------------------------------------------------------------------------- 1 | libself_dep_name = 'self-dep' 2 | 3 | libself_dep_public_h = [ 4 | 'self-dep-plugin.h', 5 | ] 6 | 7 | libself_dep_c = [ 8 | 'self-dep-plugin.c', 9 | ] 10 | 11 | libself_dep_plugin_data = [ 12 | 'self-dep.plugin', 13 | ] 14 | 15 | libself_dep_plugin_deps = [ 16 | glib_dep, 17 | gobject_dep, 18 | libpeas_dep, 19 | libintrospection_dep, 20 | ] 21 | 22 | libself_dep_lib = shared_library( 23 | libself_dep_name, 24 | libself_dep_c, 25 | dependencies: libself_dep_plugin_deps, 26 | install: false, 27 | ) 28 | 29 | custom_target( 30 | 'lib@0@-data'.format(libself_dep_name), 31 | input: libself_dep_plugin_data, 32 | output: libself_dep_plugin_data, 33 | command: [copyfile_script, '@INPUT@', '@OUTDIR@'], 34 | build_by_default: true, 35 | ) 36 | -------------------------------------------------------------------------------- /tests/plugins/self-dep/self-dep-plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * self-dep-plugin.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2010 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define TESTING_TYPE_SELF_DEP_PLUGIN (testing_self_dep_plugin_get_type ()) 31 | #define TESTING_SELF_DEP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TESTING_TYPE_SELF_DEP_PLUGIN, TestingSelfDepPlugin)) 32 | #define TESTING_SELF_DEP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TESTING_TYPE_SELF_DEP_PLUGIN, TestingSelfDepPlugin)) 33 | #define TESTING_IS_SELF_DEP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TESTING_TYPE_SELF_DEP_PLUGIN)) 34 | #define TESTING_IS_SELF_DEP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TESTING_TYPE_SELF_DEP_PLUGIN)) 35 | #define TESTING_SELF_DEP_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TESTING_TYPE_SELF_DEP_PLUGIN, TestingSelfDepPluginClass)) 36 | 37 | typedef struct _TestingSelfDepPlugin TestingSelfDepPlugin; 38 | typedef struct _TestingSelfDepPluginClass TestingSelfDepPluginClass; 39 | 40 | struct _TestingSelfDepPlugin { 41 | PeasExtensionBase parent_instance; 42 | }; 43 | 44 | struct _TestingSelfDepPluginClass { 45 | PeasExtensionBaseClass parent_class; 46 | }; 47 | 48 | GType testing_self_dep_plugin_get_type (void) G_GNUC_CONST; 49 | G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); 50 | 51 | G_END_DECLS 52 | -------------------------------------------------------------------------------- /tests/plugins/self-dep/self-dep.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=self-dep 3 | Depends=self-dep 4 | Name=Self Dep 5 | Description=This plugin can be loaded and has a dep of itself. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2010 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/plugins/unavailable.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=unavailable 3 | Depends=does-not-exist 4 | Name=Unavailable 5 | Description=This plugin cannot be loaded. 6 | Authors=Garrett Regier 7 | Copyright=Copyright © 2010 Garrett Regier 8 | -------------------------------------------------------------------------------- /tests/testing-util/meson.build: -------------------------------------------------------------------------------- 1 | libtesting_util_name = 'testing-util' 2 | libtesting_util_string = '@0@-@1@'.format(libtesting_util_name, api_version) 3 | 4 | libtesting_util_public_h = [ 5 | 'testing-util.h', 6 | ] 7 | 8 | libtesting_util_c = [ 9 | 'testing-util.c', 10 | ] 11 | 12 | libtesting_util_deps = [ 13 | glib_dep, 14 | introspection_dep, 15 | libpeas_dep, 16 | ] 17 | 18 | libtesting_util_c_args = [ 19 | '-DBUILDDIR="@0@"'.format(builddir), 20 | '-DSRCDIR="@0@"'.format(srcdir), 21 | '-UG_DISABLE_ASSERT', 22 | '-UG_DISABLE_CAST_CHECKS', 23 | ] 24 | 25 | libtesting_util_lib = library( 26 | libtesting_util_string, 27 | libtesting_util_c, 28 | include_directories: rootdir, 29 | dependencies: libtesting_util_deps, 30 | c_args: libtesting_util_c_args, 31 | install: false, 32 | ) 33 | 34 | libtesting_util_dep = declare_dependency( 35 | link_with: libtesting_util_lib, 36 | include_directories: include_directories('.'), 37 | dependencies: libtesting_util_deps, 38 | ) 39 | -------------------------------------------------------------------------------- /tests/testing-util/peas-test-common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * peas-test-common.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2019 - Chun-wei Fan 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #ifdef _MSC_VER 25 | # define PEAS_TEST_EXPORT __declspec (dllexport) 26 | #else 27 | # define PEAS_TEST_EXPORT 28 | #endif -------------------------------------------------------------------------------- /tests/testing-util/testing-util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * testing-util.h 3 | * This file is part of libpeas 4 | * 5 | * Copyright (C) 2011 - Garrett Regier 6 | * 7 | * libpeas is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * libpeas is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * SPDX-License-Identifier: LGPL-2.1-or-later 22 | */ 23 | 24 | #pragma once 25 | 26 | #include 27 | 28 | #include "peas-test-common.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | PEAS_TEST_EXPORT 33 | void testing_util_envars (void); 34 | 35 | PEAS_TEST_EXPORT 36 | void testing_util_init (void); 37 | 38 | 39 | PEAS_TEST_EXPORT 40 | PeasEngine *testing_util_engine_new_full (gboolean nonglobal_loaders); 41 | 42 | PEAS_TEST_EXPORT 43 | void testing_util_engine_free (PeasEngine *engine); 44 | 45 | 46 | PEAS_TEST_EXPORT 47 | int testing_util_run_tests (void); 48 | 49 | 50 | PEAS_TEST_EXPORT 51 | void testing_util_push_log_hook (const char *pattern); 52 | 53 | PEAS_TEST_EXPORT 54 | void testing_util_pop_log_hook (void); 55 | 56 | PEAS_TEST_EXPORT 57 | void testing_util_pop_log_hooks (void); 58 | 59 | 60 | #define testing_util_engine_new() (testing_util_engine_new_full (FALSE)) 61 | 62 | G_END_DECLS 63 | --------------------------------------------------------------------------------