1706f2543Smrg/*
2706f2543Smrg * Xephyr - A kdrive X server thats runs in a host X window.
3706f2543Smrg *          Authored by Matthew Allum <mallum@o-hand.com>
4706f2543Smrg *
5706f2543Smrg * Copyright � 2004 Nokia
6706f2543Smrg *
7706f2543Smrg * Permission to use, copy, modify, distribute, and sell this software and its
8706f2543Smrg * documentation for any purpose is hereby granted without fee, provided that
9706f2543Smrg * the above copyright notice appear in all copies and that both that
10706f2543Smrg * copyright notice and this permission notice appear in supporting
11706f2543Smrg * documentation, and that the name of Nokia not be used in
12706f2543Smrg * advertising or publicity pertaining to distribution of the software without
13706f2543Smrg * specific, written prior permission. Nokia makes no
14706f2543Smrg * representations about the suitability of this software for any purpose.  It
15706f2543Smrg * is provided "as is" without express or implied warranty.
16706f2543Smrg *
17706f2543Smrg * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18706f2543Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19706f2543Smrg * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20706f2543Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21706f2543Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22706f2543Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23706f2543Smrg * PERFORMANCE OF THIS SOFTWARE.
24706f2543Smrg */
25706f2543Smrg
26706f2543Smrg#ifdef HAVE_CONFIG_H
27706f2543Smrg#include <kdrive-config.h>
28706f2543Smrg#endif
29706f2543Smrg#include "ephyr.h"
30706f2543Smrg
31706f2543Smrgextern void processScreenArg (char *screen_size, char *parent_id) ;
32706f2543Smrg
33706f2543Smrgstatic int
34706f2543SmrgEphyrInit (void)
35706f2543Smrg{
36706f2543Smrg  /*
37706f2543Smrg   * make sure at least one screen
38706f2543Smrg   * has been added to the system.
39706f2543Smrg   */
40706f2543Smrg  if (!KdCardInfoLast ())
41706f2543Smrg    {
42706f2543Smrg        processScreenArg ("640x480", NULL) ;
43706f2543Smrg    }
44706f2543Smrg  return hostx_init();
45706f2543Smrg}
46706f2543Smrg
47706f2543SmrgKdOsFuncs   EphyrOsFuncs = {
48706f2543Smrg    .Init = EphyrInit,
49706f2543Smrg    .pollEvents = ephyrPoll,
50706f2543Smrg};
51706f2543Smrg
52