mutter/clutter/cltr-overlay.c

66 lines
1.1 KiB
C
Raw Normal View History

2005-04-22 18:03:55 +00:00
#include "cltr-overlay.h"
#include "cltr-private.h"
struct CltrOverlay
{
2005-05-06 17:41:15 +00:00
CltrWidget widget;
2005-04-22 18:03:55 +00:00
};
static void
cltr_overlay_show(CltrWidget *widget);
static gboolean
cltr_overlay_handle_xevent (CltrWidget *widget, XEvent *xev);
static void
cltr_overlay_paint(CltrWidget *widget);
CltrWidget*
cltr_overlay_new(int width, int height)
{
CltrOverlay *overlay;
overlay = g_malloc0(sizeof(CltrOverlay));
overlay->widget.width = width;
overlay->widget.height = height;
overlay->widget.show = cltr_overlay_show;
overlay->widget.paint = cltr_overlay_paint;
overlay->widget.xevent_handler = cltr_overlay_handle_xevent;
return CLTR_WIDGET(overlay);
}
static void
cltr_overlay_show(CltrWidget *widget)
{
}
static gboolean
cltr_overlay_handle_xevent (CltrWidget *widget, XEvent *xev)
{
}
static void
cltr_overlay_paint(CltrWidget *widget)
{
2005-05-06 17:41:15 +00:00
glEnable(GL_BLEND);
2005-04-22 18:03:55 +00:00
2005-05-06 17:41:15 +00:00
glColor4f(0.5, 0.5, 0.5, 1.0);
cltr_glu_rounded_rect(widget->x,
widget->y,
widget->x + widget->width,
widget->y + widget->height,
widget->width/30,
NULL);
glDisable(GL_BLEND);
2005-04-22 18:03:55 +00:00
}