source: trunk/tools/neercs/old/widgets.h @ 2139

Last change on this file since 2139 was 2139, checked in by sam, 7 years ago

neercs: do not include "config.h" more than once.

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 *  neercs        console-based window manager
3 *  Copyright (c) 2009-2010 Jean-Yves Lamoureux <jylam@lnxscene.org>
4 *                All Rights Reserved
5 *
6 *  This program is free software. It comes without any warranty, to
7 *  the extent permitted by applicable law. You can redistribute it
8 *  and/or modify it under the terms of the Do What The Fuck You Want
9 *  To Public License, Version 2, as published by Sam Hocevar. See
10 *  http://sam.zoy.org/wtfpl/COPYING for more details.
11 */
12
13#include <stdio.h>
14#include <string.h>
15#include <stdlib.h>
16#include <sys/types.h>
17
18#include <caca.h>
19
20
21enum input_box_code
22{
23    INPUT_BOX_ESC,
24    INPUT_BOX_RET,
25    INPUT_BOX_NOTHING,
26};
27
28struct input_box
29{
30    caca_canvas_t *cv;
31    int x, y;
32    int w, h;
33    int size;
34    char *command;
35    char *output_err;
36    char *output_res;
37};
38
39struct input_box *widget_ibox_init(caca_canvas_t * cv, int w, int h);
40int widget_ibox_draw(struct input_box *box);
41int widget_ibox_handle_key(struct input_box *box, unsigned int c);
42char* widget_ibox_get_text(struct input_box *box);
43void widget_ibox_destroy(struct input_box *box);
44void widget_ibox_set_error(struct input_box *box, char *err);
45void widget_ibox_set_msg(struct input_box *box, char *msg);
Note: See TracBrowser for help on using the repository browser.