~bratsche/ubuntu/maverick/gtk+2.0/menu-activation-fix

« back to all changes in this revision

Viewing changes to gdk-pixbuf/io-gdip-tiff.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-07-22 21:41:30 UTC
  • mfrom: (1.11.7 upstream) (72.1.16 experimental)
  • Revision ID: james.westby@ubuntu.com-20100722214130-5uzyvpb9g4m0ts2c
Tags: 2.21.5-1ubuntu1
* Merge with Debian experimental, Ubuntu changes:
* debian/control.in:
  - Add introspection build-depends
  - Add Vcs-Bzr link
  - Add gir1.0-gtk-2.0 package
  - libgtk2.0-dev replaces gir-repository-dev
  - Conflict with appmenu-gtk (<< 0.1.3) to prevent menu proxy breakage
* debian/rules:
  - Build with --enable-introspection
  - Add gir1.0-gtk-2.0 package to BINARY_ARCH_PKGS
  - Add dh_girepository call
  - Disable devhelp files
* debian/dh_gtkmodules.in:
  - Remove obsolete script content
* debian/libgtk2.0-0.symbols:
  - Add Ubuntu specific symbols
* debian/libgtk2.0-dev.install.in:
  - Add gir files
* debian/libgtk2.0-doc.install.in
  - Disable devhelp files
* debian/gir1.0-gtk-2.0.install.in
  - Introspection package
* debian/patches/043_menu_proxy.patch
  - Add GtkMenuProxy support for remoting menus.
* debian/patches/062_dnd_menubar.patch:
  - Allow click on menubars for dnd
* debian/patches/063_treeview_almost_fixed.patch:
  - Add an ubuntu-almost-fixed-height-mode property, (required for
    software-center)
* debian/patches/071_no_offscreen_widgets_grabbing.patch:
  - Don't let offscreen widgets do grabbing
* debian/patches/072_indicator_menu_update.patch:
  - change by Cody Russell to send an update event on menu changes,
    should make the bluetooth indicator refresh correctly
* debian/patches/091_bugzilla_tooltip_refresh.patch:
  - Upstream bugzilla change to have better looking tooltips the gtk theme
    need to set "new-tooltip-style" to use those
* debian/watch:
  - Watch for unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
 
/* GdkPixbuf library - Win32 GDI+ Pixbuf Loader
3
 
 *
4
 
 * Copyright (C) 2008 Dominic Lachowicz
5
 
 * Copyright (C) 2008 Alberto Ruiz
6
 
 *
7
 
 * Authors: Dominic Lachowicz <domlachowicz@gmail.com>
8
 
 *          Alberto Ruiz <aruiz@gnome.org>
9
 
 *
10
 
 * This library is free software; you can redistribute it and/or
11
 
 * modify it under the terms of the GNU Lesser General Public
12
 
 * License as published by the Free Software Foundation; either
13
 
 * version 2 of the License, or (at your option) any later version.
14
 
 *
15
 
 * This library is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 
 * Lesser General Public License for more  * You should have received a copy of the GNU Lesser General Public
19
 
 * License along with this library; if not, write to the
20
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
 
 * Boston, MA 02111-1307, USA.
22
 
 */
23
 
 
24
 
#include "io-gdip-utils.h"
25
 
 
26
 
static gboolean
27
 
gdk_pixbuf__gdip_image_save_TIFF_to_callback (GdkPixbufSaveFunc   save_func,
28
 
                                              gpointer            user_data,
29
 
                                              GdkPixbuf          *pixbuf,
30
 
                                              gchar             **keys,
31
 
                                              gchar             **values,
32
 
                                              GError            **error)
33
 
{
34
 
  return gdip_save_pixbuf (pixbuf, L"image/tiff", NULL, save_func, user_data, error);
35
 
}
36
 
 
37
 
static gboolean
38
 
gdk_pixbuf__gdip_image_save_TIFF (FILE         *f,
39
 
                                 GdkPixbuf     *pixbuf,
40
 
                                 gchar        **keys,
41
 
                                 gchar        **values,
42
 
                                 GError       **error)
43
 
{
44
 
  return gdk_pixbuf__gdip_image_save_TIFF_to_callback (gdip_save_to_file_callback, f, pixbuf, keys, values, error);
45
 
}
46
 
 
47
 
#ifndef INCLUDE_gdiplus
48
 
#define MODULE_ENTRY(function) G_MODULE_EXPORT void function
49
 
#else
50
 
#define MODULE_ENTRY(function) void _gdk_pixbuf__gdip_tiff_ ## function
51
 
#endif
52
 
 
53
 
MODULE_ENTRY (fill_vtable) (GdkPixbufModule *module)
54
 
{
55
 
  gdip_fill_vtable (module);
56
 
 
57
 
  module->save_to_callback = gdk_pixbuf__gdip_image_save_TIFF_to_callback;
58
 
  module->save = gdk_pixbuf__gdip_image_save_TIFF; /* for gtk < 2.14, you need to implement both. otherwise gdk-pixbuf-queryloaders fails */
59
 
}
60
 
 
61
 
MODULE_ENTRY (fill_info) (GdkPixbufFormat *info)
62
 
{
63
 
  static GdkPixbufModulePattern signature[] = {
64
 
    { "MM \x2a", "  z ", 100 }, /* TIFF */
65
 
    { "II\x2a ", "   z", 100 }, /* TIFF */
66
 
    { NULL, NULL, 0 }
67
 
  };
68
 
 
69
 
  static gchar *mime_types[] = {
70
 
    "image/tiff",
71
 
    NULL
72
 
  };
73
 
 
74
 
  static gchar *extensions[] = {
75
 
    "tiff",
76
 
    "tif",
77
 
    NULL
78
 
  };
79
 
 
80
 
  info->name        = "tiff";
81
 
  info->signature   = signature;
82
 
  info->description = "The TIFF image format";
83
 
  info->mime_types  = mime_types;
84
 
  info->extensions  = extensions;
85
 
  info->flags       = GDK_PIXBUF_FORMAT_WRITABLE | GDK_PIXBUF_FORMAT_THREADSAFE;
86
 
  info->license     = "LGPL";
87
 
}