aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-cursors.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-cursors.c')
-rw-r--r--widgets/misc/e-cursors.c156
1 files changed, 0 insertions, 156 deletions
diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c
deleted file mode 100644
index 3b44ab809e..0000000000
--- a/widgets/misc/e-cursors.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-cursors.c - cursor handling for gnumeric
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Miguel de Icaza (miguel@gnu.org)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License, version 2, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "e-cursors.h"
-
-#include "e-colors.h"
-#include "pixmaps/cursor_cross.xpm"
-#include "pixmaps/cursor_zoom_in.xpm"
-#include "pixmaps/cursor_zoom_out.xpm"
-#include "pixmaps/cursor_hand_open.xpm"
-#include "pixmaps/cursor_hand_closed.xpm"
-#include <stdio.h>
-
-#define GDK_INTERNAL_CURSOR -1
-
-typedef struct {
- GdkCursor *cursor;
- int hot_x, hot_y;
- char **xpm;
-} CursorDef;
-
-static CursorDef cursors [] = {
- { NULL, 17, 17, cursor_cross_xpm },
- { NULL, GDK_INTERNAL_CURSOR, GDK_CROSSHAIR, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_ARROW, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_FLEUR, NULL },
- { NULL, 24, 24, cursor_zoom_in_xpm },
- { NULL, 24, 24, cursor_zoom_out_xpm },
- { NULL, GDK_INTERNAL_CURSOR, GDK_SB_H_DOUBLE_ARROW, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_SB_V_DOUBLE_ARROW, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_SIZING, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_SIZING, NULL },
- { NULL, GDK_INTERNAL_CURSOR, GDK_HAND2, NULL },
- { NULL, 10, 10, cursor_hand_open_xpm },
- { NULL, 10, 10, cursor_hand_closed_xpm },
- { NULL, GDK_INTERNAL_CURSOR, GDK_XTERM, NULL },
- { NULL, 0, 0, NULL }
-};
-
-
-static void
-create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **xpm)
-{
- int height, width, colors;
- char pixmap_buffer [(32 * 32)/8];
- char mask_buffer [(32 * 32)/8];
- int x, y, pix, yofs;
- int transparent_color, black_color;
-
- sscanf (xpm [0], "%d %d %d %d", &height, &width, &colors, &pix);
-
- g_assert (height == 32);
- g_assert (width == 32);
- g_assert (colors <= 3);
-
- transparent_color = ' ';
- black_color = '.';
-
- yofs = colors + 1;
- for (y = 0; y < 32; y++){
- for (x = 0; x < 32;){
- char value = 0, maskv = 0;
-
- for (pix = 0; pix < 8; pix++, x++){
- if (xpm [y + yofs][x] != transparent_color){
- maskv |= 1 << pix;
-
- /*
- * Invert the colours here because it seems
- * to workaround a bug the Matrox G100 Xserver?
- * We reverse the foreground & background in the next
- * routine to compensate.
- */
- if (xpm [y + yofs][x] == black_color){
- value |= 1 << pix;
- }
- }
- }
- pixmap_buffer [(y * 4 + x/8)-1] = value;
- mask_buffer [(y * 4 + x/8)-1] = maskv;
- }
- }
- *bitmap = gdk_bitmap_create_from_data (NULL, pixmap_buffer, 32, 32);
- *mask = gdk_bitmap_create_from_data (NULL, mask_buffer, 32, 32);
-}
-
-void
-e_cursors_init (void)
-{
- int i;
-
- e_color_init ();
-
- for (i = 0; cursors [i].hot_x; i++){
- GdkBitmap *bitmap, *mask;
-
- if (cursors [i].hot_x < 0)
- cursors [i].cursor = gdk_cursor_new (cursors [i].hot_y);
- else {
- create_bitmap_and_mask_from_xpm (&bitmap, &mask, cursors [i].xpm);
-
- /* The foreground and background colours are reversed.
- * See comment above for explanation.
- */
- cursors [i].cursor =
- gdk_cursor_new_from_pixmap (
- bitmap, mask,
- &e_black, &e_white,
- cursors [i].hot_x,
- cursors [i].hot_y);
- }
- }
-
- g_assert (i == E_CURSOR_NUM_CURSORS);
-}
-
-void
-e_cursors_shutdown (void)
-{
- int i;
-
- for (i = 0; cursors [i].hot_x; i++)
- gdk_cursor_destroy (cursors [i].cursor);
-}
-
-
-/* Returns a cursor given its type */
-GdkCursor *
-e_cursor_get (ECursorType type)
-{
- g_return_val_if_fail (type >= 0 && type < E_CURSOR_NUM_CURSORS, NULL);
-
- return cursors [type].cursor;
-}
insertions'>+4 * - Fix pkg-plistaz2006-02-081-1/+4 * This module provides two functions, bencode and bdecode,az2006-02-065-0/+33 * ascii2binary and binary2ascii convert between textual and binarythierry2006-01-315-0/+121 * Chase shlib bump of libexpat.kuriyama2006-01-311-2/+2 * - Upgrade to 1.03.kuriyama2006-01-304-8/+8 * Fix another PHP bug and unbreak build on amd64.ale2006-01-281-0/+10 * Add backup sites for WITH_EXTRA_PATCHES.nork2006-01-281-0/+2 * - Fix possibility of "infinite make fork" when "Registering install for ..."linimon2006-01-282-0/+2 * SHA256ify (manually done and checked)edwin2006-01-221-1/+3 * mark as broken when RUBY < 1.7edwin2006-01-221-0/+2 * SHA256ifyedwin2006-01-2240-0/+40 * - update to 2.14leeym2006-01-223-12/+11 * Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-222-18/+18 * Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-2219-44/+44 * Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-226-18/+18 * - Update to 1.6sem2006-01-228-161/+16 * Remove myself from MAINTAINERache2006-01-211-1/+1 * BROKEN: Incorrect pkg-plistkris2006-01-201-0/+2 * Update to 0.64skv2006-01-182-4/+4 * - ruby-iconv is no longer considered experimentalpav2006-01-141-3/+0 * Update to 1.4edwin2006-01-052-4/+4 * [patch] bug in the uulib-0.5.20edwin2006-01-041-0/+22 * [patch] bug in the uulib-0.5.20edwin2006-01-042-0/+2 * Update to 2.12, remove IGNORE for newer perl.tobez2005-12-273-5/+6 * New port nomyso version 3.0: Convert MASM/TASM files to NASMlioux2005-12-234-0/+48 * Remove duplicate port entry converters/intel2gas since it alreadylioux2005-12-236-170/+0 * New port intel2gas version 1.3.3: MASM/NASM/TASM to GNU asm syntaxlioux2005-12-236-0/+170 * New port ta2as version 0.8: TASM to AT&T asm syntax converterlioux2005-12-236-0/+97 * - require devel/p5-XSLoader and unbreak it on perl 5.005leeym2005-12-211-1/+5 * New port p5-Unicode-UTF8simple version 1.06: Conversions to/fromlioux2005-12-205-0/+43 * -Update to 0.9.8.mezz2005-12-134-147/+107 * - update to 1.06leeym2005-12-112-4/+4 * Plug memory leak in librecode.demon2005-12-083-1/+52 * - Update MASTER_SITES to fix fetch [1]ahze2005-12-082-2/+2 * Update to 0.62skv2005-12-032-3/+4 * - update port from v0.20 to v0.21aaron2005-12-033-4/+6 * - Update to 3.07erwin2005-12-024-19/+12 * - Fix latest commit adding a missing dependency (devel/p5-Class-ErrorHandler).flz2005-12-011-1/+3 * - Update to 2.1pav2005-12-012-3/+4 * - Update to 0.07.flz2005-11-303-5/+4 * - Update to 0.19.flz2005-11-292-3/+4 * The Ruby contrib directory hasn't existed for some time; mirror thefenner2005-11-281-2/+2 * - Add SHA256pav2005-11-271-0/+1 * big whitespace cleanup (see ports/65409)edwin2005-11-251-1/+1 * - Upgrade to 1.02.kuriyama2005-11-244-6/+8 * - Remove checksum for nonexistant filepav2005-11-241-1/+2 * - Add SHA256pav2005-11-2419-1/+20 * - Add SHA256 checksumspav2005-11-243-0/+4 * - Add some SHA256spav2005-11-241-0/+1 * Bump PORTVERSION.ale2005-11-152-7/+7 * Unbreak and take maintainership.ale2005-11-155-47/+36 * Update to 2.09. Change maintainer to perl@. Remove copyright noticetobez2005-11-153-12/+8 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-156-6/+6 * BROKEN: Size mismatchkris2005-11-151-0/+2 * - Bump PORTEPOCH for ruby ports that gets PORTVERSION from bsd.ruby.mksem2005-11-151-0/+1 * Take a perl@ hat and add SHA256 checksumsmat2005-11-142-0/+2 * Reset maintainer:edwin2005-11-142-2/+2 * With portmgr hat on, reset maintainership of knu's ports since he haslinimon2005-11-113-3/+3 * - Switch mastersite to new projectsitemarkus2005-11-103-2/+4 * Bump PORTREVISION to chase the glib20 shared library update.marcus2005-11-051-1/+1 * Add p5-Unicode-RecursiveDowngrade 0.02, perl extension to turn off UTF-8kuriyama2005-11-045-0/+32 * Update to 0.61skv2005-11-032-3/+3 * - Upgrade to 1.00.kuriyama2005-10-296-12/+38 * Fix pkg-plist on 4-stable.nork2005-10-292-2/+3 * Reset maintainer, does not respond to mails for 19 days. Since a fewehaupt2005-10-291-1/+1 * Update to 0.60skv2005-10-282-3/+3 * Add p5-MIME-Base32 1.01, is a base32 encoder/decoder.nork2005-10-225-0/+44 * Fix PREFIX compliance.bland2005-10-211-8/+7 * Update to 1.3.4mnag2005-10-202-3/+3 * Remove expired port: no longer available from author's sitevs2005-10-1815-353/+0 * Change post-install to do-install to avoid installing the binary twice,kris2005-10-161-1/+1 * Update to version 1.04.demon2005-10-102-4/+4 * Chase updated mastersite.linimon2005-10-091-1/+1 * Remove obsolete mastersites.linimon2005-10-071-2/+0 * Update to 1.2.0arved2005-09-263-6/+6 * search.cpan.org redirect reduction canonicalization project, pass 3:fenner2005-09-231-1/+1 * search.cpan.org redirect reduction canonicalization project, pass 2:fenner2005-09-221-1/+1 * search.cpan.org redirect reduction canonicalization project, pass 1:fenner2005-09-223-3/+3 * Reset maintainership of Seamus Venasse who has not responded for some time.erwin2005-09-202-2/+2 * Remove obsolete mastersite.linimon2005-09-171-2/+1 * . Update to 1.0.14.glewis2005-09-132-3/+3 * - Readd PORTREVISION, I removed this planning on updating to 0.10.5ahze2005-09-121-0/+1 * - User newer libtool15 instead of libtool13ahze2005-09-123-13/+2 * Add p5-Convert-IBM390 0.20, functions for manipulating mainframe data.garga2005-09-035-0/+56 * Add p5- $PKGNAMEPREFIX.kuriyama2005-09-012-0/+4 * Fix incorrect plist (only broken on 4.x).kuriyama2005-09-012-2/+2 * Add p5-JSON 0.99, perl extension to convert to JSON (JavaScript Objectkuriyama2005-08-289-0/+73 * Issue a one-month stay of execution for these ports so I can send outkris2005-07-301-1/+1 * Add p5-Encode 2.10, provides interfaces between strings and the rest ofgarga2005-07-284-0/+107 * Unbreak conditionalized Jcode.pm path.kuriyama2005-07-261-2/+10 * Correct quoting of DEPRECATED variablekris2005-07-231-1/+1 * Update my email address.vsevolod2005-07-221-1/+1 * HTML to XHTML converter written in perl.garga2005-07-194-0/+33 * With portmgr hat on, reset eik's ports since he has been inactive forlinimon2005-07-181-1/+1 * Update to 0.59skv2005-06-162-3/+3 * * reflect renaming on CPAN File-Spec to PathToolsskv2005-06-121-1/+0 * - Use MAKE_ARGSvs2005-06-063-13/+3 * Use MAKE_ARGS instead of patchvs2005-06-062-12/+1 * - Update to 1.3.3sem2005-06-062-5/+5