Gimp.Display¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The display id for internal use |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gimp.Display(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Functions to create, delete and flush displays (views) on an image.
- classmethod get_by_id(display_id)¶
- Parameters:
display_id (
int
) – The display id.- Returns:
a
Gimp.Display
for display_id orNone
if display_id does not represent a valid display. The object belongs to libgimp and you must not modify or unref it.- Return type:
Gimp.Display
orNone
Returns a
Gimp.Display
representing display_id.Note: in most use cases, you should not need to retrieve a
Gimp.Display
by its ID, which is mostly internal data and not reusable across sessions. Use the appropriate functions for your use case instead.New in version 3.0.
- classmethod id_is_valid(display_id)¶
- Parameters:
display_id (
int
) – The display ID to check.- Returns:
Whether the display ID is valid.
- Return type:
Returns
True
if the display ID is valid.This procedure checks if the given display ID is valid and refers to an existing display.
*Note*: in most use cases, you should not use this function. If you got a [class`Gimp`.Display] from the API, you should trust it is valid. This function is mostly for internal usage.
New in version 3.0.
- classmethod name()¶
- Returns:
the display name
- Return type:
Returns the display to be used for plug-in windows.
This is a constant value given at plug-in configuration time. Will return
None
if GIMP has been started with no GUI, either via “–no-interface” flag, or a console build.
- classmethod new(image)¶
- Parameters:
image (
Gimp.Image
) – The image.- Returns:
The new display.
- Return type:
Create a new display for the specified image.
Creates a new display for the specified image. If the image already has a display, another is added. Multiple displays are handled transparently by GIMP. The newly created display is returned and can be subsequently destroyed with a call to
Gimp.Display.delete
(). This procedure only makes sense for use with the GIMP UI, and will result in an execution error if called when GIMP has no UI.
- delete()¶
-
Delete the specified display.
This procedure removes the specified display. If this is the last remaining display for the underlying image, then the image is deleted also. Note that the display is closed no matter if the image is dirty or not. Better save the image before calling this procedure.
- get_id()¶
- Returns:
the display ID.
- Return type:
Note: in most use cases, you should not need a display’s ID which is mostly internal data and not reusable across sessions.
New in version 3.0.
- get_window_handle()¶
- Returns:
The native window handle or
None
.- Return type:
Get a handle to the native window for an image display.
This procedure returns a handle to the native window for a given image display. It can be different types of data depending on the platform you are running on. For example in the X backend of GDK, a native window handle is an Xlib XID whereas on Wayland, it is a string handle. A value of
None
is returned for an invalid display or if this function is unimplemented for the windowing system that is being used.New in version 2.4.
Property Details¶
- Gimp.Display.props.id¶
- Name:
id
- Type:
- Default Value:
0
- Flags:
The display id for internal use