summaryrefslogtreecommitdiffstats
path: root/application/xulrunner/examples/simple
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-12-16 20:09:38 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-12-16 20:09:38 -0500
commite2de507e0261c9b138cd3cf5356c21eca3e7a28d (patch)
treef32816881d4f8512d42ece948a41ae21c977c633 /application/xulrunner/examples/simple
parent06494f307850c576868831bd28a61464eab1f359 (diff)
downloadUXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar
UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.gz
UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.lz
UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.tar.xz
UXP-e2de507e0261c9b138cd3cf5356c21eca3e7a28d.zip
Issue #1323 - Move XULRunner back to topsrcdir
Diffstat (limited to 'application/xulrunner/examples/simple')
-rw-r--r--application/xulrunner/examples/simple/application.ini43
-rw-r--r--application/xulrunner/examples/simple/components/moz.build7
-rw-r--r--application/xulrunner/examples/simple/components/public/moz.build13
-rw-r--r--application/xulrunner/examples/simple/components/public/nsISimpleTest.idl15
-rw-r--r--application/xulrunner/examples/simple/components/src/SimpleTest.cpp54
-rw-r--r--application/xulrunner/examples/simple/components/src/SimpleTest.js27
-rw-r--r--application/xulrunner/examples/simple/components/src/SimpleTest.manifest2
-rw-r--r--application/xulrunner/examples/simple/components/src/moz.build21
-rw-r--r--application/xulrunner/examples/simple/content/contents.rdf0
-rw-r--r--application/xulrunner/examples/simple/content/simple.js17
-rw-r--r--application/xulrunner/examples/simple/content/simple.xul20
-rw-r--r--application/xulrunner/examples/simple/icons/simple.icobin29310 -> 0 bytes
-rw-r--r--application/xulrunner/examples/simple/jar.mn12
-rw-r--r--application/xulrunner/examples/simple/locale/simple.dtd7
-rw-r--r--application/xulrunner/examples/simple/moz.build22
-rw-r--r--application/xulrunner/examples/simple/simple-prefs.js6
16 files changed, 0 insertions, 266 deletions
diff --git a/application/xulrunner/examples/simple/application.ini b/application/xulrunner/examples/simple/application.ini
deleted file mode 100644
index 39c051422..000000000
--- a/application/xulrunner/examples/simple/application.ini
+++ /dev/null
@@ -1,43 +0,0 @@
-#filter substitution
-[App]
-;
-; This field specifies your organization's name. This field is recommended,
-; but optional.
-Vendor=MozillaTest
-;
-; This field specifies your application's name. This field is required.
-Name=Simple
-;
-; This field specifies your application's version. This field is required.
-Version=0.1
-;
-; This field specifies your application's build ID (timestamp). This field is
-; required.
-BuildID=20070625
-;
-; This field specifies a compact copyright notice for your application. This
-; field is optional.
-Copyright=Copyright (c) 2004 Mozilla.org
-;
-; This ID is just an example. Every XUL app ought to have it's own unique ID.
-; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
-; irc.mozilla.org and /msg botbot uuid. This field is optional.
-ID={3aea3f07-ffe3-4060-bb03-bff3a5365e90}
-
-[Gecko]
-;
-; This field is required. It specifies the minimum Gecko version that this
-; application requires.
-MinVersion=@MOZILLA_VERSION_U@
-;
-; This field is optional. It specifies the maximum Gecko version that this
-; application requires. It should be specified if your application uses
-; unfrozen interfaces.
-MaxVersion=@MOZILLA_VERSION_U@
-
-[Shell]
-;
-; This field specifies the location of your application's main icon with file
-; extension excluded. NOTE: Unix style file separators are required. This
-; field is optional.
-Icon=chrome/icons/default/simple
diff --git a/application/xulrunner/examples/simple/components/moz.build b/application/xulrunner/examples/simple/components/moz.build
deleted file mode 100644
index 8ff468534..000000000
--- a/application/xulrunner/examples/simple/components/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['public', 'src']
diff --git a/application/xulrunner/examples/simple/components/public/moz.build b/application/xulrunner/examples/simple/components/public/moz.build
deleted file mode 100644
index 3a611f85a..000000000
--- a/application/xulrunner/examples/simple/components/public/moz.build
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-XPIDL_SOURCES += [
- 'nsISimpleTest.idl',
-]
-
-XPIDL_MODULE = 'simple'
-
-XPI_NAME = 'simple'
diff --git a/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl b/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl
deleted file mode 100644
index 99b9b86af..000000000
--- a/application/xulrunner/examples/simple/components/public/nsISimpleTest.idl
+++ /dev/null
@@ -1,15 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et cin: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-[scriptable, uuid(f2f71d91-0451-47ec-aaa0-166663a7711a)]
-interface nsISimpleTest : nsISupports
-{
- /**
- * This interface adds two numbers together and returns the result.
- */
- long add(in long a, in long b);
-};
diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.cpp b/application/xulrunner/examples/simple/components/src/SimpleTest.cpp
deleted file mode 100644
index 06249abdd..000000000
--- a/application/xulrunner/examples/simple/components/src/SimpleTest.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et cin: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include "nsISimpleTest.h"
-#include "mozilla/ModuleUtils.h"
-
-class SimpleTest : public nsISimpleTest
-{
- ~SimpleTest() {}
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSISIMPLETEST
-};
-
-NS_IMPL_ISUPPORTS(SimpleTest, nsISimpleTest)
-
-NS_IMETHODIMP
-SimpleTest::Add(int32_t a, int32_t b, int32_t *r)
-{
- printf("add(%d,%d) from C++\n", a, b);
-
- *r = a + b;
- return NS_OK;
-}
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(SimpleTest)
-
-// 5e14b432-37b6-4377-923b-c987418d8429
-#define SIMPLETEST_CID \
- { 0x5e14b432, 0x37b6, 0x4377, \
- { 0x92, 0x3b, 0xc9, 0x87, 0x41, 0x8d, 0x84, 0x29 } }
-
-NS_DEFINE_NAMED_CID(SIMPLETEST_CID);
-
-static const mozilla::Module::CIDEntry kSimpleCIDs[] = {
- { &kSIMPLETEST_CID, false, nullptr, SimpleTestConstructor },
- { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kSimpleContracts[] = {
- { "@test.mozilla.org/simple-test;1?impl=c++", &kSIMPLETEST_CID },
- { nullptr }
-};
-
-static const mozilla::Module kSimpleModule = {
- mozilla::Module::kVersion,
- kSimpleCIDs,
- kSimpleContracts
-};
-
-NSMODULE_DEFN(SimpleTestModule) = &kSimpleModule;
diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.js b/application/xulrunner/examples/simple/components/src/SimpleTest.js
deleted file mode 100644
index e6cf90660..000000000
--- a/application/xulrunner/examples/simple/components/src/SimpleTest.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et cin: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function SimpleTest() {
-}
-
-SimpleTest.prototype = {
- classID: Components.ID("{4177e257-a0dc-49b9-a774-522a000a49fa}"),
-
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISimpleTest) ||
- iid.equals(Components.interfaces.nsISupports))
- return this;
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- add: function(a, b) {
- dump("add(" + a + "," + b + ") from JS\n");
- return a + b;
- }
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SimpleTest]);
diff --git a/application/xulrunner/examples/simple/components/src/SimpleTest.manifest b/application/xulrunner/examples/simple/components/src/SimpleTest.manifest
deleted file mode 100644
index c7388b9d7..000000000
--- a/application/xulrunner/examples/simple/components/src/SimpleTest.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {4177e257-a0dc-49b9-a774-522a000a49fa} SimpleTest.js
-contract @test.mozilla.org/simple-test;1?impl=js {4177e257-a0dc-49b9-a774-522a000a49fa}
diff --git a/application/xulrunner/examples/simple/components/src/moz.build b/application/xulrunner/examples/simple/components/src/moz.build
deleted file mode 100644
index 153bfdd0c..000000000
--- a/application/xulrunner/examples/simple/components/src/moz.build
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-SOURCES += [
- 'SimpleTest.cpp',
-]
-
-XPCOMBinaryComponent('simpletest')
-
-EXTRA_COMPONENTS += [
- 'SimpleTest.js',
- 'SimpleTest.manifest',
-]
-
-XPI_NAME = 'simple'
-
-if CONFIG['GNU_CXX']:
- CXXFLAGS += ['-Wshadow']
diff --git a/application/xulrunner/examples/simple/content/contents.rdf b/application/xulrunner/examples/simple/content/contents.rdf
deleted file mode 100644
index e69de29bb..000000000
--- a/application/xulrunner/examples/simple/content/contents.rdf
+++ /dev/null
diff --git a/application/xulrunner/examples/simple/content/simple.js b/application/xulrunner/examples/simple/content/simple.js
deleted file mode 100644
index acf6f1029..000000000
--- a/application/xulrunner/examples/simple/content/simple.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et cin: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function onButtonClick() {
- var textbox = document.getElementById("textbox");
-
- var contractid = (textbox.value % 2 == 0) ?
- "@test.mozilla.org/simple-test;1?impl=js" :
- "@test.mozilla.org/simple-test;1?impl=c++";
-
- var test = Components.classes[contractid].
- createInstance(Components.interfaces.nsISimpleTest);
-
- textbox.value = test.add(textbox.value, 1);
-}
diff --git a/application/xulrunner/examples/simple/content/simple.xul b/application/xulrunner/examples/simple/content/simple.xul
deleted file mode 100644
index 6ff915d0c..000000000
--- a/application/xulrunner/examples/simple/content/simple.xul
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-# vim:set ts=8 sw=8 sts=8 noet:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<!DOCTYPE window SYSTEM "chrome://simple/locale/simple.dtd">
-
-<window
- id = "simple"
- title = "&simple.title;"
- xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script src="chrome://simple/content/simple.js"/>
- <vbox>
- <textbox id="textbox" value="&simple.textValue;" flex="1"/>
- <button id="button" label="&simple.buttonLabel;" oncommand="onButtonClick();"/>
- </vbox>
-</window>
diff --git a/application/xulrunner/examples/simple/icons/simple.ico b/application/xulrunner/examples/simple/icons/simple.ico
deleted file mode 100644
index 16bd7e9d1..000000000
--- a/application/xulrunner/examples/simple/icons/simple.ico
+++ /dev/null
Binary files differ
diff --git a/application/xulrunner/examples/simple/jar.mn b/application/xulrunner/examples/simple/jar.mn
deleted file mode 100644
index 7d141ad1d..000000000
--- a/application/xulrunner/examples/simple/jar.mn
+++ /dev/null
@@ -1,12 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-simple.jar:
-% content simple %content/
- content/simple.xul (content/simple.xul)
- content/simple.js (content/simple.js)
-
-en-US.jar:
-% locale simple en-US %locale/en-US/
- locale/en-US/simple.dtd (locale/simple.dtd)
diff --git a/application/xulrunner/examples/simple/locale/simple.dtd b/application/xulrunner/examples/simple/locale/simple.dtd
deleted file mode 100644
index 2fd1c9285..000000000
--- a/application/xulrunner/examples/simple/locale/simple.dtd
+++ /dev/null
@@ -1,7 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!ENTITY simple.title "Simple App">
-<!ENTITY simple.textValue "0">
-<!ENTITY simple.buttonLabel "Increment">
diff --git a/application/xulrunner/examples/simple/moz.build b/application/xulrunner/examples/simple/moz.build
deleted file mode 100644
index c88c57a4b..000000000
--- a/application/xulrunner/examples/simple/moz.build
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIRS += ['components']
-
-XPI_NAME = 'simple'
-
-JAR_MANIFESTS += ['jar.mn']
-
-JS_PREFERENCE_FILES += [
- 'simple-prefs.js',
-]
-
-FINAL_TARGET_PP_FILES += [
- 'application.ini',
-]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
- FINAL_TARGET_FILES.chrome.icons.default += ['icons/simple.ico']
diff --git a/application/xulrunner/examples/simple/simple-prefs.js b/application/xulrunner/examples/simple/simple-prefs.js
deleted file mode 100644
index fc92e0df5..000000000
--- a/application/xulrunner/examples/simple/simple-prefs.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-pref("toolkit.defaultChromeURI", "chrome://simple/content/simple.xul");
-pref("general.useragent.extra.simple", "SimpleApp/0.1");