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

« back to all changes in this revision

Viewing changes to libgimp/gimpdisplay_pdb.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:
19
19
 * Boston, MA 02111-1307, USA.
20
20
 */
21
21
 
22
 
/* NOTE: This file is autogenerated by pdbgen.pl */
 
22
/* NOTE: This file is auto-generated by pdbgen.pl */
23
23
 
24
24
#include "config.h"
25
25
 
26
26
#include "gimp.h"
27
27
 
28
28
/**
 
29
 * gimp_display_is_valid:
 
30
 * @display_ID: The display to check.
 
31
 *
 
32
 * Returns TRUE if the display is valid.
 
33
 *
 
34
 * This procedure checks if the given display ID is valid and refers to
 
35
 * an existing display.
 
36
 *
 
37
 * Returns: Whether the display ID is valid.
 
38
 *
 
39
 * Since: GIMP 2.4
 
40
 */
 
41
gboolean
 
42
gimp_display_is_valid (gint32 display_ID)
 
43
{
 
44
  GimpParam *return_vals;
 
45
  gint nreturn_vals;
 
46
  gboolean valid = FALSE;
 
47
 
 
48
  return_vals = gimp_run_procedure ("gimp-display-is-valid",
 
49
                                    &nreturn_vals,
 
50
                                    GIMP_PDB_DISPLAY, display_ID,
 
51
                                    GIMP_PDB_END);
 
52
 
 
53
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
 
54
    valid = return_vals[1].data.d_int32;
 
55
 
 
56
  gimp_destroy_params (return_vals, nreturn_vals);
 
57
 
 
58
  return valid;
 
59
}
 
60
 
 
61
/**
29
62
 * gimp_display_new:
30
63
 * @image_ID: The image.
31
64
 *
34
67
 * Creates a new display for the specified image. If the image already
35
68
 * has a display, another is added. Multiple displays are handled
36
69
 * transparently by the GIMP. The newly created display is returned and
37
 
 * can be subsequently destroyed with a call to 'gimp-display-delete'.
 
70
 * can be subsequently destroyed with a call to gimp_display_delete().
38
71
 * This procedure only makes sense for use with the GIMP UI.
39
72
 *
40
73
 * Returns: The new display.
46
79
  gint nreturn_vals;
47
80
  gint32 display_ID = -1;
48
81
 
49
 
  return_vals = gimp_run_procedure ("gimp_display_new",
50
 
                                    &nreturn_vals,
51
 
                                    GIMP_PDB_IMAGE, image_ID,
52
 
                                    GIMP_PDB_END);
 
82
  return_vals = gimp_run_procedure ("gimp-display-new",
 
83
                                    &nreturn_vals,
 
84
                                    GIMP_PDB_IMAGE, image_ID,
 
85
                                    GIMP_PDB_END);
53
86
 
54
87
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
55
88
    display_ID = return_vals[1].data.d_display;
67
100
 *
68
101
 * This procedure removes the specified display. If this is the last
69
102
 * remaining display for the underlying image, then the image is
70
 
 * deleted also.
 
103
 * deleted also. Note that the display is closed no matter if the image
 
104
 * is dirty or not. Better save the image before calling this
 
105
 * procedure.
71
106
 *
72
107
 * Returns: TRUE on success.
73
108
 */
78
113
  gint nreturn_vals;
79
114
  gboolean success = TRUE;
80
115
 
81
 
  return_vals = gimp_run_procedure ("gimp_display_delete",
82
 
                                    &nreturn_vals,
83
 
                                    GIMP_PDB_DISPLAY, display_ID,
84
 
                                    GIMP_PDB_END);
 
116
  return_vals = gimp_run_procedure ("gimp-display-delete",
 
117
                                    &nreturn_vals,
 
118
                                    GIMP_PDB_DISPLAY, display_ID,
 
119
                                    GIMP_PDB_END);
85
120
 
86
121
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
87
122
 
91
126
}
92
127
 
93
128
/**
 
129
 * gimp_display_get_window_handle:
 
130
 * @display_ID: The display to get the window handle from.
 
131
 *
 
132
 * Get a handle to the native window for an image display.
 
133
 *
 
134
 * This procedure returns a handle to the native window for a given
 
135
 * image display. For example in the X backend of GDK, a native window
 
136
 * handle is an Xlib XID. A value of 0 is returned for an invalid
 
137
 * display or if this function is unimplemented for the windowing
 
138
 * system that is being used.
 
139
 *
 
140
 * Returns: The native window handle or 0.
 
141
 *
 
142
 * Since: GIMP 2.4
 
143
 */
 
144
gint
 
145
gimp_display_get_window_handle (gint32 display_ID)
 
146
{
 
147
  GimpParam *return_vals;
 
148
  gint nreturn_vals;
 
149
  gint window = 0;
 
150
 
 
151
  return_vals = gimp_run_procedure ("gimp-display-get-window-handle",
 
152
                                    &nreturn_vals,
 
153
                                    GIMP_PDB_DISPLAY, display_ID,
 
154
                                    GIMP_PDB_END);
 
155
 
 
156
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
 
157
    window = return_vals[1].data.d_int32;
 
158
 
 
159
  gimp_destroy_params (return_vals, nreturn_vals);
 
160
 
 
161
  return window;
 
162
}
 
163
 
 
164
/**
94
165
 * gimp_displays_flush:
95
166
 *
96
167
 * Flush all internal changes to the user interface
109
180
  gint nreturn_vals;
110
181
  gboolean success = TRUE;
111
182
 
112
 
  return_vals = gimp_run_procedure ("gimp_displays_flush",
113
 
                                    &nreturn_vals,
114
 
                                    GIMP_PDB_END);
 
183
  return_vals = gimp_run_procedure ("gimp-displays-flush",
 
184
                                    &nreturn_vals,
 
185
                                    GIMP_PDB_END);
115
186
 
116
187
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
117
188
 
136
207
 */
137
208
gboolean
138
209
gimp_displays_reconnect (gint32 old_image_ID,
139
 
                         gint32 new_image_ID)
 
210
                         gint32 new_image_ID)
140
211
{
141
212
  GimpParam *return_vals;
142
213
  gint nreturn_vals;
143
214
  gboolean success = TRUE;
144
215
 
145
 
  return_vals = gimp_run_procedure ("gimp_displays_reconnect",
146
 
                                    &nreturn_vals,
147
 
                                    GIMP_PDB_IMAGE, old_image_ID,
148
 
                                    GIMP_PDB_IMAGE, new_image_ID,
149
 
                                    GIMP_PDB_END);
 
216
  return_vals = gimp_run_procedure ("gimp-displays-reconnect",
 
217
                                    &nreturn_vals,
 
218
                                    GIMP_PDB_IMAGE, old_image_ID,
 
219
                                    GIMP_PDB_IMAGE, new_image_ID,
 
220
                                    GIMP_PDB_END);
150
221
 
151
222
  success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
152
223