~mozillateam/thunderbird/thunderbird.head

« back to all changes in this revision

Viewing changes to debian/messagingmenu/res/libs/indicate.js

  • Committer: Chris Coulson
  • Date: 2012-08-27 09:10:13 UTC
  • Revision ID: chris.coulson@canonical.com-20120827091013-tsprx093o5t6bzbp
* Update messagingmenu-extension to 1.0 prerelease r135
  - Add support for libmessaging-menu (thanks Lars Uebernickel)
    LP: #1040259
* Make "Contacts" and "Compose" actions show up in the messaging menu
  - update debian/thunderbird.desktop.in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 
2
/* ***** BEGIN LICENSE BLOCK *****
 
3
 *       Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
4
 *
 
5
 * The contents of this file are subject to the Mozilla Public License Version
 
6
 * 1.1 (the "License"); you may not use this file except in compliance with
 
7
 * the License. You may obtain a copy of the License at
 
8
 * http://www.mozilla.org/MPL/
 
9
 * 
 
10
 * Software distributed under the License is distributed on an "AS IS" basis,
 
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
12
 * for the specific language governing rights and limitations under the
 
13
 * License.
 
14
 *
 
15
 * The Original Code is messagingmenu-extension
 
16
 *
 
17
 * The Initial Developer of the Original Code is
 
18
 * Mozilla Messaging, Ltd.
 
19
 * Portions created by the Initial Developer are Copyright (C) 2010
 
20
 * the Initial Developer. All Rights Reserved.
 
21
 *
 
22
 * Contributor(s):
 
23
 *    Mike Conley <mconley@mozillamessaging.com>
 
24
 *
 
25
 * Alternatively, the contents of this file may be used under the terms of
 
26
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
27
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
28
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
29
 * of those above. If you wish to allow use of your version of this file only
 
30
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
31
 * use your version of this file under the terms of the MPL, indicate your
 
32
 * decision by deleting the provisions above and replace them with the notice
 
33
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
34
 * the provisions above, a recipient may use your version of this file under
 
35
 * the terms of any one of the MPL, the GPL or the LGPL.
 
36
 * 
 
37
 * ***** END LICENSE BLOCK ***** */
 
38
 
 
39
var EXPORTS = [ "indicate" ];
 
40
 
 
41
require("libs/gobject.js");
 
42
require("libs/glib.js");
 
43
require("libs/dbusmenu.js");
 
44
 
 
45
const INDICATE_LIBNAME = "indicate";
 
46
const INDICATE_ABIS    = [ 5 ];
 
47
 
 
48
function indicate_defines(lib) {
 
49
  this.INDICATOR_MESSAGES_SERVER_TYPE = "message";
 
50
  this.INDICATOR_MESSAGES_PROP_NAME = "name";
 
51
  this.INDICATOR_MESSAGES_PROP_ICON = "icon";
 
52
  this.INDICATOR_MESSAGES_PROP_COUNT = "count";
 
53
  this.INDICATOR_MESSAGES_PROP_TIME = "time";
 
54
  this.INDICATOR_MESSAGES_PROP_ATTENTION = "draw-attention";
 
55
 
 
56
  this.IndicateServer = ctypes.StructType("IndicateServer");
 
57
  this.Indicator = ctypes.StructType("Indicator");
 
58
 
 
59
  lib.lazy_bind("indicate_server_ref_default", this.IndicateServer.ptr);
 
60
  lib.lazy_bind("indicate_server_set_type", ctypes.void_t,
 
61
                [this.IndicateServer.ptr, glib.gchar.ptr]);
 
62
  lib.lazy_bind("indicate_server_set_desktop_file", ctypes.void_t,
 
63
                [this.IndicateServer.ptr, glib.gchar.ptr]);
 
64
  lib.lazy_bind("indicate_server_show", ctypes.void_t,
 
65
                [this.IndicateServer.ptr]);
 
66
  lib.lazy_bind("indicate_server_hide", ctypes.void_t,
 
67
                [this.IndicateServer.ptr]);
 
68
  lib.lazy_bind("indicate_server_set_menu", ctypes.void_t,
 
69
                [this.IndicateServer.ptr, dbusmenu.DbusmenuServer.ptr]);
 
70
  lib.lazy_bind("indicate_indicator_new", this.Indicator.ptr);
 
71
  lib.lazy_bind("indicate_indicator_set_property", ctypes.void_t,
 
72
                [this.Indicator.ptr, glib.gchar.ptr, glib.gchar.ptr]);
 
73
  lib.lazy_bind("indicate_indicator_get_property", glib.gchar.ptr,
 
74
                [this.Indicator.ptr, glib.gchar.ptr]);
 
75
  lib.lazy_bind("indicate_indicator_show", ctypes.void_t,
 
76
                [this.Indicator.ptr]);
 
77
  lib.lazy_bind("indicate_indicator_hide", ctypes.void_t,
 
78
                [this.Indicator.ptr]);
 
79
  lib.lazy_bind("indicate_indicator_is_visible", glib.gboolean,
 
80
                [this.Indicator.ptr]);
 
81
}
 
82
 
 
83
var indicate = CTypesUtils.newLibrary(INDICATE_LIBNAME, INDICATE_ABIS, indicate_defines);