00001 /** 00002 * \file 00003 * Header file for the experimental application level CTK textedit widget. 00004 * \author Adam Dunkels <adam@dunkels.com> 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2003, Adam Dunkels. 00010 * All rights reserved. 00011 * 00012 * Redistribution and use in source and binary forms, with or without 00013 * modification, are permitted provided that the following conditions 00014 * are met: 00015 * 1. Redistributions of source code must retain the above copyright 00016 * notice, this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above 00018 * copyright notice, this list of conditions and the following 00019 * disclaimer in the documentation and/or other materials provided 00020 * with the distribution. 00021 * 3. The name of the author may not be used to endorse or promote 00022 * products derived from this software without specific prior 00023 * written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 00026 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00027 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00028 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00029 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00031 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00032 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00033 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00034 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 * 00037 * This file is part of the Contiki desktop environment 00038 * 00039 * $Id: ctk-textedit.h,v 1.1 2006/06/17 22:41:17 adamdunkels Exp $ 00040 * 00041 */ 00042 #ifndef __CTK_TEXTEDIT_H__ 00043 #define __CTK_TEXTEDIT_H__ 00044 00045 #include "ctk/ctk.h" 00046 00047 /** 00048 * Instantiating macro for the CTK textedit widget. 00049 * 00050 * 00051 * \param tx The x position of the widget. 00052 * \param ty The y position of the widget. 00053 * \param tw The width of the widget. 00054 * \param th The height of the widget. 00055 * \param ttext The text buffer to be edited. 00056 */ 00057 #define CTK_TEXTEDIT(tx, ty, tw, th, ttext) \ 00058 {CTK_LABEL(tx, ty, tw, th, ttext)}, 0, 0 00059 struct ctk_textedit { 00060 struct ctk_label label; 00061 unsigned char xpos, ypos; 00062 }; 00063 00064 void ctk_textedit_init(struct ctk_textedit *t); 00065 00066 void ctk_textedit_add(struct ctk_window *w, 00067 struct ctk_textedit *t); 00068 00069 void ctk_textedit_eventhandler(struct ctk_textedit *t, 00070 process_event_t s, 00071 process_data_t data); 00072 00073 #endif /* __CTK_TEXTEDIT_H__ */