blob: 03cd11f43423ed04417863b1d96e549ed8376c72 [file] [log] [blame]
adamdunkels1103ef92003-04-02 09:17:18 +00001/*
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.
adamdunkelsee08cc92004-07-04 21:04:13 +000014 * 3. The name of the author may not be used to endorse or promote
adamdunkels1103ef92003-04-02 09:17:18 +000015 * 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 *
adamdunkels77b45152004-08-11 21:21:26 +000032 * $Id: ctk-gtksim.h,v 1.5 2004/08/11 21:21:26 adamdunkels Exp $
adamdunkels1103ef92003-04-02 09:17:18 +000033 *
34 */
35
36#ifndef __CTK_GTKSIM_H__
37#define __CTK_GTKSIM_H__
38
39#include <gdk/gdkkeysyms.h>
40#include <gdk/gdktypes.h>
adamdunkelsee08cc92004-07-04 21:04:13 +000041#include <gtk/gtk.h>
adamdunkels1103ef92003-04-02 09:17:18 +000042
43typedef guint ctk_arch_key_t;
44
adamdunkelsee08cc92004-07-04 21:04:13 +000045unsigned char ctk_arch_keyavail(void);
adamdunkels1103ef92003-04-02 09:17:18 +000046guint 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
adamdunkels73a2a8b2003-08-11 22:20:23 +000053#define CH_TAB GDK_Tab
adamdunkels1103ef92003-04-02 09:17:18 +000054#define CH_F1 GDK_F1
adamdunkels77b45152004-08-11 21:21:26 +000055#define CH_F2 GDK_F2
adamdunkels1103ef92003-04-02 09:17:18 +000056#define CH_F3 GDK_F3
adamdunkels77b45152004-08-11 21:21:26 +000057#define CH_F4 GDK_F4
adamdunkels73a2a8b2003-08-11 22:20:23 +000058#define CH_F5 GDK_F5
adamdunkels1103ef92003-04-02 09:17:18 +000059#define CH_DEL GDK_BackSpace
60#define CH_ESC GDK_Escape
61
adamdunkels77b45152004-08-11 21:21:26 +000062void ctk_gtksim_init(void);
adamdunkelsee08cc92004-07-04 21:04:13 +000063
64void ctk_gtksim_redraw(void);
65
66extern GdkPixmap *ctk_gtksim_pixmap;
67extern GtkWidget *ctk_gtksim_drawing_area;
68
adamdunkels77b45152004-08-11 21:21:26 +000069#define CTK_GTKSIM_SCREEN_WIDTH 640 /*1024*/
70#define CTK_GTKSIM_SCREEN_HEIGHT 400 /*768*/
adamdunkels1103ef92003-04-02 09:17:18 +000071
72#endif /* __CTK_GTKSIM_H__ */