diff console/libgnt/gntwidget.h @ 14343:0387a167f342

[gaim-migrate @ 17044] A WM can now act on keystrokes. As an example, the sample WM will toggle the buddylist on pressing Alt+b. Mouse clicking and scrolling is now supported in most/all widgets. To use a WM, you need to add "wm=/path/to/wm.so" under [general] in ~/.gntrc. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 26 Aug 2006 12:54:39 +0000
parents b1b76fb9c739
children 553bbd68387e
line wrap: on
line diff
--- a/console/libgnt/gntwidget.h	Sat Aug 26 07:11:55 2006 +0000
+++ b/console/libgnt/gntwidget.h	Sat Aug 26 12:54:39 2006 +0000
@@ -45,6 +45,16 @@
 	GNT_WIDGET_TRANSIENT      = 1 << 11,
 } GntWidgetFlags;
 
+typedef enum _GnMouseEvent
+{
+	GNT_LEFT_MOUSE_DOWN = 1,
+	GNT_RIGHT_MOUSE_DOWN,
+	GNT_MIDDLE_MOUSE_DOWN,
+	GNT_MOUSE_UP,
+	GNT_MOUSE_SCROLL_UP,
+	GNT_MOUSE_SCROLL_DOWN
+} GntMouseEvent;
+
 /* XXX: I'll have to ask grim what he's using this for in guifications. */
 typedef enum _GnParamFlags
 {
@@ -96,6 +106,7 @@
 	void (*set_position)(GntWidget *widget, int x, int y);
 	gboolean (*key_pressed)(GntWidget *widget, const char *key);
 	void (*activate)(GntWidget *widget);
+	gboolean (*clicked)(GntWidget *widget, GntMouseEvent event, int x, int y);
 
 	void (*gnt_reserved1)(void);
 	void (*gnt_reserved2)(void);
@@ -121,6 +132,8 @@
 
 gboolean gnt_widget_key_pressed(GntWidget *widget, const char *keys);
 
+gboolean gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y);
+
 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set);
 void gnt_widget_activate(GntWidget *widget);