libgaminggear
Data Structures | Macros | Typedefs | Functions
gaminggear_text_dialog.h File Reference

Dialog for entering single line text. More...

Data Structures

struct  _GaminggearTextDialog
 

Macros

#define GAMINGGEAR_TEXT_DIALOG_TYPE   (gaminggear_text_dialog_get_type())
 
#define GAMINGGEAR_TEXT_DIALOG(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_TEXT_DIALOG_TYPE, GaminggearTextDialog))
 
#define IS_GAMINGGEAR_TEXT_DIALOG(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_TEXT_DIALOG_TYPE))
 

Typedefs

typedef struct _GaminggearTextDialog GaminggearTextDialog
 
typedef struct _GaminggearTextDialogPrivate GaminggearTextDialogPrivate
 

Functions

GType gaminggear_text_dialog_get_type (void)
 
gchar * gaminggear_text_dialog (GtkWindow *parent, gchar const *title, gchar const *caption, gchar const *text)
 Get user text. More...
 
gchar * gaminggear_text_dialog_run (GaminggearTextDialog *text_dialog)
 Run a text dialog. More...
 
GtkWidget * gaminggear_text_dialog_new (GtkWindow *parent, gchar const *title, gchar const *caption)
 Creates new text dialog. More...
 
gchar * gaminggear_text_dialog_get_text (GaminggearTextDialog *text_dialog)
 Gets user entered text. More...
 
void gaminggear_text_dialog_set_text (GaminggearTextDialog *text_dialog, gchar const *text)
 Set text of text dialog. More...
 
void gaminggear_text_dialog_set_title (GaminggearTextDialog *text_dialog, gchar const *title)
 Set title of text dialog. More...
 
void gaminggear_text_dialog_set_caption (GaminggearTextDialog *text_dialog, gchar const *caption)
 Set caption of text dialog. More...
 

Detailed Description

Dialog for entering single line text.

Pressing enter in text field behaves like pressing OK button.

Macro Definition Documentation

◆ GAMINGGEAR_TEXT_DIALOG

#define GAMINGGEAR_TEXT_DIALOG (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_TEXT_DIALOG_TYPE, GaminggearTextDialog))

◆ GAMINGGEAR_TEXT_DIALOG_TYPE

#define GAMINGGEAR_TEXT_DIALOG_TYPE   (gaminggear_text_dialog_get_type())

◆ IS_GAMINGGEAR_TEXT_DIALOG

#define IS_GAMINGGEAR_TEXT_DIALOG (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_TEXT_DIALOG_TYPE))

Typedef Documentation

◆ GaminggearTextDialog

◆ GaminggearTextDialogPrivate

typedef struct _GaminggearTextDialogPrivate GaminggearTextDialogPrivate

Function Documentation

◆ gaminggear_text_dialog()

gchar* gaminggear_text_dialog ( GtkWindow *  parent,
gchar const *  title,
gchar const *  caption,
gchar const *  text 
)

Get user text.

Convenience function that creates, runs and destroys a text dialog.

Parameters
parentParent window or NULL.
titleTitle of dialog.
captionCaption of dialog.
textText shown in entry field or NULL for empty field.
Return values
textUser entered text that has to be freed with g_free() or NULL.
Since
1.0

◆ gaminggear_text_dialog_get_text()

gchar* gaminggear_text_dialog_get_text ( GaminggearTextDialog text_dialog)

Gets user entered text.

Parameters
text_dialogA text dialog.
Return values
textUser entered text that has to be freed with g_free() or NULL.
Since
1.0

◆ gaminggear_text_dialog_get_type()

GType gaminggear_text_dialog_get_type ( void  )

◆ gaminggear_text_dialog_new()

GtkWidget* gaminggear_text_dialog_new ( GtkWindow *  parent,
gchar const *  title,
gchar const *  caption 
)

Creates new text dialog.

Parameters
parentParent window or NULL.
titleTitle of dialog.
captionCaption of dialog.
Return values
widgetThe text dialog.
Since
1.0

◆ gaminggear_text_dialog_run()

gchar* gaminggear_text_dialog_run ( GaminggearTextDialog text_dialog)

Run a text dialog.

Parameters
text_dialogA text dialog.
Return values
textUser entered text that has to be freed with g_free() or NULL.
Since
1.0

◆ gaminggear_text_dialog_set_caption()

void gaminggear_text_dialog_set_caption ( GaminggearTextDialog text_dialog,
gchar const *  caption 
)

Set caption of text dialog.

Parameters
text_dialogA text dialog.
captionThe new caption text.
Since
1.0

◆ gaminggear_text_dialog_set_text()

void gaminggear_text_dialog_set_text ( GaminggearTextDialog text_dialog,
gchar const *  text 
)

Set text of text dialog.

Presets the text shown in the entry field.

Parameters
text_dialogA text dialog.
textThe new text shown in entry field.
Since
1.0

◆ gaminggear_text_dialog_set_title()

void gaminggear_text_dialog_set_title ( GaminggearTextDialog text_dialog,
gchar const *  title 
)

Set title of text dialog.

Parameters
text_dialogA text dialog.
titleThe new title text.
Since
1.0