/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id$ * * Copyright (C) 2008 by Maurus Cuelenaere * Copyright (C) 2009 by Karl Kurbjun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ #ifndef _PLUGIN_LIB_TOUCHSCREEN_H_ #define _PLUGIN_LIB_TOUCHSCREEN_H_ #include "plugin.h" #ifdef HAVE_TOUCHSCREEN /******************************************************************************* * Touchbutton ******************************************************************************/ struct touchbutton { /* Each button has it's own viewport to define colors, drawstyle, location*/ struct viewport vp; bool repeat; /* requires the area be held for the action */ int action; /* action this button will return */ bool invisible; /* Is this an invisible button? */ char *title; /* Specify a title */ fb_data *pixmap; /* Currently unused, but will allow for a graphic */ }; /* Get: tests for a button press and returns action. */ int touchbutton_get(struct touchbutton *data, int button, int num_buttons); /* Draw: Draws all visible buttons */ void touchbutton_draw(struct touchbutton *data, int num_buttons); /******************************************************************************* * Touch mapping ******************************************************************************/ struct ts_mapping { int tl_x; /* top left */ int tl_y; int width; int height; }; struct ts_mappings { struct ts_mapping *mappings; int amount; }; unsigned int touchscreen_map(struct ts_mappings *map, int x, int y); struct ts_raster { int tl_x; /* top left */ int tl_y; int width; int height; int raster_width; int raster_height; }; struct ts_raster_result { int x; int y; }; unsigned int touchscreen_map_raster(struct ts_raster *map, int x, int y, struct ts_raster_result *result); struct ts_raster_button_mapping { struct ts_raster *raster; bool drag_drop_enable; /* ... */ bool double_click_enable; /* ... */ bool click_enable; /* ... */ bool move_progress_enable; /* ... */ bool two_d_movement_enable; /* ... */ struct ts_raster_result two_d_from; /* ... */ int _prev_x; /* Internal: DO NOT MODIFY! */ int _prev_y; /* Internal: DO NOT MODIFY! */ int _prev_btn_state; /* Internal: DO NOT MODIFY! */ }; struct ts_raster_button_result { enum{ TS_ACTION_NONE, TS_ACTION_MOVE, TS_ACTION_CLICK, TS_ACTION_DOUBLE_CLICK, TS_ACTION_DRAG_DROP, TS_ACTION_TWO_D_MOVEMENT } action; struct ts_raster_result from; struct ts_raster_result to; }; struct ts_raster_button_result touchscreen_raster_map_button(struct ts_raster_button_mapping *map, int x, int y, int button); #endif /* HAVE_TOUCHSCREEN */ #endif /* _PLUGIN_LIB_TOUCHSCREEN_H_ */ id='n21' href='#n21'>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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
/*
 * Common bit i/o utils
 * Copyright (c) 2000, 2001 Fabrice Bellard.
 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * alternative bitstream reader & writer by Michael Niedermayer <michaelni@gmx.at>
 */

/**
 * @file bitstream.c
 * bitstream api.
 */

#include "bitstream.h"
#include <codecs/lib/codeclib.h>