The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/fb/splashreg.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer as
   10  *    the first lines of this file unmodified.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   25  *
   26  * $FreeBSD: releng/5.0/sys/dev/fb/splashreg.h 59754 2000-04-29 13:33:18Z peter $
   27  */
   28 
   29 #ifndef _DEV_FB_SPLASHREG_H_
   30 #define _DEV_FB_SPLASHREG_H_
   31 
   32 #define SPLASH_IMAGE    "splash_image_data"
   33 
   34 struct video_adapter;
   35 
   36 struct image_decoder {
   37         char            *name;
   38         int             (*init)(struct video_adapter *adp);
   39         int             (*term)(struct video_adapter *adp);
   40         int             (*splash)(struct video_adapter *adp, int on);
   41         char            *data_type;
   42         void            *data;
   43         size_t          data_size;
   44 };
   45 
   46 typedef struct image_decoder    splash_decoder_t;
   47 typedef struct image_decoder    scrn_saver_t;
   48 
   49 #define SPLASH_DECODER(name, sw)                                \
   50         static int name##_modevent(module_t mod, int type, void *data) \
   51         {                                                       \
   52                 switch ((modeventtype_t)type) {                 \
   53                 case MOD_LOAD:                                  \
   54                         return splash_register(&sw);            \
   55                 case MOD_UNLOAD:                                \
   56                         return splash_unregister(&sw);          \
   57                 default:                                        \
   58                         break;                                  \
   59                 }                                               \
   60                 return 0;                                       \
   61         }                                                       \
   62         static moduledata_t name##_mod = {                      \
   63                 #name,                                          \
   64                 name##_modevent,                                \
   65                 NULL                                            \
   66         };                                                      \
   67         DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY); \
   68         MODULE_DEPEND(name, splash, 1, 1, 1)
   69 
   70 #define SAVER_MODULE(name, sw)                                  \
   71         static int name##_modevent(module_t mod, int type, void *data) \
   72         {                                                       \
   73                 switch ((modeventtype_t)type) {                 \
   74                 case MOD_LOAD:                                  \
   75                         return splash_register(&sw);            \
   76                 case MOD_UNLOAD:                                \
   77                         return splash_unregister(&sw);          \
   78                 default:                                        \
   79                         break;                                  \
   80                 }                                               \
   81                 return 0;                                       \
   82         }                                                       \
   83         static moduledata_t name##_mod = {                      \
   84                 #name,                                          \
   85                 name##_modevent,                                \
   86                 NULL                                            \
   87         };                                                      \
   88         DECLARE_MODULE(name, name##_mod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE); \
   89         MODULE_DEPEND(name, splash, 1, 1, 1)
   90 
   91 /* entry point for the splash image decoder */
   92 int     splash_register(splash_decoder_t *decoder);
   93 int     splash_unregister(splash_decoder_t *decoder);
   94 
   95 /* entry points for the console driver */
   96 int     splash_init(video_adapter_t *adp, int (*callback)(int, void *),
   97                     void *arg);
   98 int     splash_term(video_adapter_t *adp);
   99 int     splash(video_adapter_t *adp, int on);
  100 
  101 /* event types for the callback function */
  102 #define SPLASH_INIT     0
  103 #define SPLASH_TERM     1
  104 
  105 #endif /* _DEV_FB_SPLASHREG_H_ */

Cache object: 5545935b2bded968c04b5f937e75ecc3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.