wmi

git clone git://oldgit.suckless.org/wmi/
Log | Files | Refs | LICENSE

draw.h (3731B)


      1 // Copyright (c) 2003 - 2009 Anselm R Garbe <anselm@garbe.us>
      2 // See LICENSE for license details.
      3 
      4 #ifndef __DRAW_H
      5 #define __DRAW_H
      6 
      7 extern "C" {
      8 #include <X11/Xlib.h>
      9 }
     10 
     11 class Light;
     12 class Rectangle;
     13 
     14 /**
     15  * Main class of all low-level drawing methods used by WMI.
     16  */
     17 class Draw {
     18 
     19 public:
     20 
     21     static void drawMenuButton(Window window, GC gc, Rectangle *rect,
     22                          unsigned long background, unsigned long shineBorder,
     23                          unsigned long shadowBorder, unsigned long shineFigure,
     24                          unsigned long shadowFigure);
     25 
     26     static void drawDetachButton(Window window, GC gc, Rectangle *rect,
     27                          unsigned long background,
     28                          unsigned long shineBorder, unsigned long shadowBorder,
     29                          unsigned long shineFigure, unsigned long shadowFigure);
     30 
     31     static void drawMaxButton(Window window, GC gc, Rectangle *rect,
     32                          unsigned long background,
     33                          unsigned long shineBorder, unsigned long shadowBorder,
     34                          unsigned long shineFigure, unsigned long shadowFigure,
     35                          bool fill = false);
     36 
     37     static void drawFloatButton(Window window, GC gc, Rectangle *rect,
     38                          unsigned long background,
     39                          unsigned long shineBorder, unsigned long shadowBorder,
     40                          unsigned long shineFigure, unsigned long shadowFigure,
     41                          bool fill = false);
     42 
     43     static void drawCloseButton(Window window, GC gc, Rectangle *rect,
     44                          unsigned long background,
     45                          unsigned long shineBorder, unsigned long shadowBorder,
     46                          unsigned long shineFigure, unsigned long shadowFigure);
     47 
     48     static void drawInputModeButton(Window window, GC gc, Rectangle *rect,
     49                          unsigned long background,
     50                          unsigned long shineBorder, unsigned long shadowBorder,
     51                          unsigned long shineFigure, unsigned long shadowFigure);
     52 
     53     static void drawMeter(Window window, GC gc, Rectangle *rect,
     54                           unsigned int percentage, unsigned long background,
     55                           unsigned long highFigure, unsigned long normalFigure,
     56                           unsigned long lowFigure, unsigned long shineBorder,
     57                           unsigned long shadowBorder);
     58 
     59     static void drawBorder(Window window, GC commonGC, GC borderGC, Rectangle *rect,
     60                          unsigned long background, unsigned long shine,
     61                          unsigned long shadow, unsigned int titleBarHeight,
     62                          unsigned int borderWidth);
     63 
     64     static void drawFloatBorderAnchors(Window window, GC gc, Rectangle *rect,
     65                          unsigned long shine, unsigned long shadow,
     66                          unsigned int titleBarHeight, unsigned int borderWidth);
     67 
     68     static void drawShineBorder(Window window, GC gc, Rectangle *rect,
     69                          unsigned long shine);
     70 
     71     static void drawShadowBorder(Window window, GC gc, Rectangle *rect,
     72                          unsigned long shadow);
     73 
     74     static void drawRectBorder(Window window, GC gc, Rectangle *rect,
     75                          unsigned long shine, unsigned long shadow);
     76 
     77     static void drawStickyNotifier(Window window, GC gc, Rectangle *rect,
     78                          unsigned long shine, unsigned long shadow,
     79                          unsigned int textWidth);
     80 
     81     static void drawTransRectangle(Window window, GC gc,
     82                           Rectangle *rect, unsigned int barHeight,
     83                           unsigned int borderWidth);
     84 };
     85 
     86 #endif // __DRAW_H