1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-02-14 14:19:20 +03:00
parent cc1ea539e8
commit e6d2d2b404
12 changed files with 51 additions and 95 deletions

View File

@ -1,9 +1,9 @@
PROJECT (LAviewPluginProtocolExample C)
PROJECT (LAviewPluginObjectExample C)
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
SET (PROJECT_LOWERCASE_NAME "laview-plugin-protocol-example")
SET (PROJECT_DESCRIPTION "LAview Plugin Protocol Example.")
SET (PROJECT_LOWERCASE_NAME "laview-plugin-object-example")
SET (PROJECT_DESCRIPTION "LAview Plugin Protocol Object Example.")
SET (MAJOR 0)
SET (MINOR 0)

2
README
View File

@ -1 +1 @@
LAview protocol plugin sample.
LAview protocol object plugin sample.

View File

@ -1,5 +1,5 @@
CONFIGURE_FILE ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h")
SET (GSchemaFile "ws.backbone.laview.plugins.protocol-example")
SET (GSchemaFile "ws.backbone.laview.plugins.object-example")
INCLUDE (GSchemaCommonRules)

View File

@ -1,5 +1,5 @@
<schemalist>
<schema id="ws.backbone.lavew.plugins.protocol-example-@MAJOR@" path="/ws/backbone/laview/plugins/protocol-example-@MAJOR@/" gettext-domain="laview-plugins-protocol-example-@MAJOR@">
<schema id="ws.backbone.lavew.plugins.object-example-@MAJOR@" path="/ws/backbone/laview/plugins/object-example-@MAJOR@/" gettext-domain="laview-plugins-object-example-@MAJOR@">
<key name="greeting" type="s">
<default l10n="messages">"Hello, earthlings"</default>

View File

@ -4,7 +4,7 @@ SET (DEBIAN_SECTION "TeX")
SET (REDHAT_DEPENDENCIES "laview-core-0 >= 0.0.0")
SET (REDHAT_SECTION "Applications/Publishing")
SET (LICENSE "LGPLv3+")
SET (WIN32_UNINSTALL_NAME "LAvPlPEx") # <= 8 symbols for the name
SET (CPACK_NSIS_MENU_LINKS "https://git.backbone.ws/laview/protocol-example"
"Homepage for LAview/Protocol-Example")
SET (WIN32_UNINSTALL_NAME "LAvPlOEx") # <= 8 symbols for the name
SET (CPACK_NSIS_MENU_LINKS "https://git.backbone.ws/laview/object-example"
"Homepage for LAview/Object-Example")
INCLUDE (CPackCommonRules)

View File

@ -1 +0,0 @@
INCLUDE (GettextLangRules)

View File

@ -1,50 +0,0 @@
# German translations for laview-plugin-protocol-example package.
# Copyright (C) 2015 THE laview-plugin-protocol-example'S COPYRIGHT HOLDER
# This file is distributed under the same license as the laview-plugin-protocol-example package.
# <backbone@backbone.ws>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: laview-plugin-protocol-example\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-09 15:51+0300\n"
"PO-Revision-Date: 2015-11-09 15:51+0300\n"
"Last-Translator: <backbone@backbone.ws>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1
msgid "\"Hello, earthlings\""
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2
msgid "A greeting"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3
msgid "Greeting of the invading martians"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4
msgid "Bottles of beer"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5
msgid "Number of bottles of beer on the wall"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6
msgid "Is the light switched on?"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7
msgid "State of an imaginary light switch."
msgstr ""
#: src/main.vala:32
msgid "Protocol Example"
msgstr ""

View File

@ -1,12 +1,12 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the laview-plugin-protocol-example package.
# This file is distributed under the same license as the laview-plugin-object-example package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: laview-plugin-protocol-example\n"
"Project-Id-Version: laview-plugin-object-example\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-14 08:16+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
@ -17,34 +17,34 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:1
msgid "\"Hello, earthlings\""
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:2
msgid "A greeting"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:3
msgid "Greeting of the invading martians"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:4
msgid "Bottles of beer"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:5
msgid "Number of bottles of beer on the wall"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:6
msgid "Is the light switched on?"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:7
msgid "State of an imaginary light switch."
msgstr ""
#: src/main.vala:32
msgid "Protocol Example"
msgid "Protocol Object Example"
msgstr ""

