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

Last change on this file since 1656 was 1656, checked in by sam, 8 years ago

neercs: start porting the old code to Windows; this breaks the Visual Studio
build until further fixes are made.

  • Property svn:keywords set to Id
File size: 1.3 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#if defined HAVE_CONFIG_H
14#   include "config.h"
15#endif
16
17#include <stdio.h>
18#include <string.h>
19#include <stdlib.h>
20#include <sys/types.h>
21
22#include <caca.h>
23
24
25enum input_box_code
26{
27    INPUT_BOX_ESC,
28    INPUT_BOX_RET,
29    INPUT_BOX_NOTHING,
30};
31
32struct input_box
33{
34    caca_canvas_t *cv;
35    int x, y;
36    int w, h;
37    int size;
38    char *command;
39    char *output_err;
40    char *output_res;
41};
42
43struct input_box *widget_ibox_init(caca_canvas_t * cv, int w, int h);
44int widget_ibox_draw(struct input_box *box);
45int widget_ibox_handle_key(struct input_box *box, unsigned int c);
46char* widget_ibox_get_text(struct input_box *box);
47void widget_ibox_destroy(struct input_box *box);
48void widget_ibox_set_error(struct input_box *box, char *err);
49void widget_ibox_set_msg(struct input_box *box, char *msg);
Note: See TracBrowser for help on using the repository browser.