~ubuntu-branches/ubuntu/maverick/libaosd/maverick

« back to all changes in this revision

Viewing changes to examples/text/text.c

  • Committer: Bazaar Package Importer
  • Author(s): William Pitcock
  • Date: 2007-11-30 07:42:21 UTC
  • Revision ID: james.westby@ubuntu.com-20071130074221-8yt6spn1ns6rfw7e
Tags: upstream-0.1.3
Import upstream version 0.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* aosd -- OSD with transparency, cairo, and pango.
 
2
 *
 
3
 * Copyright (C) 2006 Evan Martin <martine@danga.com>
 
4
 */
 
5
 
 
6
#include <stdio.h>
 
7
 
 
8
#include <cairo/cairo.h>
 
9
#include <pango/pangocairo.h>
 
10
#include <time.h>
 
11
#include <unistd.h>
 
12
 
 
13
#include <X11/Xlib.h>
 
14
 
 
15
#include <libaosd/aosd.h>
 
16
#include <libaosd/aosd-text.h>
 
17
 
 
18
int
 
19
main(int argc, char* argv[])
 
20
{
 
21
  Aosd* aosd;
 
22
 
 
23
  aosd = aosd_new_text(
 
24
      "<span font_desc='Times New Roman 30' color='green'>"
 
25
      "some sample text using <b>libaosd</b>\n"
 
26
      "some unicode: Ελληνικά · 한국어 · עברית ·"
 
27
      " ქართული · كورد"
 
28
      "</span>",
 
29
      50, -50);
 
30
 
 
31
  aosd_set_transparency(aosd, TRANSPARENCY_COMPOSITE);
 
32
 
 
33
  aosd_flash(aosd, 200, 5000);
 
34
 
 
35
  aosd_destroy(aosd);
 
36
 
 
37
  return 0;
 
38
}
 
39
 
 
40
/* vim: set ts=2 sw=2 et : */