]> git.ipfire.org Git - thirdparty/plymouth.git/blame - src/libply-splash-core/ply-boot-splash-plugin.h
two-step: Add per mode settings
[thirdparty/plymouth.git] / src / libply-splash-core / ply-boot-splash-plugin.h
CommitLineData
76a2e17c
RS
1/* ply-boot-splash-plugin.h - plugin interface for ply_boot_splash_t
2 *
3 * Copyright (C) 2007 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 * 02111-1307, USA.
19 *
20 * Written By: Ray Strode <rstrode@redhat.com>
21 */
22#ifndef PLY_BOOT_SPLASH_PLUGIN_H
23#define PLY_BOOT_SPLASH_PLUGIN_H
24
25#include <stdbool.h>
26#include <stdint.h>
27#include <unistd.h>
28
2bb73dcf 29#include "ply-buffer.h"
76a2e17c 30#include "ply-event-loop.h"
6c6ecf5e
RS
31#include "ply-keyboard.h"
32#include "ply-pixel-display.h"
33#include "ply-text-display.h"
2bb73dcf 34#include "ply-trigger.h"
6acf834f 35#include "ply-key-file.h"
76a2e17c 36
8124531e
RS
37typedef enum
38{
85704145
RS
39 PLY_BOOT_SPLASH_MODE_BOOT_UP,
40 PLY_BOOT_SPLASH_MODE_SHUTDOWN,
41 PLY_BOOT_SPLASH_MODE_UPDATES,
9bfffa92
HG
42 PLY_BOOT_SPLASH_MODE_INVALID,
43 PLY_BOOT_SPLASH_MODE_COUNT = PLY_BOOT_SPLASH_MODE_UPDATES + 1,
8124531e
RS
44} ply_boot_splash_mode_t;
45
64bff4b7 46typedef struct _ply_boot_splash_plugin ply_boot_splash_plugin_t;
76a2e17c 47
262e8b5f 48typedef struct
76a2e17c 49{
85704145
RS
50 ply_boot_splash_plugin_t * (*create_plugin)(ply_key_file_t * key_file);
51 void (*destroy_plugin)(ply_boot_splash_plugin_t *plugin);
76a2e17c 52
85704145
RS
53 void (*set_keyboard)(ply_boot_splash_plugin_t *plugin,
54 ply_keyboard_t *keyboard);
55 void (*unset_keyboard)(ply_boot_splash_plugin_t *plugin,
56 ply_keyboard_t *keyboard);
57 void (*add_pixel_display)(ply_boot_splash_plugin_t *plugin,
58 ply_pixel_display_t *display);
59 void (*remove_pixel_display)(ply_boot_splash_plugin_t *plugin,
60 ply_pixel_display_t *display);
61 void (*add_text_display)(ply_boot_splash_plugin_t *plugin,
62 ply_text_display_t *display);
63 void (*remove_text_display)(ply_boot_splash_plugin_t *plugin,
64 ply_text_display_t *display);
65 bool (*show_splash_screen)(ply_boot_splash_plugin_t *plugin,
66 ply_event_loop_t *loop,
67 ply_buffer_t *boot_buffer,
68 ply_boot_splash_mode_t mode);
69 void (*system_update)(ply_boot_splash_plugin_t *plugin,
70 int progress);
71 void (*update_status)(ply_boot_splash_plugin_t *plugin,
72 const char *status);
73 void (*on_boot_output)(ply_boot_splash_plugin_t *plugin,
74 const char *output,
75 size_t size);
76 void (*on_boot_progress)(ply_boot_splash_plugin_t *plugin,
77 double duration,
78 double percent_done);
79 void (*on_root_mounted)(ply_boot_splash_plugin_t *plugin);
80 void (*hide_splash_screen)(ply_boot_splash_plugin_t *plugin,
81 ply_event_loop_t *loop);
82 void (*display_message)(ply_boot_splash_plugin_t *plugin,
83 const char *message);
84 void (*hide_message)(ply_boot_splash_plugin_t *plugin,
85 const char *message);
86 void (*display_normal)(ply_boot_splash_plugin_t *plugin);
87 void (*display_password)(ply_boot_splash_plugin_t *plugin,
88 const char *prompt,
89 int bullets);
90 void (*display_question)(ply_boot_splash_plugin_t *plugin,
91 const char *prompt,
92 const char *entry_text);
93 void (*become_idle)(ply_boot_splash_plugin_t *plugin,
94 ply_trigger_t *idle_trigger);
76a2e17c
RS
95} ply_boot_splash_plugin_interface_t;
96
97#endif /* PLY_BOOT_SPLASH_PLUGIN_H */
98/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */