summaryrefslogtreecommitdiffstats
path: root/xorg/server/module/rdpInput.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-12-11 21:55:21 -0800
committerJay Sorg <jay.sorg@gmail.com>2014-12-11 21:55:21 -0800
commit762209e0dd94a54761d4396b665352f15b3a6100 (patch)
treed3054910b5fa65d722939dd34a715f9ecb26ff9c /xorg/server/module/rdpInput.c
parent3989dfcecc02609a7586b9d51f9c30ad8b114edb (diff)
downloadxrdp-proprietary-762209e0dd94a54761d4396b665352f15b3a6100.tar.gz
xrdp-proprietary-762209e0dd94a54761d4396b665352f15b3a6100.zip
xorg: server removed and put in submodule
Diffstat (limited to 'xorg/server/module/rdpInput.c')
-rw-r--r--xorg/server/module/rdpInput.c133
1 files changed, 0 insertions, 133 deletions
diff --git a/xorg/server/module/rdpInput.c b/xorg/server/module/rdpInput.c
deleted file mode 100644
index baf1ff3c..00000000
--- a/xorg/server/module/rdpInput.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2013-2014 Jay Sorg
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* this should be before all X11 .h files */
-#include <xorg-server.h>
-#include <xorgVersion.h>
-
-/* all driver need this */
-#include <xf86.h>
-#include <xf86_OSproc.h>
-
-#include "rdp.h"
-#include "rdpDraw.h"
-#include "rdpInput.h"
-#include "rdpMisc.h"
-
-#define LOG_LEVEL 1
-#define LLOGLN(_level, _args) \
- do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-
-#define MAX_INPUT_PROC 4
-
-struct input_proc_list
-{
- int type;
- rdpInputEventProcPtr proc;
-};
-
-static struct input_proc_list g_input_proc[MAX_INPUT_PROC];
-
-/******************************************************************************/
-int
-rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc)
-{
- LLOGLN(0, ("rdpRegisterInputCallback: type %d proc %p", type, proc));
- if (type == 0)
- {
- g_input_proc[0].proc = proc;
- }
- else if (type == 1)
- {
- g_input_proc[1].proc = proc;
- }
- else
- {
- return 1;
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpUnregisterInputCallback(rdpInputEventProcPtr proc)
-{
- int index;
- char text[256];
-
- LLOGLN(0, ("rdpUnregisterInputCallback: proc %p", proc));
- for (index = 0; index < MAX_INPUT_PROC; index++)
- {
- if (g_input_proc[index].proc == proc)
- {
- if (index == 0)
- {
- /* hack to cleanup
- remove when xrdpdevTearDown is working */
- g_sprintf(text, "/tmp/.xrdp/xrdp_display_%s", display);
- LLOGLN(0, ("rdpUnregisterInputCallback: deleting file %s", text));
- unlink(text);
- }
- g_input_proc[index].proc = 0;
- return 0;
- }
- }
- return 1;
-}
-
-/******************************************************************************/
-int
-rdpInputKeyboardEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4)
-{
- if (g_input_proc[0].proc != 0)
- {
- return g_input_proc[0].proc(dev, msg, param1, param2, param3, param4);
- }
- return 0;
-}
-
-/******************************************************************************/
-int
-rdpInputMouseEvent(rdpPtr dev, int msg,
- long param1, long param2,
- long param3, long param4)
-{
- if (g_input_proc[1].proc != 0)
- {
- return g_input_proc[1].proc(dev, msg, param1, param2, param3, param4);
- }
- return 0;
-}
-
-/******************************************************************************/
-/* called when module loads */
-int
-rdpInputInit(void)
-{
- g_memset(g_input_proc, 0, sizeof(g_input_proc));
- return 0;
-}