View File

@ -1,11 +1,11 @@
# Russian translations for laview-plugin-protocol-example package.
# Copyright (C) 2015 THE laview-plugin-protocol-example'S COPYRIGHT HOLDER
# This file is distributed under the same license as the laview-plugin-protocol-example package.
# Russian translations for laview-plugin-object-example package.
# Copyright (C) 2015 THE laview-plugin-object-example'S COPYRIGHT HOLDER
# This file is distributed under the same license as the laview-plugin-object-example package.
# <backbone@backbone.ws>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: laview-plugin-protocol-example\n"
"Project-Id-Version: laview-plugin-object-example\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-09 15:51+0300\n"
"PO-Revision-Date: 2015-11-09 15:51+0300\n"
@ -18,34 +18,34 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:1
msgid "\"Hello, earthlings\""
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:2
msgid "A greeting"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:3
msgid "Greeting of the invading martians"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:4
msgid "Bottles of beer"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:5
msgid "Number of bottles of beer on the wall"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:6
msgid "Is the light switched on?"
msgstr ""
#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7
#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:7
msgid "State of an imaginary light switch."
msgstr ""
#: src/main.vala:32
msgid "Protocol Example"
msgstr "Пример протокола"
msgid "Protocol Object Example"
msgstr "Пример объекта протокола"

View File

@ -1,4 +1,4 @@
SET (PluginName laview-plugin-protocol-example-${MAJOR})
SET (PluginName laview-plugin-object-example-${MAJOR})
FILE (GLOB_RECURSE PluginSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala)
SET (PluginPackages gtk+-3.0 gee-0.8 gobject-plugin-iface-0 laview-core-iface-0 laview-core-0)
SET (PluginPkgModules gtk+-3.0 gee-0.8 gobject-plugin-0 laview-core-0)
@ -8,5 +8,5 @@ SET (PluginInstall ON)
SET (PluginExtraSources ${CMAKE_CURRENT_BINARY_DIR}/library_constructor.c)
SET (LC_RELATIVE_PREFIX "../../../..")
CONFIGURE_FILE ( "${CMAKE_SOURCE_DIR}/cmake/backbone/templates/library_constructor.c.in" "${PluginExtraSources}")
SET (PluginInstallPrefix "laview-core-0/protocol-plugins")
SET (PluginInstallPrefix "laview-core-0/object-plugins")
INCLUDE (ValaPluginCommonRules)

View File

@ -5,34 +5,41 @@ extern const string GETTEXT_PACKAGE;
/**
* Plugin of type A1.
*/
public class PluginProtocolExample : PluginProtocol {
public class PluginProtocolObjectExample : PluginProtocolObject {
/**
* Constructs a new ``PluginProtocolExample``.
* Constructs a new ``PluginProtocolObjectExample``.
*/
construct {
stdout.puts ("PluginProtocolExample init () called\n");
stdout.puts ("PluginProtocolObjectExample init () called\n");
}
/**
* Destroys the ``PluginProtocolExample``.
*/
~PluginProtocolExample () {
stdout.puts ("PluginProtocolExample deinit () called\n");
~PluginProtocolObjectExample () {
stdout.puts ("PluginProtocolObjectExample deinit () called\n");
}
/**
* Any abstract method realization for PluginProtocol.
* Gets a name of the plugin.
*/
public override string get_name () {
return "ProtObjEx";
}
/**
* Gets readable name of the plugin.
*/
public override string get_readable_name () {
stdout.puts ("PluginProtocolExample.get_readable_name () called\n");
stdout.puts ("Call IHostCore.any_host_method () from PluginProtocolExample:\n ");
stdout.puts ("PluginProtocolObjectExample.get_readable_name () called\n");
stdout.puts ("Call IHostCore.any_host_method () from PluginProtocolObjectExample:\n ");
(host as IHostCore).any_host_method ();
return _("Protocol Example");
return _("Protocol Object Example");
}
}
[ModuleInit]
Type plugin_init (GLib.TypeModule type_module) {
return typeof (PluginProtocolExample);
return typeof (PluginProtocolObjectExample);
}