"Fossies" - the Fresh Open Source Software Archive

Member "procmeter3-3.6+svn387/gtk2/widgets/PMGeneric.h" (24 Dec 2010, 3163 Bytes) of package /linux/misc/procmeter3-3.6+svn387.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "PMGeneric.h" see the Fossies "Dox" file reference documentation.

    1 /***************************************
    2   $Header: /home/amb/CVS/procmeter3/gtk2/widgets/PMGeneric.h,v 1.1 2007-09-19 19:04:59 amb Exp $
    3 
    4   ProcMeter Generic Widget include file (for ProcMeter 3.3).
    5   ******************/ /******************
    6   Written by Andrew M. Bishop
    7 
    8   This file Copyright 1996,98,2000 Andrew M. Bishop
    9   It may be distributed under the GNU Public License, version 2, or
   10   any higher version.  See section COPYING of the GNU Public license
   11   for conditions under which this file may be redistributed.
   12   ***************************************/
   13 
   14 
   15 #ifndef PMGENERIC_H
   16 #define PMGENERIC_H    /*+ To stop multiple inclusions. +*/
   17 
   18 #include <gdk/gdk.h>
   19 #include <gtk/gtkadjustment.h>
   20 #include <gtk/gtkwidget.h>
   21 
   22 
   23 #define GTK_TYPE_PROCMETERGENERIC          (gtk_procmetergeneric_get_type())
   24 #define GTK_PROCMETERGENERIC(obj)          GTK_CHECK_CAST((obj),GTK_TYPE_PROCMETERGENERIC,ProcMeterGeneric)
   25 #define GTK_PROCMETERGENERIC_CLASS(klass)  GTK_CHECK_CLASS_CAST((klass),GTK_TYPE_PROCMETERGENERIC,ProcMeterGenericClass)
   26 #define GTK_IS_PROCMETERGENERIC(obj)       GTK_CHECK_TYPE((obj),GTK_TYPE_PROCMETERGENERIC)
   27 
   28 
   29 typedef struct _ProcMeterGeneric       ProcMeterGeneric;
   30 typedef struct _ProcMeterGenericClass  ProcMeterGenericClass;
   31 
   32 
   33 struct _ProcMeterGeneric
   34 {
   35  GtkWidget       widget;
   36 
   37  GdkColor        body_bg_color;    /*+ The body background colour. +*/
   38  gboolean        body_bg_set;      /*+ A flag to indicate if the background has been set. +*/
   39  GdkColor        body_fg_color;    /*+ The body foreground colour. +*/
   40  GdkGC*          body_gc;          /*+ The graphics context for the body. +*/
   41  gushort         body_height;      /*+ The height of the body part. +*/
   42  gushort         body_start;       /*+ The start position of the body part. +*/
   43 
   44  gchar*          label_string;     /*+ The label for the Widget. +*/
   45  GdkColor        label_color;      /*+ The label colour. +*/
   46  GdkGC*          label_gc;         /*+ The graphics context for the label. +*/
   47  gint            label_pos;        /*+ The position of the label. +*/
   48  GdkFont*        label_font;       /*+ The font for the label. +*/
   49  gushort         label_height;     /*+ The height of the label. +*/
   50  gushort         label_x,label_y;  /*+ The position of the label. +*/
   51 };
   52 
   53 struct _ProcMeterGenericClass
   54 {
   55  GtkWidgetClass parent_class;
   56 
   57  void (*resize)(ProcMeterGeneric *pmw);
   58  void (*update)(ProcMeterGeneric *pmw);
   59 };
   60 
   61 guint      gtk_procmetergeneric_get_type(void);
   62 GtkWidget* gtk_procmetergeneric_new(void);
   63 
   64 
   65 /* The options for label placement */
   66 
   67 #define ProcMeterLabelTop     1
   68 #define ProcMeterLabelNone    0
   69 #define ProcMeterLabelBottom -1
   70 
   71 
   72 /* Public functions */
   73 
   74 void ProcMeterGenericSetForegroundColour(ProcMeterGeneric *pmw,GdkColor body_fg_color);
   75 void ProcMeterGenericSetBackgroundColour(ProcMeterGeneric *pmw,GdkColor body_bg_color);
   76 void ProcMeterGenericSetLabelColour(ProcMeterGeneric *pmw,GdkColor label_color);
   77 
   78 void ProcMeterGenericSetLabelPosition(ProcMeterGeneric *pmw,int label_position);
   79 void ProcMeterGenericSetLabelFont(ProcMeterGeneric *pmw,GdkFont *font);
   80 void ProcMeterGenericSetLabel(ProcMeterGeneric *pmw,gchar *label);
   81 
   82 #endif /* PMGENERIC_H */