[Pkg-mozext-commits] [firetray] 89/399: fix enum definitions + begin GdkFilterFunc implementation

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:19 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit c1b4bc8cb641426d8525cd07c37961f00f7b014b
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Mon Nov 7 22:29:35 2011 +0100

    fix enum definitions + begin GdkFilterFunc implementation
---
 src/chrome/content/overlay.xul |    2 +-
 src/modules/gdk.jsm            |   16 +++++++++++++++-
 src/modules/gtk.jsm            |    4 ++--
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/chrome/content/overlay.xul b/src/chrome/content/overlay.xul
index 24abb2b..dca2fe2 100644
--- a/src/chrome/content/overlay.xul
+++ b/src/chrome/content/overlay.xul
@@ -9,7 +9,7 @@
   </stringbundleset>
 
   <keyset>
-    <!-- otherwide window.addEventListener("keypress", firetray.Main.onKeyPress, true);
+    <!-- otherwise window.addEventListener("keypress", firetray.Main.onKeyPress, true);
          see https://addons.mozilla.org/en-US/firefox/addon/move-tabs/ -->
     <key id="key_close" key="W" modifiers="shift meta" oncommand="firetray.Handler.showHideToTray();" /> <!-- firetray.Main.onKeyClose(); -->
   </keyset>
diff --git a/src/modules/gdk.jsm b/src/modules/gdk.jsm
index 31583f3..3dbfc8f 100644
--- a/src/modules/gdk.jsm
+++ b/src/modules/gdk.jsm
@@ -53,7 +53,11 @@ Cu.import("resource://firetray/glib.jsm");
 Cu.import("resource://firetray/gobject.jsm");
 
 function gdk_defines(lib) {
-  this.GDK_INTERP_NEAREST = 1, // enum GdkInterpType
+  this.GDK_INTERP_NEAREST = 0, // enum GdkInterpType
+  // enum GdkFilterReturn
+  this.GDK_FILTER_CONTINUE  = 0,
+  this.GDK_FILTER_TRANSLATE = 1,
+  this.GDK_FILTER_REMOVE    = 2,
 
   this.GdkWindow = ctypes.StructType("GdkWindow");
   this.GdkByteOrder = ctypes.int; // enum
@@ -112,6 +116,14 @@ function gdk_defines(lib) {
   this.GdkDrawable = ctypes.StructType("GdkDrawable");
   this.GdkGC = ctypes.StructType("GdkGC");
   this.GdkInterpType = ctypes.int;
+  this.GdkFilterReturn = ctypes.int;
+  this.GdkXEvent = ctypes.void_t;
+  this.GdkEvent = ctypes.void_t;
+
+  // GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, GdkEvent *event, gpointer  data);
+  this.GdkFilterFunc_t = ctypes.FunctionType(
+    ctypes.default_abi, this.GdkFilterReturn,
+    [this.GdkXEvent.ptr, this.GdkEvent.ptr, gobject.gpointer]).ptr;
 
   lib.lazy_bind("gdk_window_new", this.GdkWindow.ptr, this.GdkWindow.ptr, this.GdkWindowAttributes.ptr, gobject.gint);
   lib.lazy_bind("gdk_window_destroy", ctypes.void_t, this.GdkWindow.ptr);
@@ -147,6 +159,8 @@ function gdk_defines(lib) {
   lib.lazy_bind("gdk_window_beep", ctypes.void_t, this.GdkWindow.ptr);
   lib.lazy_bind("gdk_window_get_width", ctypes.int, this.GdkWindow.ptr);
 
+  lib.lazy_bind("gdk_window_add_filter", ctypes.void_t, this.GdkWindow.ptr, this.GdkFilterFunc, gobject.gpointer);
+
 }
 
 if (!gdk) {
diff --git a/src/modules/gtk.jsm b/src/modules/gtk.jsm
index 4beb5ab..cee6b7d 100644
--- a/src/modules/gtk.jsm
+++ b/src/modules/gtk.jsm
@@ -16,8 +16,8 @@ Cu.import("resource://firetray/gobject.jsm");
 Cu.import("resource://firetray/pango.jsm");
 
 function gtk_defines(lib) {
-  this.GTK_ICON_SIZE_MENU = 1;
-  this.GTK_WINDOW_TOPLEVEL = 1;
+  this.GTK_ICON_SIZE_MENU = 1; // enum GtkIconSize
+  this.GTK_WINDOW_TOPLEVEL = 0; // enum GtkWindowType
 
   this.GtkStatusIcon = ctypes.StructType("GtkStatusIcon");
   this.GtkStyle = ctypes.StructType("GtkStyle");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list