~ubuntu-branches/ubuntu/vivid/sgt-puzzles/vivid

« back to all changes in this revision

Viewing changes to osx.m

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings
  • Date: 2010-02-20 21:41:07 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100220214107-3ppsndedu0hiz92u
Tags: 8853-1
* New upstream version - closes: #569901
* Update German translation, thanks to Helge Kreutzmann

Show diffs side-by-side

added added

removed removed

Lines of Context:
1344
1344
                          int fontsize, int align, int colour, char *text)
1345
1345
{
1346
1346
    frontend *fe = (frontend *)handle;
1347
 
    NSString *string = [NSString stringWithCString:text];
 
1347
    NSString *string = [NSString stringWithCString:text
 
1348
                        encoding:NSUTF8StringEncoding];
1348
1349
    NSDictionary *attr;
1349
1350
    NSFont *font;
1350
1351
    NSSize size;
1378
1379
 
1379
1380
    [string drawAtPoint:point withAttributes:attr];
1380
1381
}
 
1382
static char *osx_text_fallback(void *handle, const char *const *strings,
 
1383
                               int nstrings)
 
1384
{
 
1385
    /*
 
1386
     * We assume OS X can cope with any UTF-8 likely to be emitted
 
1387
     * by a puzzle.
 
1388
     */
 
1389
    return dupstr(strings[0]);
 
1390
}
1381
1391
struct blitter {
1382
1392
    int w, h;
1383
1393
    int x, y;
1478
1488
    osx_blitter_save,
1479
1489
    osx_blitter_load,
1480
1490
    NULL, NULL, NULL, NULL, NULL, NULL, /* {begin,end}_{doc,page,puzzle} */
1481
 
    NULL,                              /* line_width */
 
1491
    NULL, NULL,                        /* line_width, line_dotted */
 
1492
    osx_text_fallback,
1482
1493
};
1483
1494
 
1484
1495
void deactivate_timer(frontend *fe)