]> git.ozlabs.org Git - petitboot/blob - ui/twin/pbt-client.h
discover/yaboot: Remove known_names list
[petitboot] / ui / twin / pbt-client.h
1 /*
2  *  Copyright Geoff Levand <geoff@infradead.org>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; version 2 of the License.
7  *
8  *  This program is distributed in the hope that it will be useful,
9  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  *  GNU General Public License for more details.
12  *
13  *  You should have received a copy of the GNU General Public License
14  *  along with this program; if not, write to the Free Software
15  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  */
17
18 #if !defined(_PBT_CLIENT_H)
19 #define _PBT_CLIENT_H
20
21 #include "ui/common/ui-system.h"
22 #include "pbt-menu.h"
23 #include "pbt-scr.h"
24
25 /**
26  * struct pbt_decor - Provides title, help and status bars.
27  */
28
29 struct pbt_decor {
30         twin_label_t *title;
31         twin_label_t *help;
32         twin_label_t *status;
33 };
34
35 struct pbt_frame {
36         struct pbt_scr *scr;
37         struct pbt_menu *top_menu;
38         struct pbt_decor decor;
39 };
40
41 void pbt_frame_status_printf(struct pbt_frame *frame, const char *format, ...);
42
43 struct pbt_client {
44         const char *sig;
45         struct pb_signal_data signal_data;
46         void *client_data;
47         struct pbt_frame frame;
48         struct discover_client *discover_client;
49         struct waitset *waitset;
50 };
51
52 struct pbt_client *pbt_client_init(enum pbt_twin_backend backend,
53         unsigned int width, unsigned int height, int start_deamon);
54 void pbt_client_destroy(struct pbt_client *client);
55 void pbt_client_resize(struct pbt_client *client);
56
57 #endif