From a1a027b9bd833db5384d7dc65046194018eb8bfa Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Sat, 21 Dec 2019 01:09:25 -0800 Subject: Axe automated header generation. Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code. --- Panel.c | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) (limited to 'Panel.c') diff --git a/Panel.c b/Panel.c index 348fd238..297dc89c 100644 --- a/Panel.c +++ b/Panel.c @@ -21,60 +21,6 @@ in the source distribution for its full text. //#link curses -/*{ -#include "Object.h" -#include "Vector.h" -#include "FunctionBar.h" - -typedef struct Panel_ Panel; - -typedef enum HandlerResult_ { - HANDLED = 0x01, - IGNORED = 0x02, - BREAK_LOOP = 0x04, - REDRAW = 0x08, - RESCAN = 0x10, - SYNTH_KEY = 0x20, -} HandlerResult; - -#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); - -typedef struct PanelClass_ { - const ObjectClass super; - const Panel_EventHandler eventHandler; -} PanelClass; - -#define As_Panel(this_) ((PanelClass*)((this_)->super.klass)) -#define Panel_eventHandlerFn(this_) As_Panel(this_)->eventHandler -#define Panel_eventHandler(this_, ev_) As_Panel(this_)->eventHandler((Panel*)(this_), ev_) - -struct Panel_ { - Object super; - int x, y, w, h; - WINDOW* window; - Vector* items; - int selected; - int oldSelected; - int selectedLen; - void* eventHandlerState; - int scrollV; - short scrollH; - bool needsRedraw; - FunctionBar* currentBar; - FunctionBar* defaultBar; - RichString header; - int selectionColor; -}; - -#define Panel_setDefaultBar(this_) do{ (this_)->currentBar = (this_)->defaultBar; }while(0) - -}*/ #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) -- cgit v1.2.3