Debian Codegraph @

lib/packagekit-glib2/pk-console-private.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2008-2009 Richard Hughes <[email protected]>
4 * Copyright (C) 2014-2026 Matthias Klumpp <[email protected]>
5 *
6 * Licensed under the GNU Lesser General Public License Version 2.1
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #ifndef __PK_CONSOLE_PRIVATE_H
24 #define __PK_CONSOLE_PRIVATE_H
25
26 #include <glib.h>
27 #include <packagekit-glib2/pk-client.h>
28 #include <packagekit-glib2/pk-bitfield.h>
29 #include <packagekit-glib2/pk-enum.h>
30
31 G_BEGIN_DECLS
32
33 guint pk_console_str_width (const gchar *text);
34 gchar *pk_console_text_truncate (const gchar *text,
35 guint max_width);
36 gchar *pk_console_strpad (const gchar *text,
37 guint width);
38
39 guint pk_console_get_number (const gchar *question,
40 guint maxnum);
41 gboolean pk_console_get_prompt (const gchar *question,
42 gboolean defaultyes);
43
44 G_END_DECLS
45
46 #endif /* __PK_CONSOLE_PRIVATE_H */