1
0
mirror of https://github.com/moparisthebest/FireTray synced 2024-11-11 03:25:07 -05:00

fix enum definitions + begin GdkFilterFunc implementation

This commit is contained in:
foudfou 2011-11-07 22:29:35 +01:00
parent 9242e07206
commit c1b4bc8cb6
3 changed files with 18 additions and 4 deletions

View File

@ -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>

View File

@ -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) {

View File

@ -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");