File: flatpak-complete.h

package info (click to toggle)
flatpak 1.16.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,028 kB
  • sloc: ansic: 101,055; xml: 11,453; sh: 4,871; python: 2,251; yacc: 1,236; makefile: 86; csh: 20
file content (75 lines) | stat: -rw-r--r-- 3,293 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * Copyright © 2018 Red Hat, Inc
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Alexander Larsson <alexl@redhat.com>
 */

#ifndef __FLATPAK_COMPLETE_H__
#define __FLATPAK_COMPLETE_H__

#include <ostree.h>
#include "flatpak-dir-private.h"
#include "flatpak-builtins-utils.h"

typedef struct FlatpakCompletion FlatpakCompletion;

struct FlatpakCompletion
{
  char  *shell_cur;
  char  *cur;
  char  *prev;
  char  *line;
  int    point;
  char **argv;
  char **original_argv;
  int    argc;
  int    original_argc;
};

void flatpak_completion_debug (const gchar *format,
                               ...) G_GNUC_PRINTF (1, 2);

FlatpakCompletion *flatpak_completion_new (const char *arg_line,
                                           const char *arg_point,
                                           const char *arg_cur);
void               flatpak_complete_word (FlatpakCompletion *completion,
                                          const char        *format,
                                          ...) G_GNUC_PRINTF (2, 3);
void               flatpak_complete_ref (FlatpakCompletion *completion,
                                         OstreeRepo        *repo);
void               flatpak_complete_ref_id (FlatpakCompletion *completion,
                                            GPtrArray         *refs);
void               flatpak_complete_ref_branch (FlatpakCompletion *completion,
                                                GPtrArray         *refs);
void               flatpak_complete_partial_ref (FlatpakCompletion *completion,
                                                 FlatpakKinds       kinds,
                                                 const char        *only_arch,
                                                 FlatpakDir        *dir,
                                                 const char        *remote);
void               flatpak_complete_file (FlatpakCompletion *completion,
                                          const char        *file_type);
void               flatpak_complete_dir (FlatpakCompletion *completion);
void               flatpak_complete_options (FlatpakCompletion *completion,
                                             GOptionEntry      *entries);
void               flatpak_complete_columns (FlatpakCompletion *completion,
                                             Column            *columns);
void               flatpak_completion_free (FlatpakCompletion *completion);
void               flatpak_complete_context (FlatpakCompletion *completion);

G_DEFINE_AUTOPTR_CLEANUP_FUNC (FlatpakCompletion, flatpak_completion_free)

#endif /* __FLATPAK_COMPLETE_H__ */