File: interface_gui.h

package info (click to toggle)
cpm 0.32-1.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,644 kB
  • sloc: ansic: 7,380; makefile: 509; perl: 406; sh: 303
file content (72 lines) | stat: -rw-r--r-- 2,331 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* #############################################################################
 * header information for interface_gui.c
 * #############################################################################
 * Copyright (C) 2005-2009 Harry Brueckner
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or any later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * Contact: Harry Brueckner <harry_b@mm.st>
 *          Muenchener Strasse 12a
 *          85253 Kleinberghofen
 *          Germany
 * #############################################################################
 */
#ifndef CPM_INTERFACE_GUI_H
#define CPM_INTERFACE_GUI_H


/* #############################################################################
 * includes
 */
#include <cdk.h>
#include <sys/types.h>
#include <sys/wait.h>


/* #############################################################################
 * prototypes
 */
void destroyScreen(int line, char* message);
void userInterface(void);


/* really the least messy way to clear the screen.
 * If you don't believe me, check clear.c from ncurses */
#define clear_screen() do { if(!fork()){exit(execl("/usr/bin/clear", "clear")); }else{int s; wait(&s);}}while(0)

/* #############################################################################
 * definition of the interface layout
 */
#define SHOW_BOX        TRUE
#define SHOW_SHADOW     FALSE


/* new versions of CDK define this macro, old ones don't have it so we define
 * it empty to get things working.
 */
#ifdef FORCE_CDK_V4
    #define cpmObjOf(obj) obj
#else
  #ifdef ObjOf
    #define cpmObjOf(obj) ObjOf(obj)
  #else
    #define cpmObjOf(obj) obj
  #endif
#endif


#endif


/* #############################################################################
 */