~ubuntu-branches/debian/stretch/bristol/stretch

« back to all changes in this revision

Viewing changes to libbrighton/brightonScale.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-23 09:49:32 UTC
  • mfrom: (1.2.1 upstream) (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100423094932-btfvxmt11hv8dj4p
Tags: 0.60.0-4
* Switch back to deb format 1.0, bug#578693 has been fixed.
* Refresh and improvements, another attempt to fix FTBFS on
  hppa,sparc,s390.
* Drop debian/patches/02-implicit_pointer_conversion.patch patch,
  applied upstream.
* Patch to fix FTBFS on hurd-i386.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
3
 *  Diverse Bristol audio routines.
4
 
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2009
 
4
 *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2010
5
5
 *
6
6
 *
7
7
 *   This program is free software; you can redistribute it and/or modify
8
8
 *   it under the terms of the GNU General Public License as published by
9
 
 *   the Free Software Foundation; either version 2 of the License, or
 
9
 *   the Free Software Foundation; either version 3 of the License, or
10
10
 *   (at your option) any later version.
11
11
 *
12
12
 *   This program is distributed in the hope that it will be useful,
15
15
 *   GNU General Public License for more details.
16
16
 *
17
17
 *   You should have received a copy of the GNU General Public License
18
 
 *   along with this program; if not, write to the Free Software
19
 
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
 *   along with this program; if not, see <http://www.gnu.org/licenses/>.
20
19
 *
21
20
 */
22
21
/*
27
26
 
28
27
#include "brightoninternals.h"
29
28
 
30
 
extern int brightonRegisterController();
31
 
 
32
29
int
33
30
destroyScale(brightonDevice *dev)
34
31
{
117
114
                         */
118
115
                        brightonFinalRender(dev->bwin,
119
116
                                dev->x + dev->lastposition
120
 
                                        + dev->bwin->app->resources[dev->panel].sx - 5,
 
117
                                        + dev->bwin->app->resources[dev->panel].sx - 7,
121
118
                                dev->y + dev->bwin->app->resources[dev->panel].sy,
122
119
                                dev->position - dev->lastposition + (dev->width >> 2) + 5,
123
 
                                dev->height + 7);
 
120
                                dev->height + 9);
124
121
                } else {
125
122
                        brightonFinalRender(dev->bwin,
126
123
                                dev->x + dev->position
135
132
                        brightonDevUndraw(dev->bwin, dev->bwin->dlayer,
136
133
                                dev->x + dev->bwin->app->resources[dev->panel].sx,
137
134
                                dev->y + ((int) dev->lastposition)
138
 
                                        + dev->bwin->app->resources[dev->panel].sy,
139
 
                                dev->width, dev->height / 4);
 
135
                                        + dev->bwin->app->resources[dev->panel].sy - 1,
 
136
                                dev->width, dev->height / 4 + 1);
140
137
                        brightonRenderShadow(dev, 1);
141
138
                }
142
139
 
403
400
                                                dev->value -= ((float) 1) / 16384;
404
401
                                }
405
402
                                break;
 
403
                        case 0xff51:
 
404
                                if (dev->bwin->app->resources[dev->panel].devlocn[dev->index].flags & BRIGHTON_VERTICAL)
 
405
                                {
 
406
                                        if (dev->flags & BRIGHTON_SHIFTKEY)
 
407
                                                dev->value -= ((float) 2048) / 16384;
 
408
                                        else
 
409
                                                dev->value -= ((float) 32) / 16384;
 
410
                                } else {
 
411
                                        if (dev->flags & BRIGHTON_SHIFTKEY)
 
412
                                                dev->value += ((float) 2048) / 16384;
 
413
                                        else
 
414
                                                dev->value += ((float) 32) / 16384;
 
415
                                }
 
416
                                break;
 
417
                        case 0xff53:
 
418
                                /*if (dev->flags & BRIGHTON_VERTICAL) */
 
419
                                if (dev->bwin->app->resources[dev->panel].devlocn[dev->index].flags & BRIGHTON_VERTICAL)
 
420
                                {
 
421
                                        if (dev->flags & BRIGHTON_SHIFTKEY)
 
422
                                                dev->value += ((float) 2048) / 16384;
 
423
                                        else
 
424
                                                dev->value += ((float) 32) / 16384;
 
425
                                } else {
 
426
                                        if (dev->flags & BRIGHTON_SHIFTKEY)
 
427
                                                dev->value -= ((float) 2048) / 16384;
 
428
                                        else
 
429
                                                dev->value -= ((float) 32) / 16384;
 
430
                                }
 
431
                                break;
406
432
                }
407
433
 
408
434
                considercallback(dev);