| 1 | /* Copyright 2000 Kjetil S. Matheussen |
| 2 | |
| 3 | This program is free software; you can redistribute it and/or |
| 4 | modify it under the terms of the GNU General Public License |
| 5 | as published by the Free Software Foundation; either version 2 |
| 6 | of the License, or (at your option) any later version. |
| 7 | |
| 8 | This program is distributed in the hope that it will be useful, |
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License |
| 14 | along with this program; if not, write to the Free Software |
| 15 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
| 16 | |
| 17 | #ifndef RADIUM_VISUAL_PROC_H |
| 18 | #define RADIUM_VISUAL_PROC_H |
| 19 | |
| 20 | #include "OS_visual_input.h" |
| 21 | |
| 22 | #define TEXT_IGNORE_WIDTH -99999 // Can be used instead of width, not a flag |
| 23 | // flags: |
| 24 | #define TEXT_NOFLAGS 0 |
| 25 | #define TEXT_CLEAR 1 |
| 26 | #define TEXT_INVERT 2 |
| 27 | #define TEXT_CENTER 4 |
| 28 | #define TEXT_CLIPRECT 8 |
| 29 | #define TEXT_NOTEXT 16 |
| 30 | #define TEXT_BOLD 32 |
| 31 | #define TEXT_SCALE 64 // Scales the text into the box. |
| 32 | |
| 33 | extern LANGSPEC int GFX_Message(vector_t *buttons,const char *fmt,...); |
| 34 | |
| 35 | extern LANGSPEC void GFX_AddMenuItem(struct Tracker_Windows *tvisual, const char *name, const char *python_command); |
| 36 | extern LANGSPEC void GFX_AddCheckableMenuItem(struct Tracker_Windows *tvisual, const char *name, const char *python_command, int checkval); |
| 37 | extern LANGSPEC void GFX_AddMenuSeparator(struct Tracker_Windows *tvisual); |
| 38 | extern LANGSPEC void GFX_AddMenuMenu(struct Tracker_Windows *tvisual, const char *name, const char *command); |
| 39 | extern LANGSPEC void GFX_GoPreviousMenuLevel(struct Tracker_Windows *tvisual); |
| 40 | |
| 41 | |
| 42 | extern LANGSPEC void QUEUE_GFX_C2V_bitBlt( |
| 43 | struct Tracker_Windows *window, |
| 44 | int from_x1,int from_x2, |
| 45 | int to_y |
| 46 | ); |
| 47 | |
| 48 | |
| 49 | /* window,x1,x2,x3,x4,height, y pixmap */ |
| 50 | extern LANGSPEC void QUEUE_GFX_C_DrawCursor( |
| 51 | struct Tracker_Windows *window, |
| 52 | int x1,int x2,int x3,int x4,int height, |
| 53 | int y_pixmap |
| 54 | ); |
| 55 | |
| 56 | extern LANGSPEC void QUEUE_GFX_P2V_bitBlt( |
| 57 | struct Tracker_Windows *window, |
| 58 | int from_x,int from_y, |
| 59 | int to_x,int to_y, |
| 60 | int width,int height |
| 61 | ); |
| 62 | |
| 63 | extern LANGSPEC void QUEUE_GFX_P_FilledBox(struct Tracker_Windows *tvisual,int color,int x,int y,int x2,int y2); |
| 64 | |
| 65 | extern LANGSPEC void GFX_disable_mouse_keyboard(void); |
| 66 | extern LANGSPEC void GFX_enable_mouse_keyboard(void); |
| 67 | |
| 68 | extern LANGSPEC int GFX_CreateVisual(struct Tracker_Windows *tvisual); |
| 69 | extern LANGSPEC int GFX_ShutDownVisual(struct Tracker_Windows *tvisual); |
| 70 | extern LANGSPEC void GFX_SetMinimumWindowWidth(struct Tracker_Windows *tvisual, int width); |
| 71 | |
| 72 | extern LANGSPEC void GFX_EditorWindowToFront(struct Tracker_Windows *tvisual); |
| 73 | extern LANGSPEC void GFX_PlayListWindowToFront(void); |
| 74 | extern LANGSPEC void GFX_PlayListWindowToBack(void); |
| 75 | extern LANGSPEC void GFX_InstrumentWindowToFront(void); |
| 76 | extern LANGSPEC void GFX_InstrumentWindowToBack(void); |
| 77 | extern LANGSPEC void GFX_HelpWindowToFront(void); |
| 78 | |
| 79 | extern LANGSPEC void GFX_toggleFullScreen(struct Tracker_Windows *tvisual); |
| 80 | extern LANGSPEC void GFX_showHideInstrumentWidget(struct Tracker_Windows *window); |
| 81 | extern LANGSPEC void GFX_showHidePlaylist(struct Tracker_Windows *window); |
| 82 | extern LANGSPEC void GFX_showHideEditor(void); |
| 83 | extern LANGSPEC void GFX_showHideMixerWidget(void); |
| 84 | |
| 85 | extern LANGSPEC void GFX_SetMinimalInstrumentWindow(void); |
| 86 | |
| 87 | extern LANGSPEC bool GFX_EditorIsVisible(void); |
| 88 | extern LANGSPEC void GFX_ShowEditor(void); |
| 89 | extern LANGSPEC void GFX_HideEditor(void); |
| 90 | |
| 91 | extern LANGSPEC bool GFX_MixerIsVisible(void); |
| 92 | extern LANGSPEC void GFX_ShowMixer(void); |
| 93 | extern LANGSPEC void GFX_HideMixer(void); |
| 94 | |
| 95 | extern LANGSPEC bool GFX_InstrumentWindowIsVisible(void); |
| 96 | |
| 97 | extern LANGSPEC void GFX_MaximizeEditorWindow(struct Tracker_Windows *tvisual); |
| 98 | extern LANGSPEC void GFX_MinimizeEditorWindow(struct Tracker_Windows *tvisual); |
| 99 | |
| 100 | extern LANGSPEC void GFX_ConfigColors(struct Tracker_Windows *tvisual); |
| 101 | extern LANGSPEC void GFX_ConfigFonts(struct Tracker_Windows *tvisual); |
| 102 | |
| 103 | extern LANGSPEC void GFX_SetDefaultColors(struct Tracker_Windows *tvisual); |
| 104 | |
| 105 | |
| 106 | //bool GFX_SelectEditFont(struct Tracker_Windows *tvisual){ |
| 107 | |
| 108 | extern LANGSPEC void QUEUE_GFX_FilledBox(struct Tracker_Windows *tvisual,int color,int x,int y,int x2,int y2, int where); |
| 109 | |
| 110 | extern LANGSPEC void QUEUE_GFX_Box(struct Tracker_Windows *tvisual,int color,int x,int y,int x2,int y2, int where); |
| 111 | |
| 112 | extern LANGSPEC void QUEUE_GFX_SetClipRect( |
| 113 | struct Tracker_Windows *tvisual, |
| 114 | int x,int y, |
| 115 | int x2,int y2, |
| 116 | int where |
| 117 | ); |
| 118 | extern LANGSPEC void QUEUE_GFX_CancelClipRect(struct Tracker_Windows *tvisual, int where); |
| 119 | |
| 120 | extern LANGSPEC void PREOS_GFX_Line(struct Tracker_Windows *window,int color,int x,int y,int x2,int y2,int where); |
| 121 | extern LANGSPEC void QUEUE_GFX_Line(struct Tracker_Windows *tvisual,int color,int x,int y,int x2,int y2,int where); |
| 122 | |
| 123 | extern LANGSPEC void GFX_Point(struct Tracker_Windows *tvisual,int color,int brightness,int x,int y,int where); // brigtness is between 0 and MAX_BRIGHTNESS. Used by aa lines. |
| 124 | extern LANGSPEC void QUEUE_GFX_Point(struct Tracker_Windows* tvisual,int color,int brightness,int x,int y,int where); |
| 125 | extern LANGSPEC void QUEUE_GFX_Points(struct Tracker_Windows* tvisual,int color,int brightness,int num_points, uint16_t *x,uint16_t *y,int where); |
| 126 | extern LANGSPEC void OS_GFX_Point( |
| 127 | struct Tracker_Windows *tvisual, |
| 128 | int color, |
| 129 | int brightness, |
| 130 | int x,int y, |
| 131 | int where |
| 132 | ); |
| 133 | extern LANGSPEC void OS_GFX_Points( |
| 134 | struct Tracker_Windows *tvisual, |
| 135 | int color, |
| 136 | int brightness, |
| 137 | int num_points, |
| 138 | uint16_t *x,uint16_t *y, |
| 139 | int where |
| 140 | ); |
| 141 | |
| 142 | extern LANGSPEC void OS_GFX_SetMixColor(struct Tracker_Windows *tvisual,int color1,int color2,int mix_factor); |
| 143 | extern LANGSPEC void QUEUE_GFX_SetMixColor(struct Tracker_Windows *tvisual,int color1,int color2,int mix_factor); |
| 144 | |
| 145 | extern LANGSPEC void OS_GFX_Polygon( |
| 146 | struct Tracker_Windows *tvisual, |
| 147 | int color, |
| 148 | int x1, int y1, int x2, int y2, |
| 149 | int num_points, |
| 150 | struct APoint *peaks, |
| 151 | int where |
| 152 | ); |
| 153 | |
| 154 | extern LANGSPEC void OS_GFX_Polyline( |
| 155 | struct Tracker_Windows *tvisual, |
| 156 | int color, |
| 157 | int x1, int y1, int x2, int y2, |
| 158 | int num_points, |
| 159 | struct APoint *peaks, |
| 160 | int where |
| 161 | ); |
| 162 | |
| 163 | extern LANGSPEC void QUEUE_GFX_Polygon( |
| 164 | struct Tracker_Windows *tvisual, |
| 165 | int color, |
| 166 | int x1, int y1, int x2, int y2, |
| 167 | int num_points, |
| 168 | struct APoint *peaks, |
| 169 | int where |
| 170 | ); |
| 171 | |
| 172 | extern LANGSPEC void QUEUE_GFX_Polyline( |
| 173 | struct Tracker_Windows *tvisual, |
| 174 | int color, |
| 175 | int x1, int y1, int x2, int y2, |
| 176 | int num_points, |
| 177 | struct APoint *peaks, |
| 178 | int where |
| 179 | ); |
| 180 | |
| 181 | extern LANGSPEC int GFX_get_text_width(struct Tracker_Windows *tvisual, const char *text); |
| 182 | extern LANGSPEC int GFX_get_num_characters(struct Tracker_Windows *tvisual, const char *text, int max_width); |
| 183 | |
| 184 | extern LANGSPEC void PREOS_GFX_Text( |
| 185 | struct Tracker_Windows *tvisual, |
| 186 | int color, |
| 187 | const char *text, |
| 188 | int x, |
| 189 | int y, |
| 190 | int width, |
| 191 | int flags, |
| 192 | int where |
| 193 | ); |
| 194 | extern LANGSPEC void QUEUE_GFX_Text( |
| 195 | struct Tracker_Windows *tvisual, |
| 196 | int color, |
| 197 | const char *text, |
| 198 | int x, |
| 199 | int y, |
| 200 | int width, |
| 201 | int flags, |
| 202 | int where |
| 203 | ); |
| 204 | |
| 205 | extern LANGSPEC void GFX_DrawTrackBorderSingle( |
| 206 | struct Tracker_Windows *tvisual, |
| 207 | int x, int y, int y2, |
| 208 | int where |
| 209 | ); |
| 210 | |
| 211 | extern LANGSPEC void GFX_DrawTrackBorderDouble( |
| 212 | struct Tracker_Windows *tvisual, |
| 213 | int x, int y, int y2, |
| 214 | int where |
| 215 | ); |
| 216 | |
| 217 | extern LANGSPEC void QUEUE_GFX_BitBlt( |
| 218 | struct Tracker_Windows *tvisual, |
| 219 | int dx,int dy, |
| 220 | int x,int y, |
| 221 | int x2,int y2 |
| 222 | ); |
| 223 | |
| 224 | extern LANGSPEC int GFX_ResizeWindow(struct Tracker_Windows *tvisual,int x,int y); |
| 225 | |
| 226 | |
| 227 | |
| 228 | void GFXS_LineType( |
| 229 | void (*GFX_OSFunc)( |
| 230 | struct Tracker_Windows *window, |
| 231 | int color, |
| 232 | int x,int y,int x2,int y2, |
| 233 | int where |
| 234 | ), |
| 235 | struct Tracker_Windows *window, |
| 236 | int color, |
| 237 | int x,int y,int x2,int y2, |
| 238 | int where |
| 239 | ); |
| 240 | void GFXS_BoxType( |
| 241 | void (*GFX_OSFunc)( |
| 242 | struct Tracker_Windows *window, |
| 243 | int color, |
| 244 | int x,int y,int x2,int y2, |
| 245 | int where |
| 246 | ), |
| 247 | struct Tracker_Windows *window, |
| 248 | int color, |
| 249 | int x,int y,int x2,int y2, |
| 250 | int where |
| 251 | ); |
| 252 | |
| 253 | void GFXS_TextType( |
| 254 | void (*GFX_OSFunc)( |
| 255 | struct Tracker_Windows *window, |
| 256 | int color,const char *text, |
| 257 | int x,int y, |
| 258 | int width, |
| 259 | int flags, |
| 260 | int where |
| 261 | ), |
| 262 | struct Tracker_Windows *window, |
| 263 | int color,const char *text, |
| 264 | int x,int y, |
| 265 | int width, |
| 266 | int flags, |
| 267 | int where |
| 268 | ); |
| 269 | |
| 270 | void GFXS_BorderType( |
| 271 | void (*GFX_P_OSFunc)( |
| 272 | struct Tracker_Windows *tvisual, |
| 273 | int x, int y, int y2, |
| 274 | int where |
| 275 | ), |
| 276 | struct Tracker_Windows *tvisual, |
| 277 | int x, int y, int y2, |
| 278 | int where |
| 279 | ); |
| 280 | |
| 281 | void GFXS_BorderType2( |
| 282 | void (*GFX_P_OSFunc)( |
| 283 | struct Tracker_Windows *tvisual, |
| 284 | int x, int y, int y2, |
| 285 | int where |
| 286 | ), |
| 287 | struct Tracker_Windows *tvisual, |
| 288 | int x, int y, int y2, |
| 289 | int where |
| 290 | ); |
| 291 | |
| 292 | void GFXS_BitBltType( |
| 293 | void (*GFX_P_OSFunc)( |
| 294 | struct Tracker_Windows *tvisual, |
| 295 | int dx,int dy, |
| 296 | int x,int y, |
| 297 | int x2,int y2 |
| 298 | ), |
| 299 | struct Tracker_Windows *tvisual, |
| 300 | int dx,int dy, |
| 301 | int x,int y, |
| 302 | int x2,int y2 |
| 303 | ); |
| 304 | |
| 305 | void GFXST_LineType( |
| 306 | void (*GFX_OSFunc)( |
| 307 | struct Tracker_Windows *window, |
| 308 | int color, |
| 309 | int x,int y,int x2,int y2, |
| 310 | int where |
| 311 | ), |
| 312 | struct Tracker_Windows *window, |
| 313 | int color, |
| 314 | int x,int y,int x2,int y2, |
| 315 | int where |
| 316 | ); |
| 317 | |
| 318 | void GFXST_BoxType( |
| 319 | void (*GFX_OSFunc)( |
| 320 | struct Tracker_Windows *window, |
| 321 | int color, |
| 322 | int x,int y,int x2,int y2, |
| 323 | int where |
| 324 | ), |
| 325 | struct Tracker_Windows *window, |
| 326 | int color, |
| 327 | int x,int y,int x2,int y2, |
| 328 | int where |
| 329 | ); |
| 330 | void GFXST_TextType( |
| 331 | void (*GFX_OSFunc)( |
| 332 | struct Tracker_Windows *window, |
| 333 | int color,const char *text, |
| 334 | int x,int y, |
| 335 | int width, |
| 336 | int flags, |
| 337 | int where |
| 338 | ), |
| 339 | struct Tracker_Windows *window, |
| 340 | int color,const char *text, |
| 341 | int x,int y, |
| 342 | int width, |
| 343 | int flags, |
| 344 | int where |
| 345 | ); |
| 346 | void GFXST_BorderType( |
| 347 | void (*GFX_P_OSFunc)( |
| 348 | struct Tracker_Windows *window, |
| 349 | int x, int y, int y2, |
| 350 | int where |
| 351 | ), |
| 352 | struct Tracker_Windows *window, |
| 353 | int x, int y, int y2, |
| 354 | int where |
| 355 | ); |
| 356 | void GFXST_BorderType2( |
| 357 | void (*GFX_P_OSFunc)( |
| 358 | struct Tracker_Windows *window, |
| 359 | int x, int y, int y2, |
| 360 | int where |
| 361 | ), |
| 362 | struct Tracker_Windows *window, |
| 363 | int x, int y, int y2, |
| 364 | int where |
| 365 | ); |
| 366 | |
| 367 | #ifndef GFX_DONTSHRINK |
| 368 | |
| 369 | #define GFX_FilledBox(a,b,c,d,e,f,g) GFXS_BoxType(QUEUE_GFX_FilledBox,a,b,c,d,e,f,g) |
| 370 | #define GFX_Box(a,b,c,d,e,f,g) GFXS_BoxType(QUEUE_GFX_Box,a,b,c,d,e,f,g) |
| 371 | #define GFX_Line(a,b,c,d,e,f,g) GFXS_LineType(QUEUE_GFX_Line,a,b,c,d,e,f,g) |
| 372 | |
| 373 | #define GFX_Text(a,b,c,d,e,f,g,h) GFXS_TextType(QUEUE_GFX_Text,a,b,c,d,e,f,g,h) |
| 374 | |
| 375 | #define GFX_DrawTrackBorderSingle(a,b,c,d,e) GFXS_BorderType(GFX_DrawTrackBorderSingle,a,b,c,d,e) |
| 376 | #define GFX_DrawTrackBorderDouble(a,b,c,d,e) GFXS_BorderType2(GFX_DrawTrackBorderDouble,a,b,c,d,e) |
| 377 | |
| 378 | #define GFX_BitBlt(a,b,c,d,e,f,g) GFXS_BitBltType(QUEUE_GFX_BitBlt,a,b,c,d,e,f,g) |
| 379 | |
| 380 | #define GFX_T_FilledBox(a,b,c,d,e,f,g) GFXST_BoxType(QUEUE_GFX_FilledBox,a,b,c,d,e,f,g) |
| 381 | #define GFX_T_Box(a,b,c,d,e,f,g) GFXST_BoxType(QUEUE_GFX_Box,a,b,c,d,e,f,g) |
| 382 | #define GFX_T_Line(a,b,c,d,e,f,g) GFXST_LineType(QUEUE_GFX_Line,a,b,c,d,e,f,g) |
| 383 | |
| 384 | #define GFX_T_Text(a,b,c,d,e,f,g,h) GFXST_TextType(QUEUE_GFX_Text,a,b,c,d,e,f,g,h) |
| 385 | |
| 386 | #define GFX_T_DrawTrackBorderSingle(a,b,c,d,e) GFXST_BorderType(GFX_DrawTrackBorderSingle,a,b,c,d,e) |
| 387 | #define GFX_T_DrawTrackBorderDouble(a,b,c,d,e) GFXST_BorderType2(GFX_DrawTrackBorderDouble,a,b,c,d,e) |
| 388 | |
| 389 | #define GFX_SetMixColor QUEUE_GFX_SetMixColor |
| 390 | |
| 391 | #define GFX_Polygon QUEUE_GFX_Polygon |
| 392 | #define GFX_Polyline QUEUE_GFX_Polyline |
| 393 | |
| 394 | #define GFX_SetClipRect QUEUE_GFX_SetClipRect |
| 395 | #define GFX_CancelClipRect QUEUE_GFX_CancelClipRect |
| 396 | |
| 397 | #endif |
| 398 | |
| 399 | #endif |
| 400 |