adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2002, Adam Dunkels. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above |
| 11 | * copyright notice, this list of conditions and the following |
| 12 | * disclaimer in the documentation and/or other materials provided |
| 13 | * with the distribution. |
adamdunkels | ee08cc9 | 2004-07-04 21:04:13 +0000 | [diff] [blame] | 14 | * 3. The name of the author may not be used to endorse or promote |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 15 | * products derived from this software without specific prior |
| 16 | * written permission. |
| 17 | * |
| 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS |
| 19 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
| 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
| 24 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | * |
| 30 | * This file is part of the "ctk" console GUI toolkit for cc65 |
| 31 | * |
adamdunkels | 77b4515 | 2004-08-11 21:21:26 +0000 | [diff] [blame] | 32 | * $Id: ctk-gtksim.h,v 1.5 2004/08/11 21:21:26 adamdunkels Exp $ |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 33 | * |
| 34 | */ |
| 35 | |
| 36 | #ifndef __CTK_GTKSIM_H__ |
| 37 | #define __CTK_GTKSIM_H__ |
| 38 | |
| 39 | #include <gdk/gdkkeysyms.h> |
| 40 | #include <gdk/gdktypes.h> |
adamdunkels | ee08cc9 | 2004-07-04 21:04:13 +0000 | [diff] [blame] | 41 | #include <gtk/gtk.h> |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 42 | |
| 43 | typedef guint ctk_arch_key_t; |
| 44 | |
adamdunkels | ee08cc9 | 2004-07-04 21:04:13 +0000 | [diff] [blame] | 45 | unsigned char ctk_arch_keyavail(void); |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 46 | guint ctk_arch_getkey(void); |
| 47 | |
| 48 | #define CH_CURS_RIGHT GDK_Right |
| 49 | #define CH_CURS_DOWN GDK_Down |
| 50 | #define CH_CURS_LEFT GDK_Left |
| 51 | #define CH_CURS_UP GDK_Up |
| 52 | #define CH_ENTER GDK_Return |
adamdunkels | 73a2a8b | 2003-08-11 22:20:23 +0000 | [diff] [blame] | 53 | #define CH_TAB GDK_Tab |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 54 | #define CH_F1 GDK_F1 |
adamdunkels | 77b4515 | 2004-08-11 21:21:26 +0000 | [diff] [blame] | 55 | #define CH_F2 GDK_F2 |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 56 | #define CH_F3 GDK_F3 |
adamdunkels | 77b4515 | 2004-08-11 21:21:26 +0000 | [diff] [blame] | 57 | #define CH_F4 GDK_F4 |
adamdunkels | 73a2a8b | 2003-08-11 22:20:23 +0000 | [diff] [blame] | 58 | #define CH_F5 GDK_F5 |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 59 | #define CH_DEL GDK_BackSpace |
| 60 | #define CH_ESC GDK_Escape |
| 61 | |
adamdunkels | 77b4515 | 2004-08-11 21:21:26 +0000 | [diff] [blame] | 62 | void ctk_gtksim_init(void); |
adamdunkels | ee08cc9 | 2004-07-04 21:04:13 +0000 | [diff] [blame] | 63 | |
| 64 | void ctk_gtksim_redraw(void); |
| 65 | |
| 66 | extern GdkPixmap *ctk_gtksim_pixmap; |
| 67 | extern GtkWidget *ctk_gtksim_drawing_area; |
| 68 | |
adamdunkels | 77b4515 | 2004-08-11 21:21:26 +0000 | [diff] [blame] | 69 | #define CTK_GTKSIM_SCREEN_WIDTH 640 /*1024*/ |
| 70 | #define CTK_GTKSIM_SCREEN_HEIGHT 400 /*768*/ |
adamdunkels | 1103ef9 | 2003-04-02 09:17:18 +0000 | [diff] [blame] | 71 | |
| 72 | #endif /* __CTK_GTKSIM_H__ */ |