contentLister/inc/gtkErrorScreen.h File Reference

error screen - GTK widget used to inform the user an error has occured this widget contains an image and some explenation text More...

#include <gtk/gtk.h>
#include <gdk/gdk.h>

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GtkErrorScreen
struct  _GtkErrorScreenClass

Defines

#define BOTTOM_TOP_BORDER   70
#define VBOX_TEXT_IMAGE_SPACING   50
#define VBOX_BORDER   20
#define ERROR_IMAGE_MIN_WIDTH   400
#define ERROR_IMAGE_MIN_HEIGHT   350
#define ERROR_DESCRIPTION_WIDTH   600
#define GTK_ERROR_SCREEN_TYPE   (gtk_error_screen_get_type ())
#define GTK_ERROR_SCREEN(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_ERROR_SCREEN_TYPE, GtkErrorScreen))
#define GTK_ERROR_SCREEN_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_ERROR_SCREEN_TYPE, GtkErrorScreenClass))
#define IS_GTK_ERROR_SCREEN(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_ERROR_SCREEN_TYPE))
#define IS_GTK_ERROR_SCREEN_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_ERROR_SCREEN_TYPE))

Typedefs

typedef struct _GtkErrorScreen GtkErrorScreen
typedef struct _GtkErrorScreenClass GtkErrorScreenClass

Enumerations

enum  ctrlErrorType_e {
  ctrlNoError = 0, ctrlScanTooManyItemsError, ctrlScanFailedError, ctrlContentNotAvailableError,
  ctrlUnkownError, ctrlNoNetworkConfiguredError, ctrlConnectedUSBError, ctrlExportingDevUnavailError,
  ctrlBatteryLowError, ctrlSystemShutdownError
}
enum  ctrlErrorIcon_e {
  ctrlWarningIcon = 0, ctrlErrorIcon, ctrlInfoIcon, ctrlProhibitedIcon,
  ctrlDontDisconnectNWIcon, ctrlBatteryLowIcon, ctrlSystemShutdownIcon, ctrlLastIcon
}

Functions

GtkWidget * gtk_error_screen_new ()
GType gtk_error_screen_get_type (void)
void gtk_error_screen_set_text (GtkErrorScreen *screen, const gchar *text)
void gtk_error_screen_set_image (GtkErrorScreen *error_screen, ctrlErrorIcon_e icon)


Detailed Description

error screen - GTK widget used to inform the user an error has occured this widget contains an image and some explenation text

<File description>="">

Definition in file gtkErrorScreen.h.


Define Documentation

#define BOTTOM_TOP_BORDER   70

Definition at line 65 of file gtkErrorScreen.h.

#define ERROR_DESCRIPTION_WIDTH   600

Definition at line 70 of file gtkErrorScreen.h.

#define ERROR_IMAGE_MIN_HEIGHT   350

Definition at line 69 of file gtkErrorScreen.h.

#define ERROR_IMAGE_MIN_WIDTH   400

Definition at line 68 of file gtkErrorScreen.h.

#define GTK_ERROR_SCREEN ( obj   )     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_ERROR_SCREEN_TYPE, GtkErrorScreen))

Definition at line 78 of file gtkErrorScreen.h.

#define GTK_ERROR_SCREEN_CLASS ( klass   )     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_ERROR_SCREEN_TYPE, GtkErrorScreenClass))

Definition at line 79 of file gtkErrorScreen.h.

#define GTK_ERROR_SCREEN_TYPE   (gtk_error_screen_get_type ())

Definition at line 77 of file gtkErrorScreen.h.

#define IS_GTK_ERROR_SCREEN ( obj   )     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_ERROR_SCREEN_TYPE))

Definition at line 80 of file gtkErrorScreen.h.

#define IS_GTK_ERROR_SCREEN_CLASS ( klass   )     (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_ERROR_SCREEN_TYPE))

Definition at line 81 of file gtkErrorScreen.h.

#define VBOX_BORDER   20

Definition at line 67 of file gtkErrorScreen.h.

#define VBOX_TEXT_IMAGE_SPACING   50

