Mercurial > pidgin
comparison console/libgnt/gntbutton.c @ 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 | 2d1b41e3cf0d |
children | c374f45f4c94 |
comparison
equal
deleted
inserted
replaced
14342:12156328fb4f | 14343:0387a167f342 |
---|---|
56 return TRUE; | 56 return TRUE; |
57 } | 57 } |
58 return FALSE; | 58 return FALSE; |
59 } | 59 } |
60 | 60 |
61 static gboolean | |
62 gnt_button_clicked(GntWidget *widget, GntMouseEvent event, int x, int y) | |
63 { | |
64 if (event == GNT_LEFT_MOUSE_DOWN) { | |
65 gnt_widget_activate(widget); | |
66 return TRUE; | |
67 } | |
68 return FALSE; | |
69 } | |
70 | |
61 static void | 71 static void |
62 gnt_button_class_init(GntWidgetClass *klass) | 72 gnt_button_class_init(GntWidgetClass *klass) |
63 { | 73 { |
64 parent_class = GNT_WIDGET_CLASS(klass); | 74 parent_class = GNT_WIDGET_CLASS(klass); |
65 parent_class->draw = gnt_button_draw; | 75 parent_class->draw = gnt_button_draw; |
66 parent_class->map = gnt_button_map; | 76 parent_class->map = gnt_button_map; |
67 parent_class->size_request = gnt_button_size_request; | 77 parent_class->size_request = gnt_button_size_request; |
68 parent_class->key_pressed = gnt_button_key_pressed; | 78 parent_class->key_pressed = gnt_button_key_pressed; |
79 parent_class->clicked = gnt_button_clicked; | |
69 | 80 |
70 DEBUG; | 81 DEBUG; |
71 } | 82 } |
72 | 83 |
73 static void | 84 static void |