cd-window

cd-window — Additional helper classes for working with GTK

Synopsis

#define             CD_WINDOW_ERROR
#define             CD_WINDOW_TYPE_ERROR
enum                CdWindowError;
void                (*_cd_window_reserved1)             (void);
void                (*_cd_window_reserved2)             (void);
void                (*_cd_window_reserved3)             (void);
void                (*_cd_window_reserved4)             (void);
void                (*_cd_window_reserved5)             (void);
void                (*_cd_window_reserved6)             (void);
void                (*_cd_window_reserved7)             (void);
void                (*_cd_window_reserved8)             (void);
GQuark              cd_window_error_quark               (void);
CdProfile *         cd_window_get_last_profile          (CdWindow *window);
void                cd_window_get_profile               (CdWindow *window,
                                                         GtkWidget *widget,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
CdProfile *         cd_window_get_profile_finish        (CdWindow *window,
                                                         GAsyncResult *res,
                                                         GError **error);
CdWindow *          cd_window_new                       (void);
void                (*changed)                          (CdWindow *window,
                                                         CdProfile *profile);

Description

These functions are useful when GTK is being used alongside colord and are just provided for convenience.

See also: CdDevice

Details

CD_WINDOW_ERROR

#define CD_WINDOW_ERROR		(cd_window_error_quark ())


CD_WINDOW_TYPE_ERROR

#define CD_WINDOW_TYPE_ERROR (cd_window_error_get_type ())


enum CdWindowError

typedef enum {
	CD_WINDOW_ERROR_FAILED,
	CD_WINDOW_ERROR_LAST
} CdWindowError;

Errors that can be thrown

CD_WINDOW_ERROR_FAILED

the transaction failed for an unknown reason

CD_WINDOW_ERROR_LAST


_cd_window_reserved1 ()

void                (*_cd_window_reserved1)             (void);


_cd_window_reserved2 ()

void                (*_cd_window_reserved2)             (void);


_cd_window_reserved3 ()

void                (*_cd_window_reserved3)             (void);


_cd_window_reserved4 ()

void                (*_cd_window_reserved4)             (void);


_cd_window_reserved5 ()

void                (*_cd_window_reserved5)             (void);


_cd_window_reserved6 ()

void                (*_cd_window_reserved6)             (void);


_cd_window_reserved7 ()

void                (*_cd_window_reserved7)             (void);


_cd_window_reserved8 ()

void                (*_cd_window_reserved8)             (void);


cd_window_error_quark ()

GQuark              cd_window_error_quark               (void);

Returns :

An error quark.

Since 0.1.20


cd_window_get_last_profile ()

CdProfile *         cd_window_get_last_profile          (CdWindow *window);

Gets the color profile to use for this widget.

window :

a CdWindow instance.

Returns :

a CdProfile. [transfer none]

Since 0.1.20


cd_window_get_profile ()

void                cd_window_get_profile               (CdWindow *window,
                                                         GtkWidget *widget,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Gets the screen profile that should be used for the widget, which corresponds to the screen output the widget most covers.

This method should be called when the widget has mapped, i.e. g_signal_connect (dialog, "map", G_CALLBACK (map_cb), priv);

Note, the returned profile from cd_client_get_profile_for_widget_finish() has already been connected to, as is ready to use.

window :

a CdWindow instance.

widget :

a GtkWidget

cancellable :

a GCancellable or NULL

callback :

the function to run on completion

user_data :

the data to pass to callback

Since 0.1.20


cd_window_get_profile_finish ()

CdProfile *         cd_window_get_profile_finish        (CdWindow *window,
                                                         GAsyncResult *res,
                                                         GError **error);

Gets the result from the asynchronous function.

window :

a CdWindow instance.

res :

the GAsyncResult

error :

A GError or NULL

Returns :

a CdProfile or NULL. [transfer full]

Since 0.1.20


cd_window_new ()

CdWindow *          cd_window_new                       (void);

Creates a new CdWindow object.

Returns :

a new CdWindow object.

Since 0.1.20


changed ()

void                (*changed)                          (CdWindow *window,
                                                         CdProfile *profile);