summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-24 23:12:43 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-24 23:12:43 -0300
commita93db5234c8e24c56c4b5b615de837afeeac5e74 (patch)
treef68394fa63113bc62798e1e9fff66caaae1a7f8a /Panel.c
parent38fd1bfaba8b742d476a146ee111bf24cce9193e (diff)
handle clicks on panel header line
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Panel.c b/Panel.c
index 42c5ef2f..ccf6ba68 100644
--- a/Panel.c
+++ b/Panel.c
@@ -37,7 +37,11 @@ typedef enum HandlerResult_ {
SYNTH_KEY = 0x20,
} HandlerResult;
-#define EVENT_SETSELECTED -1
+#define EVENT_SET_SELECTED -1
+
+#define EVENT_HEADER_CLICK(x_) (-10000 + x_)
+#define EVENT_IS_HEADER_CLICK(ev_) (ev_ >= -10000 && ev_ <= -9000)
+#define EVENT_HEADER_CLICK_GET_X(ev_) (ev_ + 10000)
typedef HandlerResult(*Panel_EventHandler)(Panel*, int);
@@ -88,7 +92,7 @@ PanelClass Panel_class = {
.extends = Class(Object),
.delete = Panel_delete
},
- .eventHandler = Panel_selectByTyping
+ .eventHandler = Panel_selectByTyping,
};
Panel* Panel_new(int x, int y, int w, int h, bool owner, ObjectClass* type, FunctionBar* fuBar) {
@@ -250,7 +254,7 @@ void Panel_setSelected(Panel* this, int selected) {
selected = 0;
this->selected = selected;
if (Panel_eventHandlerFn(this)) {
- Panel_eventHandler(this, EVENT_SETSELECTED);
+ Panel_eventHandler(this, EVENT_SET_SELECTED);
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy