List Info

Thread: gii problem




gii problem
user name
2006-12-22 11:06:04
  hi:
  
   now i just install gii lib,and i run the demo which is
gii provide(inputinfo mhub ...),
it can't run correctly,
  my system is debian ,kernel 2.6
   i also write a test code
   #include <ggi/gii.h>
   #include <ggi/events.h>

    #include <stdio.h>
    #include <stdlib.h>

int main(int args,char **argv)
{
    int rc;
    rc=giiInit();
    if(rc<0)
    {
        printf("GiiInit Error");
        exit(1);
    }

    gii_input_t inp;

    inp=giiOpen("linux-evdev");
    if(!inp)
    {
        printf("can't open inp input");
        giiExit();
        exit(1);
    }

    int n;
    gii_event ev;
    for (;;) {
                struct timeval tv = { 0, 100 };
                giiEventPoll(inp, emAll, &tv);
                //n = giiEventsQueued(inp, emAll);
                //if (n == 0) break;
        //      while (n--) {
        giiEventRead(inp, &ev, emAll);
        switch(ev.any.type)
        {
        case evKeyPress:
            printf("KeyPress    ");goto showkey;

        showkey:
            printf("sym=%4d label=%4c
button=%4dn",
                   ev.key.sym,ev.key.label,ev.key.button);
            break;
        case evPtrAbsolute:
            printf("PtrAbsolute ");goto showptr;
        case evPtrRelative:
            printf("PtrRelative ");
                showptr:
            printf("mouse x=%4x y=%4x z=%4x
w=%4xn",
                  
ev.pmove.x,ev.pmove.y,ev.pmove.z,ev.pmove.wheel);
            break;
            //default:
            // printf("event:
type=%dn",ev.any.type);
            //printf("n");
        }
        //}
        }

        giiClose(inp);

        giiExit();

    return 0;
}

  and i export GII_INPUT=linux-evdev:/dev/input/event0. when
 i run it
,it can only konw key event,it can't listen the mice event
,my mice use
usb port.
  somebody can help me? 3x 

-- 

                                                           
方旭亮
 
#  
#  浙江杭州浙江大学玉泉校区1455信箱工程与科学计算中心
#  MSN:fxlzjugmail.com
#  My Blog: http://fxl.blogbus.com
#

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.php?page=join
.php&p=sourceforge&CID=DEVDEV_______________________
________________________
ggi-users mailing list
ggi-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ggi-users

gii problem
user name
2006-12-22 14:12:33
[program snippet]

> 
>   and i export GII_INPUT=linux-evdev:/dev/input/event0.
when  i run it
> ,it can only konw key event,it can't listen the mice
event ,my mice use
> usb port.
>   somebody can help me? 3x 
> 

Your fault is not in your program. You only specify one
input source
in GII_INPUT, namely your keyboard.
You can specify multiple input sources in GII_INPUT with
this
syntax:

GII_INPUT="(input-source1):(input-source2):..."

Hope that helps.


-- 
Greetings,

Christoph



------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ggi-users mailing list
ggi-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ggi-users

gii problem
user name
2006-12-23 08:13:01
 thanks,  i get it

On Fri, 22 Dec 2006 15:12:33 +0100
"Christoph Egger" <Christoph_Eggergmx.de> wrote:

> 
> [program snippet]
> 
> > 
> >   and i export
GII_INPUT=linux-evdev:/dev/input/event0. when  i run it
> > ,it can only konw key event,it can't listen the
mice event ,my mice use
> > usb port.
> >   somebody can help me? 3x 
> > 
> 
> Your fault is not in your program. You only specify one
input source
> in GII_INPUT, namely your keyboard.
> You can specify multiple input sources in GII_INPUT
with this
> syntax:
> 
>
GII_INPUT="(input-source1):(input-source2):..."
> 
> Hope that helps.
> 
> 
> -- 
> Greetings,
> 
> Christoph
> 
> 
> 
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief
surveys - and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> ggi-users mailing list
> ggi-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ggi-users


-- 

                                                           
方旭亮
 
#  
#  浙江杭州浙江大学玉泉校区1455信箱工程与科学计算中心
#  MSN:fxlzjugmail.com
#  My Blog: http://fxl.blogbus.com
#

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.php?page=join
.php&p=sourceforge&CID=DEVDEV_______________________
________________________
ggi-users mailing list
ggi-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ggi-users

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )