Data Structures | Macros | Typedefs | Enumerations | Functions
gntwindow.h File Reference
GNT (GLib Ncurses Toolkit)

Window API. More...

`#include "gnt.h"`
`#include "gntbox.h"`
`#include "gntcolors.h"`
`#include "gntkeys.h"`
`#include "gntmenu.h"`

Go to the source code of this file.

## Data Structures
struct | _GntWindow
struct | _GntWindowClass

## Macros
#define | GNT_TYPE_WINDOW (gnt_window_get_gtype())
#define | GNT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WINDOW, GntWindow))
#define | GNT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WINDOW, GntWindowClass))
#define | GNT_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WINDOW))
#define | GNT_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WINDOW))
#define | GNT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WINDOW, GntWindowClass))
#define | GNT_WINDOW_FLAGS(obj) (GNT_WINDOW(obj)->priv.flags)
#define | GNT_WINDOW_SET_FLAGS(obj, flags) (GNT_WINDOW_FLAGS(obj) |= flags)
#define | GNT_WINDOW_UNSET_FLAGS(obj, flags) (GNT_WINDOW_FLAGS(obj) &= ~(flags))
#define | gnt_vwindow_new(homo) gnt_window_box_new(homo, TRUE)
#define | gnt_hwindow_new(homo) gnt_window_box_new(homo, FALSE)

## Typedefs
typedef struct _GntWindow | GntWindow
typedef struct _GntWindowPriv | GntWindowPriv
typedef struct _GntWindowClass | GntWindowClass

## Enumerations
enum | GntWindowFlags { GNT_WINDOW_MAXIMIZE_X = 1 << 0, GNT_WINDOW_MAXIMIZE_Y = 1 << 1 }

## Functions
G_BEGIN_DECLS GType | gnt_window_get_gtype (void)
GntWidget * | gnt_window_new (void)
| Create a new window. More...
GntWidget * | gnt_window_box_new (gboolean homo, gboolean vert)
| Create a new window. More...
void | gnt_window_set_menu (GntWindow *window, GntMenu *menu)
| Set the menu for a window. More...
const char * | gnt_window_get_accel_item (GntWindow *window, const char *key)
| Return the id of a menuitem specified to a keystroke. More...
void | gnt_window_set_maximize (GntWindow *window, GntWindowFlags maximize)
| Maximize a window, either horizontally or vertically, or both. More...
GntWindowFlags | gnt_window_get_maximize (GntWindow *window)
| Get the maximization state of a window. More...
void | gnt_window_workspace_hiding (GntWindow *)
void | gnt_window_workspace_showing (GntWindow *)

## Detailed Description

Window API.

Definition in file gntwindow.h.

## Function Documentation

## ◆ gnt_window_box_new()

GntWidget* gnt_window_box_new | ( | gboolean | homo,
|  | gboolean | vert
| ) |  |

Create a new window.

Parameters

  homo | `TRUE` if the widgets inside the window should have the same dimensions.
  vert | `TRUE` if the widgets inside the window should be stacked vertically.

Returns
  The newly created window.

## ◆ gnt_window_get_accel_item()

const char* gnt_window_get_accel_item | ( | GntWindow * | window,
|  | const char * | key
| ) |  |

Return the id of a menuitem specified to a keystroke.

Parameters

  window | The window.
  key | The keystroke.

Returns
  The id of the menuitem bound to the keystroke, or `NULL`.

Since
  2.3.0

## ◆ gnt_window_get_gtype()

G_BEGIN_DECLS GType gnt_window_get_gtype | ( | void |  | ) |

Returns
  GType for GntWindow.

## ◆ gnt_window_get_maximize()

GntWindowFlags gnt_window_get_maximize | ( | GntWindow * | window | ) |

Get the maximization state of a window.

Parameters

  window | The window.

Returns
  The maximization state of the window.

Since
  2.3.0

## ◆ gnt_window_new()

GntWidget* gnt_window_new | ( | void |  | ) |

Create a new window.

Returns
  The newly created window.

## ◆ gnt_window_set_maximize()

void gnt_window_set_maximize | ( | GntWindow * | window,
|  | GntWindowFlags | maximize
| ) |  |

Maximize a window, either horizontally or vertically, or both.

Parameters

  window | The window to maximize.
  maximize | The maximization state of the window.

Since
  2.3.0

## ◆ gnt_window_set_menu()

void gnt_window_set_menu | ( | GntWindow * | window,
|  | GntMenu * | menu
| ) |  |

Set the menu for a window.

Parameters

  window | The window.
  menu | The menu for the window.