| 1 | /* |
| 2 | * Xephyr - A kdrive X server thats runs in a host X window. |
| 3 | * Authored by Matthew Allum <mallum@o-hand.com> |
| 4 | * |
| 5 | * Copyright © 2004 Nokia |
| 6 | * |
| 7 | * Permission to use, copy, modify, distribute, and sell this software and its |
| 8 | * documentation for any purpose is hereby granted without fee, provided that |
| 9 | * the above copyright notice appear in all copies and that both that |
| 10 | * copyright notice and this permission notice appear in supporting |
| 11 | * documentation, and that the name of Nokia not be used in |
| 12 | * advertising or publicity pertaining to distribution of the software without |
| 13 | * specific, written prior permission. Nokia makes no |
| 14 | * representations about the suitability of this software for any purpose. It |
| 15 | * is provided "as is" without express or implied warranty. |
| 16 | * |
| 17 | * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
| 18 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
| 19 | * EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
| 20 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
| 21 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 22 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 23 | * PERFORMANCE OF THIS SOFTWARE. |
| 24 | */ |
| 25 | |
| 26 | #ifdef HAVE_CONFIG_H |
| 27 | #include <kdrive-config.h> |
| 28 | #endif |
| 29 | #include "ephyr.h" |
| 30 | |
| 31 | extern void processScreenArg(const char *screen_size, char *parent_id); |
| 32 | |
| 33 | static int |
| 34 | EphyrInit(void) |
| 35 | { |
| 36 | /* |
| 37 | * make sure at least one screen |
| 38 | * has been added to the system. |
| 39 | */ |
| 40 | if (!KdCardInfoLast()) { |
| 41 | processScreenArg("640x480", NULL); |
| 42 | } |
| 43 | return hostx_init(); |
| 44 | } |
| 45 | |
| 46 | KdOsFuncs EphyrOsFuncs = { |
| 47 | .Init = EphyrInit, |
| 48 | .pollEvents = ephyrPoll, |
| 49 | }; |