# ui.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  $RCSfile: ui.h,v $
    00003                              -------------------
    00004     cvs         : $Id: ui.h,v 1.1 2004/08/06 06:28:48 aquamaniac Exp $
    00005     begin       : Mon Feb 09 2004
    00006     copyright   : (C) 2004 by Martin Preuss
    00007     email       : martin@libchipcard.de
    00008
    00009  ***************************************************************************
    00010  *                                                                         *
    00011  *   This library is free software; you can redistribute it and/or         *
    00012  *   modify it under the terms of the GNU Lesser General Public            *
    00013  *   License as published by the Free Software Foundation; either          *
    00014  *   version 2.1 of the License, or (at your option) any later version.    *
    00015  *                                                                         *
    00016  *   This library is distributed in the hope that it will be useful,       *
    00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
    00019  *   Lesser General Public License for more details.                       *
    00020  *                                                                         *
    00021  *   You should have received a copy of the GNU Lesser General Public      *
    00022  *   License along with this library; if not, write to the Free Software   *
    00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
    00024  *   MA  02111-1307  USA                                                   *
    00025  *                                                                         *
    00026  ***************************************************************************/
    00027
    00028 #ifndef GWEN_UI_UI_H
    00029 #define GWEN_UI_UI_H
    00030
    00031
    00032 #define GWEN_UI_KEY_DELETE 0x14a
    00033 #define GWEN_UI_KEY_INSERT 0x14b
    00034
    00035
    00036 typedef enum {
    00037   GWEN_UIResult_Handled=0,
    00038   GWEN_UIResult_NotHandled,
    00039   GWEN_UIResult_Error,
    00040   GWEN_UIResult_Finished,
    00041   GWEN_UIResult_Quit
    00042 } GWEN_UI_RESULT;
    00043
    00044
    00045 #include <gwenhywfar/ui/event.h>
    00046
    00047 int GWEN_UI_Begin();
    00048 int GWEN_UI_End();
    00049
    00050 void GWEN_UI_Flush();
    00051 GWEN_UI_RESULT GWEN_UI_Work();
    00052
    00053
    00054 GWEN_EVENT *GWEN_UI_PeekNextEvent();
    00055 GWEN_EVENT *GWEN_UI_GetNextEvent();
    00056 GWEN_UI_RESULT GWEN_UI_DispatchEvent(GWEN_EVENT *e);
    00057
    00058 GWEN_WIDGET *GWEN_UI_GetFocusWidget();
    00059
    00060
    00061
    00062 int GWEN_UI_GetCols();
    00063 int GWEN_UI_GetLines();
    00064
    00065
    00066 int GWEN_UI_Calculate_MinWidth(const char *text);
    00067 int GWEN_UI_Calculate_Height(const char *text, int width);
    00068
    00069
    00070 #endif
    00071
    00072
    00073
    00074
    00075