XviewerWindow: Xviewer Reference Manual

## XviewerWindow XviewerWindow |

## Functions

GtkWidget * | xviewer_window_new ()
XviewerWindowMode | xviewer_window_get_mode ()
void | xviewer_window_set_mode ()
GtkUIManager * | xviewer_window_get_ui_manager ()
XviewerListStore * | xviewer_window_get_store ()
GtkWidget * | xviewer_window_get_view ()
GtkWidget * | xviewer_window_get_sidebar ()
GtkWidget * | xviewer_window_get_thumb_view ()
GtkWidget * | xviewer_window_get_thumb_nav ()
GtkWidget * | xviewer_window_get_statusbar ()
XviewerImage * | xviewer_window_get_image ()
void | xviewer_window_open_file_list ()
gboolean | xviewer_window_is_empty ()
void | xviewer_window_reload_image ()

## Types and Values

#define | XVIEWER_WINDOW_ERROR
enum | XviewerWindowGalleryPos
enum | XviewerWindowMode
enum | XviewerWindowError
enum | XviewerStartupFlags
struct | XviewerWindow

## Description

## Functions

### xviewer_window_new ()

    GtkWidget *
    xviewer_window_new (XviewerStartupFlags flags);

Creates a new and empty XviewerWindow. Use `flags` to indicate if the window should be initialized fullscreen, in slideshow mode, and/or without the thumbnails gallery visible. See XviewerStartupFlags.

#### Parameters

flags | the initialization parameters for the new window. |

#### Returns

a newly created XviewerWindow.

### xviewer_window_get_mode ()

    XviewerWindowMode
    xviewer_window_get_mode (XviewerWindow *window);

Gets the mode of `window` . See XviewerWindowMode for details.

#### Parameters

window | An XviewerWindow. |

#### Returns

An XviewerWindowMode.

### xviewer_window_set_mode ()

    void
    xviewer_window_set_mode (XviewerWindow *window,
                             XviewerWindowMode mode);

Changes the mode of `window` to normal, fullscreen, or slideshow. See XviewerWindowMode for details.

#### Parameters

window | an XviewerWindow. |
mode | an XviewerWindowMode value. |

### xviewer_window_get_ui_manager ()

    GtkUIManager *
    xviewer_window_get_ui_manager (XviewerWindow *window);

Gets the GtkUIManager that describes the UI of `window` .

#### Parameters

window | An XviewerWindow. |

#### Returns

A GtkUIManager.

[transfer none]

### xviewer_window_get_store ()

    XviewerListStore *
    xviewer_window_get_store (XviewerWindow *window);

Gets the XviewerListStore that contains the images in the gallery of `window` .

#### Parameters

window | An XviewerWindow. |

#### Returns

an XviewerListStore.

[transfer none]

### xviewer_window_get_view ()

    GtkWidget *
    xviewer_window_get_view (XviewerWindow *window);

Gets the XviewerScrollView in the window.

#### Parameters

window | An XviewerWindow. |

#### Returns

the XviewerScrollView.

[transfer none]

### xviewer_window_get_sidebar ()

    GtkWidget *
    xviewer_window_get_sidebar (XviewerWindow *window);

Gets the sidebar widget of `window` .

#### Parameters

window | An XviewerWindow. |

#### Returns

the XviewerSidebar.

[transfer none]

### xviewer_window_get_thumb_view ()

    GtkWidget *
    xviewer_window_get_thumb_view (XviewerWindow *window);

Gets the thumbnails view in `window` .

#### Parameters

window | an XviewerWindow. |

#### Returns

an XviewerThumbView.

[transfer none]

### xviewer_window_get_thumb_nav ()

    GtkWidget *
    xviewer_window_get_thumb_nav (XviewerWindow *window);

Gets the thumbnails navigation pane in `window` .

#### Parameters

window | an XviewerWindow. |

#### Returns

an XviewerThumbNav.

[transfer none]

### xviewer_window_get_statusbar ()

    GtkWidget *
    xviewer_window_get_statusbar (XviewerWindow *window);

Gets the statusbar in `window` .

#### Parameters

window | an XviewerWindow. |

#### Returns

a XviewerStatusbar.

[transfer none]

### xviewer_window_get_image ()

    XviewerImage *
    xviewer_window_get_image (XviewerWindow *window);

Gets the image currently displayed in `window` or `NULL` if no image is being displayed.

#### Parameters

window | an XviewerWindow. |

#### Returns

an XviewerImage.

[transfer none]

### xviewer_window_open_file_list ()

    void
    xviewer_window_open_file_list (XviewerWindow *window,
                                   GSList *file_list);

Opens a list of files, adding them to the gallery in `window` . Files will be checked to be readable and later filtered according with `xviewer_list_store_add_files()`.

#### Parameters

window | An XviewerWindow. |
file_list | A `NULL`-terminated list of GFile's. | [element-type GFile]

### xviewer_window_is_empty ()

    gboolean
    xviewer_window_is_empty (XviewerWindow *window);

Tells whether `window` is currently empty or not.

#### Parameters

window | an XviewerWindow. |

#### Returns

`TRUE` if `window` has no images, `FALSE` otherwise.

### xviewer_window_reload_image ()

    void
    xviewer_window_reload_image (XviewerWindow *window);

## Types and Values

### XVIEWER_WINDOW_ERROR

    #define XVIEWER_WINDOW_ERROR           (xviewer_window_error_quark ())

### enum XviewerWindowGalleryPos

#### Members

XVIEWER_WINDOW_GALLERY_POS_BOTTOM |  |
XVIEWER_WINDOW_GALLERY_POS_LEFT |  |
XVIEWER_WINDOW_GALLERY_POS_TOP |  |
XVIEWER_WINDOW_GALLERY_POS_RIGHT |  |

### enum XviewerWindowMode

#### Members

XVIEWER_WINDOW_MODE_UNKNOWN |  |
XVIEWER_WINDOW_MODE_NORMAL |  |
XVIEWER_WINDOW_MODE_FULLSCREEN |  |
XVIEWER_WINDOW_MODE_SLIDESHOW |  |

### enum XviewerWindowError

#### Members

XVIEWER_WINDOW_ERROR_CONTROL_NOT_FOUND |  |
XVIEWER_WINDOW_ERROR_UI_NOT_FOUND |  |
XVIEWER_WINDOW_ERROR_NO_PERSIST_FILE_INTERFACE |  |
XVIEWER_WINDOW_ERROR_IO |  |
XVIEWER_WINDOW_ERROR_TRASH_NOT_FOUND |  |
XVIEWER_WINDOW_ERROR_GENERIC |  |
XVIEWER_WINDOW_ERROR_UNKNOWN |  |

### enum XviewerStartupFlags

#### Members

XVIEWER_STARTUP_FULLSCREEN |  |
XVIEWER_STARTUP_SLIDE_SHOW |  |
XVIEWER_STARTUP_DISABLE_GALLERY |  |
XVIEWER_STARTUP_SINGLE_WINDOW |  |

### struct XviewerWindow

    struct XviewerWindow {
    	GtkApplicationWindow win;

    	XviewerWindowPrivate *priv;
    };