diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-03 06:32:39 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-03 06:32:39 +0000 |
commit | ea0a75ee129d9998ed792e26f9256aa68fcf5bea (patch) | |
tree | 896ba9fcb9176c55630520639c25dbe04e995774 /usr.sbin/sysinstall/sysinstall.h | |
parent | b755851a75932ff275e1d0b9fd2283b881a80139 (diff) | |
download | FreeBSD-src-ea0a75ee129d9998ed792e26f9256aa68fcf5bea.zip FreeBSD-src-ea0a75ee129d9998ed792e26f9256aa68fcf5bea.tar.gz |
Do something I've wanted to do for quite some time - collapse all the
common layout code into some work functions and make all the layout-using
routine adopt them. Also reorganize includes and generally clean up.
Diffstat (limited to 'usr.sbin/sysinstall/sysinstall.h')
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index af1cbf3..d650bce 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.95 1996/12/17 00:00:15 jkh Exp $ + * $Id: sysinstall.h,v 1.96 1996/12/29 05:51:39 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -37,13 +37,17 @@ #ifndef _SYSINSTALL_H_INCLUDE #define _SYSINSTALL_H_INCLUDE +#include <sys/types.h> +#include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <dialog.h> -#include <sys/types.h> -#include <sys/wait.h> +#include <dialog.h> +#include "ui_objects.h" +#include "dir.h" +#include "colors.h" #include "libdisk.h" #include "dist.h" #include "version.h" @@ -173,6 +177,19 @@ typedef struct _variable { char *value; } Variable; +/* A screen layout structure */ +typedef struct _layout { + int y; /* x & Y co-ordinates */ + int x; + int len; /* The size of the dialog on the screen */ + int maxlen; /* How much the user can type in ... */ + char *prompt; /* The string for the prompt */ + char *help; /* The display for the help line */ + void *var; /* The var to set when this changes */ + int type; /* The type of the dialog to create */ + void *obj; /* The obj pointer returned by libdialog */ +} Layout; + /* For attribs */ #define MAX_ATTRIBS 200 #define MAX_NAME 64 @@ -342,6 +359,9 @@ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ +/* Stuff from libdialog which isn't properly declared outside */ +extern void display_helpfile(void); +extern void display_helpline(WINDOW *w, int y, int width); /*** Prototypes ***/ @@ -562,6 +582,11 @@ extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title, extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mount(char *, void *data); +extern WINDOW *openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height); +extern ComposeObj *initLayoutDialog(WINDOW *win, Layout *layout, int x, int y, int *max); +extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj, + int *n, int max, int *cbutton, int *cancel); + extern WINDOW *savescr(void); extern void restorescr(WINDOW *w); extern char *sstrncpy(char *dst, const char *src, int size); |