summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-02-08 17:50:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-02-08 17:50:15 +0000
commit092a51022843b9217bbbe8cbd2affc312450523e (patch)
tree9ae8eec1552f3d5c9ebfacf89c72db4c1d6907d8 /perl-install/c
parent5f68450cc9d2f7c543a5d3cd5b8351a83ddffb4b (diff)
downloaddrakx-092a51022843b9217bbbe8cbd2affc312450523e.tar
drakx-092a51022843b9217bbbe8cbd2affc312450523e.tar.gz
drakx-092a51022843b9217bbbe8cbd2affc312450523e.tar.bz2
drakx-092a51022843b9217bbbe8cbd2affc312450523e.tar.xz
drakx-092a51022843b9217bbbe8cbd2affc312450523e.zip
move Xtest() and setMouseLive() out of c/stuff to xf86misc::main
so that we can use them (esp. setMouseLive) in standalone without making drakxtools-newt require xfree libs
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/stuff.xs.pl69
1 files changed, 0 insertions, 69 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl
index 40cec2b84..fd91dc768 100644
--- a/perl-install/c/stuff.xs.pl
+++ b/perl-install/c/stuff.xs.pl
@@ -52,16 +52,12 @@ typedef __uint8_t u8;
#include <linux/hiddev.h>
#include <libldetect.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/xf86misc.h>
#include <langinfo.h>
#include <string.h>
#include <iconv.h>
#include <libintl.h>
-#include <term.h>
-#undef max_colors
#define SECTORSIZE 512
@@ -97,21 +93,6 @@ void rpmError_callback(void) {
$ENV{C_DRAKX} and print '
-void initIMPS2() {
- unsigned char imps2_s1[] = { 243, 200, 243, 100, 243, 80, };
- unsigned char imps2_s2[] = { 246, 230, 244, 243, 100, 232, 3, };
-
- int fd = open("/dev/mouse", O_WRONLY);
- if (fd < 0) return;
-
- write (fd, imps2_s1, sizeof (imps2_s1));
- usleep (30000);
- write (fd, imps2_s2, sizeof (imps2_s2));
- usleep (30000);
- tcflush (fd, TCIFLUSH);
- tcdrain(fd);
-}
-
void log_message(const char * s, ...) {
va_list args;
va_list args_copy;
@@ -172,56 +153,6 @@ char *
pcmcia_probe()
';
-$ENV{C_DRAKX} and print '
-
-int
-Xtest(display)
- char *display
- CODE:
- int pid;
- if ((pid = fork()) == 0) {
- Display *d = XOpenDisplay(display);
- if (d) {
- int child;
- /* keep a client until some window is created, otherwise X server blinks to hell */
- if ((child = fork()) == 0) {
- XEvent event;
- XSelectInput(d, DefaultRootWindow(d), SubstructureNotifyMask);
- do {
- XNextEvent(d, &event);
- } while (event.type != CreateNotify);
- XCloseDisplay(d);
- exit(0);
- }
- }
- _exit(d != NULL);
- }
- waitpid(pid, &RETVAL, 0);
- OUTPUT:
- RETVAL
-
-void
-setMouseLive(display, type, emulate3buttons)
- char *display
- int type
- int emulate3buttons
- CODE:
- {
- XF86MiscMouseSettings mseinfo;
- Display *d = XOpenDisplay(display);
- if (d) {
- if (XF86MiscGetMouseSettings(d, &mseinfo) == True) {
- mseinfo.type = type;
- mseinfo.flags |= MF_REOPEN;
- mseinfo.emulate3buttons = emulate3buttons;
- XF86MiscSetMouseSettings(d, &mseinfo);
- XFlush(d);
- if (type == MTYPE_IMPS2) initIMPS2();
- }
- }
- }
-';
-
print '
char *
dgettext(domainname, msgid)