~motumedia/xine-ui/ubuntu

« back to all changes in this revision

Viewing changes to src/aaui/main.c

  • Committer: Reinhard Tartler
  • Date: 2007-01-30 10:33:18 UTC
  • mfrom: (2541.1.34 xine-ui.0.99.4+cvs)
  • Revision ID: siretart@tauware.de-20070130103318-evmro8n4ydtj3cwb
merge debian changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * along with this program; if not, write to the Free Software
18
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
19
19
 *
20
 
 * $Id: main.c,v 1.58 2004/12/12 21:57:10 mroi Exp $
 
20
 * $Id: main.c,v 1.59 2006/09/14 01:20:30 dgp85 Exp $
21
21
 *
22
22
 * xine main for aalib and caca
23
23
 *
64
64
 
65
65
#ifdef CACA
66
66
#  include <caca.h>
 
67
#  include <cucul.h>
67
68
#endif
68
69
 
69
70
/* Sound mixer capabilities */
88
89
#ifdef AA
89
90
  aa_context          *context;
90
91
#endif
 
92
#ifdef CACA
 
93
  cucul_canvas_t      *canvas;
 
94
  caca_display_t      *display;
 
95
#endif
91
96
  char                *mrl[1024];
92
97
  int                  num_mrls;
93
98
  int                  current_mrl;
583
588
#endif
584
589
 
585
590
#ifdef CACA
586
 
  unsigned int key;
 
591
  caca_event_t ev;
587
592
 
588
 
  key = CACA_EVENT_NONE;
589
 
  while (((key = caca_get_event(CACA_EVENT_KEY_PRESS)) == CACA_EVENT_NONE) && aaxine.running)
590
 
    usleep(50000);
 
593
  while ( !caca_get_event(aaxine.display, CACA_EVENT_KEY_PRESS, &ev, 50000) && aaxine.running ) ;
591
594
 
592
595
  if (!aaxine.running) return 0;
593
 
  return key & ~CACA_EVENT_ANY;
 
596
  return ev.data.key.ch;
594
597
#endif
595
598
}
596
599
 
804
807
                                          video_driver_id,
805
808
                                          XINE_VISUAL_TYPE_CACA,
806
809
                                          NULL);
 
810
  aaxine.canvas = cucul_create_canvas(0, 0);
 
811
  aaxine.display = caca_create_display(aaxine.canvas);
807
812
#endif
808
813
 
809
814
  if (!aaxine.vo_port) {
1108
1113
    aa_close(aaxine.context);
1109
1114
  }
1110
1115
#endif
 
1116
 
 
1117
#ifdef CACA
 
1118
  caca_free_display(aaxine.display);
 
1119
  cucul_free_canvas(aaxine.canvas);
 
1120
#endif
1111
1121
  
1112
1122
  if(xlib_handle)
1113
1123
    dlclose(xlib_handle);