summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_private.h
blob: 121f69e14fe28f144ef5c24e8ed20852e1e08a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef _ECORE_FB_PRIVATE_H
#define _ECORE_FB_PRIVATE_H

#include "Ecore.h"
#include "ecore_private.h"

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <termios.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/version.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include <linux/fb.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
 #define kernel_ulong_t unsigned long 
 #define BITS_PER_LONG 32
 #include <linux/input.h>
 #undef kernel_ulong_t
 #undef BITS_PER_LONG
#else
 #include <linux/input.h>
#endif

#include <signal.h>
#include <fcntl.h>
#include <errno.h>

/* ecore_fb_li.c */
struct _Ecore_Fb_Input_Device
{
	int fd;
	Ecore_Fd_Handler *handler;
	int listen;
	struct {
		Ecore_Fb_Input_Device_Cap cap;
		char *name;
		char *dev;
	} info;
	struct
	{
		/* common mouse */
		int x,y;
		int w,h;
		
		double last;
		double prev;
		double threshold;
		/* absolute axis */
		int min_w, min_h;
		double rel_w, rel_h;
		int event;
	} mouse;
	struct
	{
		int shift;
		int ctrl;
		int alt;
		int lock;
	} keyboard;
};

/* ecore_fb_ts.c */
EAPI int    ecore_fb_ts_init(void);
EAPI void   ecore_fb_ts_shutdown(void);

/* ecore_fb_vt.c */
int  ecore_fb_vt_init(void);
void ecore_fb_vt_shutdown(void);

/* hacks to stop people NEEDING #include <linux/h3600_ts.h> */
#ifndef TS_SET_CAL
#define TS_SET_CAL 0x4014660b
#endif
#ifndef TS_GET_CAL
#define TS_GET_CAL 0x8014660a
#endif
  
#endif