00001 /* 00002 * driver.h - Interface definition for driver modules. 00003 * This file is part of the FreeLCD package. 00004 * 00005 * $Id: driver_8h-source.html,v 1.1 2003/02/16 22:50:41 unicorn Exp $ 00006 * 00007 * This program is free software; you can redistribute it and/or modify it 00008 * under the terms of the GNU General Public License as published by the 00009 * Free Software Foundation; either version 2 of the License, or (at your 00010 * option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00020 * MA 02111-1307 USA 00021 * 00022 * Copyright (c) 2002, 2003, Jeroen van den Berg <unicorn@hippie.nu> 00023 */ 00024 00025 00026 #ifndef _FLCDD_DRIVER_H 00027 #define _FLCDD_DRIVER_H 00028 00029 #include "renderers/charcanvas.h" 00030 #include "common/xmlt.h" 00031 00032 /* Function returns a driver handle, configured with the given data. */ 00033 void* 00034 drv_create_handle (xml_node *config); 00035 00036 /* Release all resources held by the driver handle. */ 00037 void 00038 drv_destroy_handle (void *handle); 00039 00040 /* Bind a driver handle to a backend (e.g. the serial port, or ncurses). */ 00041 void 00042 drv_bind_backend (void *handle, void *backend); 00043 00044 /* Display the canvas. */ 00045 void 00046 drv_process_canvas (void *handle, cc_canvas *canvas); 00047 00048 /* Get information about this driver. The returned char pointer might 00049 * need casting to another type, if the field does not contain character 00050 * data. All drivers must support at least the following fields: 00051 * - "name", a short descriptive name 00052 * - "version", a single character indicating the version. 00053 */ 00054 const char* 00055 drv_get_info (const char *field); 00056 00057 /* Return the handle to the backend that is currently bound to the given 00058 * handle. 00059 */ 00060 void* 00061 drv_get_backend (void *handle); 00062 00063 #endif /* Multiple include guard */