Definition at line 66 of file gtkErrorScreen.h.


Typedef Documentation

Definition at line 83 of file gtkErrorScreen.h.

Definition at line 84 of file gtkErrorScreen.h.


Enumeration Type Documentation

Enumerator:
ctrlWarningIcon 
ctrlErrorIcon 
ctrlInfoIcon 
ctrlProhibitedIcon 
ctrlDontDisconnectNWIcon 
ctrlBatteryLowIcon 
ctrlSystemShutdownIcon 
ctrlLastIcon 

Definition at line 53 of file gtkErrorScreen.h.

Enumerator:
ctrlNoError 
ctrlScanTooManyItemsError 
ctrlScanFailedError 
ctrlContentNotAvailableError 
ctrlUnkownError 
ctrlNoNetworkConfiguredError 
ctrlConnectedUSBError 
ctrlExportingDevUnavailError 
ctrlBatteryLowError 
ctrlSystemShutdownError 

Definition at line 39 of file gtkErrorScreen.h.


Function Documentation

GType gtk_error_screen_get_type ( void   ) 

returns type of GtkErrorScreen widget

Returns:
type

Definition at line 78 of file gtkErrorScreen.c.

00079 {
00080     static GType error_screen_type = 0;
00081 
00082     if (!error_screen_type)
00083     {
00084         static const GTypeInfo error_screen_info = {
00085             sizeof(GtkErrorScreenClass),
00086             NULL,               /* base_init */
00087             NULL,               /* base_finalize */
00088             (GClassInitFunc) gtk_error_screen_class_init,
00089             NULL,               /* class_finalize */
00090             NULL,               /* class_data */
00091             sizeof(GtkErrorScreen),
00092             0,                  /* n_preallocs */
00093             (GInstanceInitFunc) gtk_error_screen_init,
00094         };
00095 
00096         error_screen_type = g_type_register_static(GTK_TYPE_EVENT_BOX, "ErrorScreen", &error_screen_info, 0);
00097     }
00098     return error_screen_type;
00099 }

Here is the call graph for this function:

GtkWidget* gtk_error_screen_new (  ) 

creates a new GtkErrorScreen widget

Parameters:
- 
Returns:
reference to created widget

Definition at line 66 of file gtkErrorScreen.c.

00067 {
00068     GtkErrorScreen *errorScreen;
00069 
00070     errorScreen = (GtkErrorScreen *) g_object_new(GTK_ERROR_SCREEN_TYPE, NULL);
00071 
00072     CL_LOGPRINTF("error screen 0x%x", (unsigned int) errorScreen);
00073 
00074     return GTK_WIDGET(errorScreen);
00075 }

void gtk_error_screen_set_image ( GtkErrorScreen error_screen,
ctrlErrorIcon_e  icon 
)

Set thumb of GtkErrorScreen widget

Parameters:
item the GtkErrorScreen widget
location of the image
Returns:
-

Definition at line 232 of file gtkErrorScreen.c.

00233 {
00234     g_return_if_fail(IS_GTK_ERROR_SCREEN(error_screen));
00235 
00236     error_screen->pixmap = error_screen_get_image(icon);
00237     gtk_image_set_from_pixbuf(GTK_IMAGE(error_screen->image), error_screen->pixmap);
00238     //gtk_widget_show(GTK_WIDGET(error_screen->image));
00239     return;
00240 }

Here is the call graph for this function:

void gtk_error_screen_set_text ( GtkErrorScreen screen,
const gchar *  text 
)

Set text of GtkErrorScreen widget

Parameters:
item the GtkListItem widget
text 
Returns:
-

Definition at line 222 of file gtkErrorScreen.c.

00223 {
00224     g_return_if_fail(IS_GTK_ERROR_SCREEN(error_screen));
00225     g_return_if_fail(text != NULL);
00226 
00227     CL_LOGPRINTF("text %s", text);
00228 
00229     gtk_label_set_text(GTK_LABEL(error_screen->text), text);
00230 }


Generated on Sun Dec 14 17:12:53 2008 by  doxygen 1.5.6