blob: 3668946c61079d0480e724cd1c4905dfd702c036 [file] [log] [blame]
adamdunkels1e45c6d2003-09-02 21:47:27 +00001/**
2 * \file
3 * Header file for the experimental application level CTK textedit widget.
4 * \author Adam Dunkels <adam@dunkels.com>
5 *
6 */
7
adamdunkelsb8f64972003-08-11 22:22:44 +00008/*
9 * Copyright (c) 2003, Adam Dunkels.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer in the documentation and/or other materials provided
20 * with the distribution.
adamdunkels1e45c6d2003-09-02 21:47:27 +000021 * 3. The name of the author may not be used to endorse or promote
adamdunkelsb8f64972003-08-11 22:22:44 +000022 * products derived from this software without specific prior
23 * written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
26 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
29 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * This file is part of the Contiki desktop environment
38 *
adamdunkelse3577852004-09-01 18:27:18 +000039 * $Id: ctk-textedit.h,v 1.4 2004/09/01 18:27:18 adamdunkels Exp $
adamdunkelsb8f64972003-08-11 22:22:44 +000040 *
41 */
42#ifndef __CTK_TEXTEDIT_H__
43#define __CTK_TEXTEDIT_H__
44
45#include "ctk.h"
adamdunkelsb8f64972003-08-11 22:22:44 +000046
adamdunkels1e45c6d2003-09-02 21:47:27 +000047/**
48 * Instantiating macro for the CTK textedit widget.
49 *
50 *
51 * \param tx The x position of the widget.
52 * \param ty The y position of the widget.
53 * \param tw The width of the widget.
54 * \param th The height of the widget.
55 * \param ttext The text buffer to be edited.
56 */
adamdunkelsb8f64972003-08-11 22:22:44 +000057#define CTK_TEXTEDIT(tx, ty, tw, th, ttext) \
58 {CTK_LABEL(tx, ty, tw, th, ttext)}, 0, 0
59struct ctk_textedit {
60 struct ctk_label label;
61 unsigned char xpos, ypos;
62};
63
adamdunkelse3577852004-09-01 18:27:18 +000064void ctk_textedit_init(struct ctk_textedit *t);
65
adamdunkelsb8f64972003-08-11 22:22:44 +000066void ctk_textedit_add(struct ctk_window *w,
67 struct ctk_textedit *t);
68
adamdunkels077ad942004-07-04 15:12:56 +000069void ctk_textedit_eventhandler(struct ctk_textedit *t,
70 ek_event_t s,
71 ek_data_t data);
adamdunkelsb8f64972003-08-11 22:22:44 +000072
73#endif /* __CTK_TEXTEDIT_H__ */