150e24496SAlfonso S. Siciliano /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 350e24496SAlfonso S. Siciliano * 450e24496SAlfonso S. Siciliano * Copyright (c) 2011 Nathan Whitehorn 550e24496SAlfonso S. Siciliano * All rights reserved. 650e24496SAlfonso S. Siciliano * 750e24496SAlfonso S. Siciliano * Redistribution and use in source and binary forms, with or without 850e24496SAlfonso S. Siciliano * modification, are permitted provided that the following conditions 950e24496SAlfonso S. Siciliano * are met: 1050e24496SAlfonso S. Siciliano * 1. Redistributions of source code must retain the above copyright 1150e24496SAlfonso S. Siciliano * notice, this list of conditions and the following disclaimer. 1250e24496SAlfonso S. Siciliano * 2. Redistributions in binary form must reproduce the above copyright 1350e24496SAlfonso S. Siciliano * notice, this list of conditions and the following disclaimer in the 1450e24496SAlfonso S. Siciliano * documentation and/or other materials provided with the distribution. 1550e24496SAlfonso S. Siciliano * 1650e24496SAlfonso S. Siciliano * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1750e24496SAlfonso S. Siciliano * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1850e24496SAlfonso S. Siciliano * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1950e24496SAlfonso S. Siciliano * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2050e24496SAlfonso S. Siciliano * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2150e24496SAlfonso S. Siciliano * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2250e24496SAlfonso S. Siciliano * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2350e24496SAlfonso S. Siciliano * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2450e24496SAlfonso S. Siciliano * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2550e24496SAlfonso S. Siciliano * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2650e24496SAlfonso S. Siciliano * SUCH DAMAGE. 2750e24496SAlfonso S. Siciliano */ 2850e24496SAlfonso S. Siciliano 2950e24496SAlfonso S. Siciliano #ifndef _PARTEDIT_DISKMENU_H 3050e24496SAlfonso S. Siciliano #define _PARTEDIT_DISKMENU_H 3150e24496SAlfonso S. Siciliano 3250e24496SAlfonso S. Siciliano #define BUTTON_CREATE BSDDIALOG_OK 3350e24496SAlfonso S. Siciliano #define BUTTON_DELETE BSDDIALOG_EXTRA 3450e24496SAlfonso S. Siciliano #define BUTTON_MODIFY BSDDIALOG_CANCEL 3550e24496SAlfonso S. Siciliano #define BUTTON_REVERT BSDDIALOG_HELP 36*61ba55bcSBaptiste Daroussin #define BUTTON_AUTO BSDDIALOG_RIGHT1 37*61ba55bcSBaptiste Daroussin #define BUTTON_FINISH BSDDIALOG_RIGHT2 3850e24496SAlfonso S. Siciliano 3950e24496SAlfonso S. Siciliano struct partedit_item { 4050e24496SAlfonso S. Siciliano int indentation; 4150e24496SAlfonso S. Siciliano const char *name; 4250e24496SAlfonso S. Siciliano intmax_t size; 4350e24496SAlfonso S. Siciliano const char *type; 4450e24496SAlfonso S. Siciliano char *mountpoint; 4550e24496SAlfonso S. Siciliano 4650e24496SAlfonso S. Siciliano void *cookie; 4750e24496SAlfonso S. Siciliano }; 4850e24496SAlfonso S. Siciliano 4950e24496SAlfonso S. Siciliano int diskmenu_show(const char *title, const char *text, 5050e24496SAlfonso S. Siciliano struct partedit_item *items, int nitems, int *selected); 5150e24496SAlfonso S. Siciliano 5250e24496SAlfonso S. Siciliano #endif 53