Blame clients/tui/newt/nmt-newt-listbox.h

Packit Service a1bd4f
/* SPDX-License-Identifier: GPL-2.0+ */
Packit 5756e2
/*
Packit 5756e2
 * Copyright (C) 2013 Red Hat, Inc.
Packit 5756e2
 */
Packit 5756e2
Packit 5756e2
#ifndef NMT_NEWT_LISTBOX_H
Packit 5756e2
#define NMT_NEWT_LISTBOX_H
Packit 5756e2
Packit 5756e2
#include "nmt-newt-component.h"
Packit 5756e2
Packit Service a1bd4f
#define NMT_TYPE_NEWT_LISTBOX (nmt_newt_listbox_get_type())
Packit Service a1bd4f
#define NMT_NEWT_LISTBOX(obj) \
Packit Service a1bd4f
    (G_TYPE_CHECK_INSTANCE_CAST((obj), NMT_TYPE_NEWT_LISTBOX, NmtNewtListbox))
Packit Service a1bd4f
#define NMT_NEWT_LISTBOX_CLASS(klass) \
Packit Service a1bd4f
    (G_TYPE_CHECK_CLASS_CAST((klass), NMT_TYPE_NEWT_LISTBOX, NmtNewtListboxClass))
Packit Service a1bd4f
#define NMT_IS_NEWT_LISTBOX(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), NMT_TYPE_NEWT_LISTBOX))
Packit Service a1bd4f
#define NMT_IS_NEWT_LISTBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NMT_TYPE_NEWT_LISTBOX))
Packit Service a1bd4f
#define NMT_NEWT_LISTBOX_GET_CLASS(obj) \
Packit Service a1bd4f
    (G_TYPE_INSTANCE_GET_CLASS((obj), NMT_TYPE_NEWT_LISTBOX, NmtNewtListboxClass))
Packit 5756e2
Packit 5756e2
struct _NmtNewtListbox {
Packit Service a1bd4f
    NmtNewtComponent parent;
Packit 5756e2
};
Packit 5756e2
Packit 5756e2
typedef struct {
Packit Service a1bd4f
    NmtNewtComponentClass parent;
Packit 5756e2
Packit 5756e2
} NmtNewtListboxClass;
Packit 5756e2
Packit Service a1bd4f
GType nmt_newt_listbox_get_type(void);
Packit 5756e2
Packit 5756e2
typedef enum {
Packit Service a1bd4f
    NMT_NEWT_LISTBOX_SCROLL = (1 << 0),
Packit Service a1bd4f
    NMT_NEWT_LISTBOX_BORDER = (1 << 1)
Packit 5756e2
} NmtNewtListboxFlags;
Packit 5756e2
Packit Service a1bd4f
NmtNewtWidget *nmt_newt_listbox_new(int height, NmtNewtListboxFlags flags);
Packit 5756e2
Packit Service a1bd4f
void nmt_newt_listbox_set_height(NmtNewtListbox *listbox, int height);
Packit 5756e2
Packit Service a1bd4f
void nmt_newt_listbox_append(NmtNewtListbox *listbox, const char *entry, gpointer key);
Packit Service a1bd4f
void nmt_newt_listbox_clear(NmtNewtListbox *listbox);
Packit 5756e2
Packit Service a1bd4f
void nmt_newt_listbox_set_active(NmtNewtListbox *listbox, int active);
Packit Service a1bd4f
void nmt_newt_listbox_set_active_key(NmtNewtListbox *listbox, gpointer active_key);
Packit 5756e2
Packit Service a1bd4f
int      nmt_newt_listbox_get_active(NmtNewtListbox *listbox);
Packit Service a1bd4f
gpointer nmt_newt_listbox_get_active_key(NmtNewtListbox *listbox);
Packit 5756e2
Packit 5756e2
#endif /* NMT_NEWT_LISTBOX_H */