aboutsummaryrefslogtreecommitdiffstats
path: root/Panel.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-05-02 16:04:22 +0200
committerDaniel Lange <DLange@git.local>2022-05-02 16:04:22 +0200
commit2f0332b75397ad5240a429d72203f0531011b6a9 (patch)
tree4782d4b8d0c43f3e6faa1bbbe95816a09e815e67 /Panel.h
parent93c96b12c9cb349b762d38d69568d65cd3e4fbfd (diff)
parent1b805a31720727008b32b1129a167758519fd4db (diff)
downloaddebian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.tar.gz
debian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.tar.bz2
debian_htop-2f0332b75397ad5240a429d72203f0531011b6a9.zip
Update upstream source from tag 'upstream/3.2.0'
Update to upstream version '3.2.0' with Debian dir 5ce130e9471b77941bbd217b5ea8b7b3419a91c6
Diffstat (limited to 'Panel.h')
-rw-r--r--Panel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Panel.h b/Panel.h
index 9bb4c77..33d532e 100644
--- a/Panel.h
+++ b/Panel.h
@@ -39,6 +39,10 @@ typedef enum HandlerResult_ {
#define EVENT_IS_HEADER_CLICK(ev_) ((ev_) >= -10000 && (ev_) <= -9000)
#define EVENT_HEADER_CLICK_GET_X(ev_) ((ev_) + 10000)
+#define EVENT_SCREEN_TAB_CLICK(x_) (-20000 + (x_))
+#define EVENT_IS_SCREEN_TAB_CLICK(ev_) ((ev_) >= -20000 && (ev_) < -10000)
+#define EVENT_SCREEN_TAB_GET_X(ev_) ((ev_) + 20000)
+
typedef HandlerResult (*Panel_EventHandler)(Panel*, int);
typedef void (*Panel_DrawFunctionBar)(Panel*, bool);
typedef void (*Panel_PrintHeader)(Panel*);
@@ -61,6 +65,7 @@ typedef struct PanelClass_ {
struct Panel_ {
Object super;
int x, y, w, h;
+ int cursorX, cursorY;
Vector* items;
int selected;
int oldSelected;
@@ -69,6 +74,7 @@ struct Panel_ {
int scrollV;
int scrollH;
bool needsRedraw;
+ bool cursorOn;
bool wasFocus;
FunctionBar* currentBar;
FunctionBar* defaultBar;
@@ -90,6 +96,8 @@ void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type
void Panel_done(Panel* this);
+void Panel_setCursorToSelection(Panel* this);
+
void Panel_setSelectionColor(Panel* this, ColorElements colorId);
void Panel_setHeader(Panel* this, const char* header);
@@ -130,4 +138,6 @@ bool Panel_onKey(Panel* this, int key);
HandlerResult Panel_selectByTyping(Panel* this, int ch);
+int Panel_getCh(Panel* this);
+
#endif

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