~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/xkb/XKBExtDev.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
fee is hereby granted, provided that the above copyright
8
8
notice appear in all copies and that both that copyright
9
9
notice and this permission notice appear in supporting
10
 
documentation, and that the name of Silicon Graphics not be 
11
 
used in advertising or publicity pertaining to distribution 
 
10
documentation, and that the name of Silicon Graphics not be
 
11
used in advertising or publicity pertaining to distribution
12
12
of the software without specific prior written permission.
13
 
Silicon Graphics makes no representation about the suitability 
 
13
Silicon Graphics makes no representation about the suitability
14
14
of this software for any purpose. It is provided "as is"
15
15
without any express or implied warranty.
16
16
 
17
 
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
18
 
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
 
17
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
 
18
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
19
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
20
 
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
21
 
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
22
 
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
 
20
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
 
21
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
22
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
23
23
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
24
24
THE USE OR PERFORMANCE OF THIS SOFTWARE.
25
25
 
176
176
XkbAction *             act;
177
177
int                     tmp;
178
178
 
179
 
    if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4)) 
 
179
    if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4))
180
180
        return BadAlloc;
181
181
 
182
182
    if ((rep->totalBtns>0)&&(rep->totalBtns!=devi->num_btns)) {
207
207
        }
208
208
    }
209
209
    tmp= _XkbFreeReadBuffer(&buf);
210
 
    if (tmp) 
 
210
    if (tmp)
211
211
        fprintf(stderr,"GetDeviceInfo! Bad length (%d extra bytes)\n",tmp);
212
212
    if (tmp || buf.error)
213
213
        return BadLength;
337
337
    xkbGetDeviceInfoReply               rep;
338
338
    Status                              status;
339
339
 
340
 
    if ((dpy->flags & XlibDisplayNoXkb) || 
 
340
    if ((dpy->flags & XlibDisplayNoXkb) ||
341
341
        (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)))
342
342
        return BadMatch;
343
343
    if (!devi)
378
378
    xkbGetDeviceInfoReply               rep;
379
379
    Status                              status;
380
380
 
381
 
    if ((dpy->flags & XlibDisplayNoXkb) || 
 
381
    if ((dpy->flags & XlibDisplayNoXkb) ||
382
382
        (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)))
383
383
        return BadMatch;
384
384
    if (((which&XkbXI_IndicatorsMask)==0)||(which&(~XkbXI_IndicatorsMask)))
399
399
        UnlockDisplay(dpy);
400
400
        SyncHandle();
401
401
        return BadLength;
402
 
    } 
 
402
    }
403
403
    devi->type= rep.devType;
404
404
    devi->supported= rep.supported;
405
405
    devi->unsupported= rep.unsupported;
759
759
    return ok;
760
760
}
761
761
 
762
 
Bool 
 
762
Bool
763
763
XkbSetDeviceLedInfo(    Display *               dpy,
764
764
                        XkbDeviceInfoPtr        devi,
765
765
                        unsigned                ledClass,
769
769
    return False;
770
770
}
771
771
 
772
 
Bool 
 
772
Bool
773
773
XkbSetDeviceButtonActions(      Display *               dpy,
774
774
                                XkbDeviceInfoPtr        devi,
775
775
                                unsigned int            first,