GwyAppDataWindow

GwyAppDataWindow — Common interface of windows for different data kinds

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── GwyAppDataWindow

Prerequisites

GwyAppDataWindow requires GtkWindow.

Known Implementations

GwyAppDataWindow is implemented by GwyAppGraphWindow and GwyAppImageWindow.

Includes

#include <libgwyapp/gwyapp.h>

Description

GwyAppDataWindow is an abstract interface provided by application-level windows showing various data objects, such as GwyAppImageWindow and GwyAppGraphWindow.

Functions

gwy_app_data_window_get_file()

GwyFile *
gwy_app_data_window_get_file (GwyAppDataWindow *window);

Gets the file containing the data displayed in a window.

Parameters

window

A window showing some data.

 

Returns

The file data container.

[transfer none]


gwy_app_data_window_get_data_kind()

GwyDataKind
gwy_app_data_window_get_data_kind (GwyAppDataWindow *window);

Gets the kind of data displayed in a window.

Parameters

window

A window showing some data.

 

Returns

The data kind.


gwy_app_data_window_get_id()

gint
gwy_app_data_window_get_id (GwyAppDataWindow *window);

Gets the numerical id of data item displayed in a window.

Parameters

window

A window showing some data.

 

Returns

The numerical id in the file.


gwy_app_data_window_get_accel_root()

const gchar *
gwy_app_data_window_get_accel_root (GwyAppDataWindow *window);

Gets root of accelerator map entries for a window displaying some data.

The returned string is the "<WINDOWTYPE>" part of the accelerator path for the particular window, which GTK+ defines as a unique application-specific identifier that corresponds to the kind of window the accelerator is being used in. Many data windows of the same kind can exist simultaneously and they all have the same prefix, for example all volume data windows have the prefix "<volume>".

Parameters

window

A window showing some data.

 

Returns

The accelerator map root.


GWY_APP_DATA_WINDOW_GET_INTERFACE()

#define GWY_APP_DATA_WINDOW_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GWY_TYPE_APP_DATA_WINDOW, GwyAppDataWindowInterface))

Gets the application data window interface for an object implementing this interface.

You can use the interface to call the interface's methods for the object. However, all are available as gwy_app_data_window_get_data_kind() and similar function.

Parameters

obj

An object.

 

Types and Values

GwyAppDataWindow

typedef struct _GwyAppDataWindow GwyAppDataWindow;

Formal type of application data windows.


struct GwyAppDataWindowInterface

struct GwyAppDataWindowInterface {
    GwyFile*     (*get_file)      (GwyAppDataWindow *app_data_window);
    GwyDataKind  (*get_data_kind) (GwyAppDataWindow *app_data_window);
    gint         (*get_id)        (GwyAppDataWindow *app_data_window);
    const gchar* (*get_accel_root)(GwyAppDataWindow *app_data_window);
};