s4:samr: allow builtin groups for samr_OpenGroup.
[Samba.git] / source3 / utils / regedit_dialog.h
blob0a0aec87b877e8b4410292ecede9d5da6c5c8999
1 /*
2 * Samba Unix/Linux SMB client library
3 * Registry Editor
4 * Copyright (C) Christopher Davis 2012
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _REGEDIT_DIALOG_H_
21 #define _REGEDIT_DIALOG_H_
23 #include <ncurses.h>
24 #include <panel.h>
25 #include <menu.h>
27 struct dialog {
28 WINDOW *window;
29 WINDOW *sub_window;
30 WINDOW *menu_window;
31 PANEL *panel;
32 MENU *choices;
33 ITEM **choice_items;
34 bool centered;
37 struct dialog *dialog_new(TALLOC_CTX *ctx, const char *title, int nlines,
38 int ncols, int y, int x);
40 struct dialog *dialog_center_new(TALLOC_CTX *ctx, const char *title,
41 int nlines, int ncols);
43 struct dialog *dialog_choice_new(TALLOC_CTX *ctx, const char *title,
44 const char **choices, int nlines, int ncols,
45 int y, int x);
47 struct dialog *dialog_choice_center_new(TALLOC_CTX *ctx, const char *title,
48 const char **choices, int nlines,
49 int ncols);
51 enum dialog_type {
52 DIA_ALERT,
53 DIA_CONFIRM
56 enum dialog_selection {
57 DIALOG_OK = 0,
58 DIALOG_CANCEL = 1
61 int dialog_notice(TALLOC_CTX *ctx, enum dialog_type type,
62 const char *title, const char *msg, ...);
64 int dialog_input(TALLOC_CTX *ctx, char **output, const char *title,
65 const char *msg, ...);
67 struct registry_key;
68 struct value_item;
70 WERROR dialog_edit_value(TALLOC_CTX *ctx, struct registry_key *key,
71 uint32_t type, const struct value_item *vitem,
72 bool force_binary);
74 int dialog_select_type(TALLOC_CTX *ctx, int *type);
76 #endif