1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 prompt.h for the Openbox window manager
4 Copyright (c) 2008 Dana Jansens
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 2 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 See the COPYING file for a copy of the GNU General Public License.
22 typedef struct _ObPrompt ObPrompt
;
23 typedef struct _ObPromptElement ObPromptElement
;
27 #include "render/render.h"
30 struct _ObPromptElement
{
34 gint x
, y
, width
, height
;
39 ObInternalWindow super
;
42 /* keep a copy of this because we re-render things that may need it
52 /* one for each answer */
53 ObPromptElement
*button
;
57 void prompt_startup(gboolean reconfig
);
58 void prompt_shutdown(gboolean reconfig
);
60 ObPrompt
* prompt_new(const gchar
*msg
, const gchar
*const *answers
);
61 void prompt_ref(ObPrompt
*self
);
62 void prompt_unref(ObPrompt
*self
);
64 /*! Show the prompt. It will be centered within the given area rectangle */
65 void prompt_show(ObPrompt
*self
, struct _ObClient
*parent
);
66 void prompt_hide(ObPrompt
*self
);
67 void prompt_hide_window(Window window
);