ctk-conio_arch.c

00001 /*
00002  * Copyright (c) 2007, Takahide Matsutsuka.
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above
00011  *    copyright notice, this list of conditions and the following
00012  *    disclaimer in the documentation and/or other materials provided
00013  *    with the distribution.
00014  * 3. The name of the author may not be used to endorse or promote
00015  *    products derived from this software without specific prior
00016  *    written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00019  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00022  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00024  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  * $Id: ctk-conio_arch.c,v 1.4 2009/12/16 06:47:18 matsutsuka Exp $
00031  *
00032  */
00033 
00034 /*
00035  * \file
00036  *      This is architecture-depend contiki toolkit for PC-6001 family.
00037  * \author
00038  *      Takahide Matsutsuka <markn@markn.org>
00039  */
00040  
00041 
00042 #include "ctk/ctk.h"
00043 #include "ctk/ctk-draw.h"
00044 #include "contiki-conf.h"
00045 #include "ctk/ctk_arch.h"
00046 #include <stddef.h>
00047 
00048 /*---------------------------------------------------------------------------*/
00049 /*
00050  * Offset constants for assembler
00051  */
00052 const u8_t off_widget_x        = offsetof(struct ctk_widget, x);
00053 const u8_t off_widget_y        = offsetof(struct ctk_widget, y);
00054 const u8_t off_widget_w        = offsetof(struct ctk_widget, w);
00055 const u8_t off_widget_h        = offsetof(struct ctk_widget, h);
00056 const u8_t off_widget_type     = offsetof(struct ctk_widget, type);
00057 const u8_t off_widget_window   = offsetof(struct ctk_widget, window);
00058 
00059 const u8_t off_widget_label_text      = offsetof(struct ctk_widget, widget) +
00060   offsetof(struct ctk_widget_label, text);
00061 const u8_t off_widget_button_text     = offsetof(struct ctk_widget, widget) +
00062   offsetof(struct ctk_widget_button, text);
00063 const u8_t off_widget_textentry_text  = offsetof(struct ctk_widget, widget) +
00064   offsetof(struct ctk_widget_textentry, text);
00065 const u8_t off_widget_textentry_xpos  = offsetof(struct ctk_widget, widget) +
00066   offsetof(struct ctk_widget_textentry, xpos);
00067 const u8_t off_widget_textentry_ypos  = offsetof(struct ctk_widget, widget) +
00068   offsetof(struct ctk_widget_textentry, ypos);
00069 const u8_t off_widget_textentry_state = offsetof(struct ctk_widget, widget) +
00070   offsetof(struct ctk_widget_textentry, state);
00071 #if CTK_CONF_HYPERLINK
00072 const u8_t off_widget_hyperlink_text = offsetof(struct ctk_widget, widget) +
00073   offsetof(struct ctk_widget_hyperlink, text);
00074 #endif /* CTK_CONF_HYPERLINK */
00075 
00076 #if CTK_CONF_ICONS
00077 const u8_t off_widget_icon_title      = offsetof(struct ctk_widget, widget) +
00078   offsetof(struct ctk_widget_icon, title);
00079 const u8_t off_widget_icon_textmap    = offsetof(struct ctk_widget, widget) +
00080   offsetof(struct ctk_widget_icon, textmap);
00081 #endif /* CTK_CONF_ICONS */
00082 
00083 const u8_t off_window_x        = offsetof(struct ctk_window, x);
00084 const u8_t off_window_y        = offsetof(struct ctk_window, y);
00085 const u8_t off_window_h        = offsetof(struct ctk_window, h);
00086 const u8_t off_window_w        = offsetof(struct ctk_window, w);
00087 const u8_t off_window_inactive = offsetof(struct ctk_window, inactive);
00088 const u8_t off_window_active   = offsetof(struct ctk_window, active);
00089 const u8_t off_window_next     = offsetof(struct ctk_window, next);
00090 const u8_t off_window_focused  = offsetof(struct ctk_window, focused);
00091 
00092 #if CTK_CONF_MENUS
00093 const u8_t off_menu_title      = offsetof(struct ctk_menu, title);
00094 const u8_t off_menu_active     = offsetof(struct ctk_menu, active);
00095 const u8_t off_menu_nitems     = offsetof(struct ctk_menu, nitems);
00096 const u8_t off_menu_items      = offsetof(struct ctk_menu, items);
00097 const u8_t off_menu_next       = offsetof(struct ctk_menu, next);
00098 const u8_t off_menuitem_title  = offsetof(struct ctk_menuitem, title);
00099 const u8_t size_menuitem       = sizeof(struct ctk_menuitem);
00100 const u8_t off_menus_open      = offsetof(struct ctk_menus, open);
00101 const u8_t off_menus_menus     = offsetof(struct ctk_menus, menus);
00102 const u8_t off_menus_desktopmenu = offsetof(struct ctk_menus, desktopmenu);
00103 #endif
00104 
00105 /*---------------------------------------------------------------------------*/

Generated on Mon Apr 11 14:23:45 2011 for Contiki 2.5 by  doxygen 1.6.1