Skip to content

Commit 74b900d

Browse files
committed
Remove unused typedefs
Signed-off-by: Alexey Gladkov <legion@kernel.org>
1 parent 02ce84a commit 74b900d

1 file changed

Lines changed: 11 additions & 27 deletions

File tree

src/widget.h

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ enum widget_type {
8686
struct widget;
8787
TAILQ_HEAD(widgethead, widget);
8888

89-
/*
90-
* Sizing model:
91-
* measure() computes minimum size ONLY and must not depend on layout results.
92-
* layout() assigns the final usable size and must not overwrite minimum sizes.
93-
*/
94-
typedef void (*measure_fn)(struct widget *);
95-
typedef void (*layout_fn)(struct widget *);
96-
typedef void (*render_fn)(struct widget *);
97-
typedef bool (*create_win_fn)(struct widget *);
98-
typedef void (*refresh_fn)(struct widget *);
99-
typedef void (*free_data_fn)(struct widget *);
100-
typedef int (*input_fn)(const struct widget *, wchar_t);
101-
10289
enum widget_property {
10390
PROP_NONE = 0,
10491
PROP_BUTTON_STATE,
@@ -112,10 +99,6 @@ enum widget_property {
11299
PROP_SPINBOX_VALUE,
113100
};
114101

115-
typedef bool (*setter_fn)(struct widget *, enum widget_property, const void *);
116-
typedef bool (*getter_fn)(struct widget *, enum widget_property, void *);
117-
typedef bool (*getter_index_fn)(struct widget *, enum widget_property, int, void *);
118-
119102
/* Private widget-specific data */
120103
struct widget_border;
121104
struct widget_button;
@@ -193,16 +176,17 @@ struct widget {
193176
int flags; /* (widget_flags) */
194177

195178
/* Virtual methods */
196-
free_data_fn free_data; /* Free widget-specific data */
197-
measure_fn measure; /* Compute intrinsic minimum size */
198-
layout_fn layout; /* Assign positions/sizes to children */
199-
create_win_fn create_win; /* Custom function to create window */
200-
refresh_fn noutrefresh; /* Custom function to refresh curses window */
201-
render_fn render; /* Draw contents into win */
202-
input_fn input; /* Handle keyboard input */
203-
setter_fn setter;
204-
getter_fn getter;
205-
getter_index_fn getter_index;
179+
void (*measure)(struct widget *); /* Compute intrinsic minimum size */
180+
void (*layout)(struct widget *); /* Assign positions/sizes to children */
181+
void (*render)(struct widget *); /* Draw contents into win */
182+
bool (*create_win)(struct widget *); /* Custom function to create window */
183+
void (*noutrefresh)(struct widget *); /* Custom function to refresh curses window */
184+
void (*free_data)(struct widget *); /* Free widget-specific data */
185+
int (*input)(const struct widget *, wchar_t); /* Handle keyboard input */
186+
187+
bool (*setter)(struct widget *, enum widget_property, const void *);
188+
bool (*getter)(struct widget *, enum widget_property, void *);
189+
bool (*getter_index)(struct widget *, enum widget_property, int, void *);
206190

207191
/* Tree structure */
208192
struct widget *parent; /* Parent widget */

0 commit comments

Comments
 (0)