~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/widgets/gimpcolorbar.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
22
22
 
23
23
#include <gtk/gtk.h>
24
24
 
 
25
#include "libgimpmath/gimpmath.h"
25
26
#include "libgimpcolor/gimpcolor.h"
 
27
#include "libgimpconfig/gimpconfig.h"
26
28
 
27
29
#include "widgets-types.h"
28
30
 
29
 
#include "config/gimpconfig-params.h"
30
 
 
31
31
#include "gimpcolorbar.h"
32
32
 
33
33
 
42
42
 
43
43
/*  local function prototypes  */
44
44
 
45
 
static void      gimp_color_bar_class_init    (GimpColorBarClass *klass);
46
 
static void      gimp_color_bar_init          (GimpColorBar      *bar);
47
 
static void      gimp_color_bar_set_property  (GObject           *object,
48
 
                                               guint              property_id,
49
 
                                               const GValue      *value,
50
 
                                               GParamSpec        *pspec);
51
 
 
52
 
static gboolean  gimp_color_bar_expose        (GtkWidget         *widget,
53
 
                                               GdkEventExpose    *event);
54
 
 
55
 
 
56
 
GType
57
 
gimp_color_bar_get_type (void)
58
 
{
59
 
  static GType type = 0;
60
 
 
61
 
  if (! type)
62
 
    {
63
 
      static const GTypeInfo bar_info =
64
 
      {
65
 
        sizeof (GimpColorBarClass),
66
 
        NULL,           /* base_init */
67
 
        NULL,           /* base_finalize */
68
 
        (GClassInitFunc) gimp_color_bar_class_init,
69
 
        NULL,           /* class_finalize */
70
 
        NULL,           /* class_data */
71
 
        sizeof (GimpColorBar),
72
 
        0,              /* n_preallocs */
73
 
        (GInstanceInitFunc) gimp_color_bar_init,
74
 
      };
75
 
 
76
 
      type = g_type_register_static (GTK_TYPE_MISC,
77
 
                                     "GimpColorBar", &bar_info, 0);
78
 
    }
79
 
 
80
 
  return type;
81
 
}
 
45
static void      gimp_color_bar_set_property (GObject        *object,
 
46
                                              guint           property_id,
 
47
                                              const GValue   *value,
 
48
                                              GParamSpec     *pspec);
 
49
 
 
50
static gboolean  gimp_color_bar_expose       (GtkWidget      *widget,
 
51
                                              GdkEventExpose *event);
 
52
 
 
53
 
 
54
G_DEFINE_TYPE (GimpColorBar, gimp_color_bar, GTK_TYPE_MISC)
 
55
 
 
56
#define parent_class gimp_color_bar_parent_class
 
57
 
82
58
 
83
59
static void
84
60
gimp_color_bar_class_init (GimpColorBarClass *klass)
97
73
                                                      NULL, NULL,
98
74
                                                      GTK_TYPE_ORIENTATION,
99
75
                                                      GTK_ORIENTATION_HORIZONTAL,
100
 
                                                      G_PARAM_WRITABLE |
 
76
                                                      GIMP_PARAM_WRITABLE |
101
77
                                                      G_PARAM_CONSTRUCT_ONLY));
102
78
  g_object_class_install_property (object_class, PROP_COLOR,
103
79
                                   gimp_param_spec_rgb ("color",
104
80
                                                        NULL, NULL,
105
 
                                                        &white,
106
 
                                                        G_PARAM_WRITABLE |
 
81
                                                        FALSE, &white,
 
82
                                                        GIMP_PARAM_WRITABLE |
107
83
                                                        G_PARAM_CONSTRUCT));
108
84
  g_object_class_install_property (object_class, PROP_ORIENTATION,
109
85
                                   g_param_spec_enum ("histogram-channel",
110
86
                                                      NULL, NULL,
111
87
                                                      GIMP_TYPE_HISTOGRAM_CHANNEL,
112
88
                                                      GIMP_HISTOGRAM_VALUE,
113
 
                                                      G_PARAM_WRITABLE));
 
89
                                                      GIMP_PARAM_WRITABLE));
114
90
 
115
91
  widget_class->expose_event = gimp_color_bar_expose;
116
92
}