diff options
author | James Meyer <james.meyer@operamail.com> | 2010-10-23 18:17:40 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-10-23 18:19:39 (GMT) |
commit | adbcf19958300e9b6598990184c8815b945ba0ee (patch) | |
tree | f4283c850ac0ac202c17e78a637ee7ca8147621b /abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c | |
parent | 61a68250df10d29b624650948484898334ff22d0 (diff) | |
download | linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.zip linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.gz linhes_pkgbuild-adbcf19958300e9b6598990184c8815b945ba0ee.tar.bz2 |
Removed old core and extra from repo. Renamed -testing to core/extra. This will setup the base for the testing branch.
Diffstat (limited to 'abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c')
-rw-r--r-- | abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c b/abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c deleted file mode 100644 index fb4b7d4..0000000 --- a/abs/mv-core/ghosd/ghosd-0.0.1/examples/example-shared.c +++ /dev/null @@ -1,66 +0,0 @@ -/* ghosd -- OSD with fake transparency, cairo, and pango. - * Copyright (C) 2006 Evan Martin <martine@danga.com> - */ - -#include <glib.h> -#include <stdlib.h> -#include <ghosd/ghosd.h> - -#include "example-shared.h" - -ExampleOptions opts = { - TRUE, - 50, -50 -}; - -gboolean -example_options_parse(int *argc, char ***argv, ...) { - GOptionEntry options[] = { - { "opaque", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, - (gpointer)&opts.transparent, "turn off transparent background" }, - { "x", 'x', 0, G_OPTION_ARG_INT, (gpointer)&opts.x, - "x coordinate for window" }, - { "y", 'y', 0, G_OPTION_ARG_INT, (gpointer)&opts.y, - "y coordinate for window" }, - { NULL } - }; - GOptionContext *ctx; - GOptionGroup *group; - gboolean ret; - va_list ap; - - va_start(ap, argv); - - ctx = g_option_context_new(""); - g_option_context_add_main_entries(ctx, options, "bar"); - - while ((group = va_arg(ap, GOptionGroup*)) != NULL) { - g_option_context_add_group(ctx, group); - } - va_end(ap); - - g_option_context_set_ignore_unknown_options(ctx, FALSE); - ret = g_option_context_parse(ctx, argc, argv, NULL); - g_option_context_free(ctx); - - if (opts.x == 0) opts.x = GHOSD_COORD_CENTER; - if (opts.y == 0) opts.y = GHOSD_COORD_CENTER; - - return ret; -} - -void -example_round_rect(cairo_t *cr, int x, int y, int w, int h, int r) { - cairo_move_to(cr, x+r, y); - cairo_line_to(cr, x+w-r, y); /* top edge */ - cairo_curve_to(cr, x+w, y, x+w, y, x+w, y+r); - cairo_line_to(cr, x+w, y+h-r); /* right edge */ - cairo_curve_to(cr, x+w, y+h, x+w, y+h, x+w-r, y+h); - cairo_line_to(cr, x+r, y+h); /* bottom edge */ - cairo_curve_to(cr, x, y+h, x, y+h, x, y+h-r); - cairo_line_to(cr, x, y+r); /* left edge */ - cairo_curve_to(cr, x, y, x, y, x+r, y); - cairo_close_path(cr); -} - -/* vim: set ts=2 sw=2 et cino=(0 : */ |