1/* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#ifndef _MINUI_H_ 18#define _MINUI_H_ 19 20int gr_init(void); 21void gr_exit(void); 22 23int gr_fb_width(void); 24int gr_fb_height(void); 25void gr_flip(void); 26 27void gr_color(unsigned char r, unsigned char g, unsigned char b); 28void gr_fill(int x, int y, int w, int h); 29int gr_text(int x, int y, const char *s); 30int gr_measure(const char *s); 31 32 33typedef struct event event; 34 35struct event 36{ 37 unsigned type; 38 unsigned code; 39 unsigned value; 40}; 41 42int ev_init(void); 43void ev_exit(void); 44 45int ev_get(event *ev, unsigned dont_wait); 46 47#define TYPE_KEY 1 48 49#define KEY_UP 103 50#define KEY_DOWN 108 51#define KEY_LEFT 105 52#define KEY_RIGHT 106 53#define KEY_CENTER 232 54#define KEY_ENTER 28 55 56#endif 57