2003-09-17 07:44:49 +00:00
|
|
|
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
|
2003-09-17 07:32:52 +00:00
|
|
|
|
|
|
|
frame.c for the Openbox window manager
|
2006-08-22 16:37:35 +00:00
|
|
|
Copyright (c) 2006 Mikael Magnusson
|
2007-03-12 05:25:34 +00:00
|
|
|
Copyright (c) 2003-2007 Dana Jansens
|
2003-09-17 07:32:52 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
See the COPYING file for a copy of the GNU General Public License.
|
|
|
|
*/
|
|
|
|
|
2003-03-16 21:11:39 +00:00
|
|
|
#include "frame.h"
|
2003-07-10 07:16:19 +00:00
|
|
|
#include "client.h"
|
2003-04-13 07:18:28 +00:00
|
|
|
#include "openbox.h"
|
|
|
|
#include "extensions.h"
|
2003-09-24 17:17:59 +00:00
|
|
|
#include "prop.h"
|
2003-07-30 16:25:08 +00:00
|
|
|
#include "config.h"
|
2003-04-13 07:18:28 +00:00
|
|
|
#include "framerender.h"
|
2003-09-01 02:57:19 +00:00
|
|
|
#include "mainloop.h"
|
2003-10-09 19:18:20 +00:00
|
|
|
#include "focus.h"
|
2003-09-17 06:44:04 +00:00
|
|
|
#include "moveresize.h"
|
2003-04-13 07:18:28 +00:00
|
|
|
#include "render/theme.h"
|
|
|
|
|
2007-04-23 02:02:34 +00:00
|
|
|
#define PLATE_EVENTMASK (SubstructureRedirectMask | ButtonPressMask | \
|
|
|
|
FocusChangeMask)
|
2003-04-13 07:18:28 +00:00
|
|
|
#define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
|
2007-04-24 00:00:11 +00:00
|
|
|
ButtonPressMask | ButtonReleaseMask)
|
2003-04-13 07:18:28 +00:00
|
|
|
#define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
|
2007-04-24 01:16:33 +00:00
|
|
|
ButtonMotionMask | \
|
2003-07-28 19:21:45 +00:00
|
|
|
EnterWindowMask | LeaveWindowMask)
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
#define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
|
2004-03-21 01:03:00 +00:00
|
|
|
f->cbwidth_y)
|
2003-07-10 07:16:19 +00:00
|
|
|
|
|
|
|
static void layout_title(ObFrame *self);
|
2003-09-01 04:30:59 +00:00
|
|
|
static void flash_done(gpointer data);
|
|
|
|
static gboolean flash_timeout(gpointer data);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-09-03 18:11:39 +00:00
|
|
|
static void set_theme_statics(ObFrame *self);
|
|
|
|
static void free_theme_statics(ObFrame *self);
|
|
|
|
|
2007-03-02 06:01:16 +00:00
|
|
|
static Window createWindow(Window parent, Visual *visual,
|
|
|
|
gulong mask, XSetWindowAttributes *attrib)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
return XCreateWindow(ob_display, parent, 0, 0, 1, 1, 0,
|
2007-03-02 06:01:16 +00:00
|
|
|
(visual ? 32 : RrDepth(ob_rr_inst)), InputOutput,
|
|
|
|
(visual ? visual : RrVisual(ob_rr_inst)),
|
|
|
|
mask, attrib);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2007-03-02 06:01:16 +00:00
|
|
|
static Visual *check_32bit_client(ObClient *c)
|
|
|
|
{
|
|
|
|
XWindowAttributes wattrib;
|
|
|
|
Status ret;
|
|
|
|
|
|
|
|
ret = XGetWindowAttributes(ob_display, c->window, &wattrib);
|
|
|
|
g_assert(ret != BadDrawable);
|
|
|
|
g_assert(ret != BadWindow);
|
|
|
|
|
|
|
|
if (wattrib.depth == 32)
|
|
|
|
return wattrib.visual;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ObFrame *frame_new(ObClient *client)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
XSetWindowAttributes attrib;
|
2003-10-15 03:59:35 +00:00
|
|
|
gulong mask;
|
2003-07-10 07:16:19 +00:00
|
|
|
ObFrame *self;
|
2007-03-02 06:01:16 +00:00
|
|
|
Visual *visual;
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-09-24 17:17:59 +00:00
|
|
|
self = g_new0(ObFrame, 1);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2007-03-02 06:01:16 +00:00
|
|
|
visual = check_32bit_client(client);
|
|
|
|
|
|
|
|
/* create the non-visible decor windows */
|
|
|
|
|
2003-12-22 18:16:47 +00:00
|
|
|
mask = CWEventMask;
|
2007-03-02 06:01:16 +00:00
|
|
|
if (visual) {
|
|
|
|
/* client has a 32-bit visual */
|
|
|
|
mask |= CWColormap | CWBackPixel | CWBorderPixel;
|
|
|
|
/* create a colormap with the visual */
|
|
|
|
self->colormap = attrib.colormap =
|
|
|
|
XCreateColormap(ob_display,
|
|
|
|
RootWindow(ob_display, ob_screen),
|
|
|
|
visual, AllocNone);
|
|
|
|
attrib.background_pixel = BlackPixel(ob_display, 0);
|
|
|
|
attrib.border_pixel = BlackPixel(ob_display, 0);
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
attrib.event_mask = FRAME_EVENTMASK;
|
2007-03-02 06:01:16 +00:00
|
|
|
self->window = createWindow(RootWindow(ob_display, ob_screen), visual,
|
2003-07-10 19:01:41 +00:00
|
|
|
mask, &attrib);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2007-04-24 00:00:11 +00:00
|
|
|
attrib.event_mask = ELEMENT_EVENTMASK;
|
|
|
|
self->inner = createWindow(self->window, visual, mask, &attrib);
|
|
|
|
|
|
|
|
mask &= ~CWEventMask;
|
|
|
|
self->plate = createWindow(self->inner, visual, mask, &attrib);
|
|
|
|
|
2007-03-02 06:01:16 +00:00
|
|
|
/* create the visible decor windows */
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2007-04-24 00:07:28 +00:00
|
|
|
mask = CWEventMask;
|
2007-03-02 06:01:16 +00:00
|
|
|
if (visual) {
|
|
|
|
/* client has a 32-bit visual */
|
|
|
|
mask |= CWColormap | CWBackPixel | CWBorderPixel;
|
|
|
|
attrib.colormap = RrColormap(ob_rr_inst);
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
attrib.event_mask = ELEMENT_EVENTMASK;
|
2007-03-02 06:01:16 +00:00
|
|
|
self->title = createWindow(self->window, NULL, mask, &attrib);
|
2003-08-02 06:40:01 +00:00
|
|
|
|
|
|
|
mask |= CWCursor;
|
|
|
|
attrib.cursor = ob_cursor(OB_CURSOR_NORTHWEST);
|
2007-03-08 01:26:03 +00:00
|
|
|
self->tltresize = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->tllresize = createWindow(self->title, NULL, mask, &attrib);
|
2003-08-02 06:40:01 +00:00
|
|
|
attrib.cursor = ob_cursor(OB_CURSOR_NORTHEAST);
|
2007-03-08 01:26:03 +00:00
|
|
|
self->trtresize = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->trrresize = createWindow(self->title, NULL, mask, &attrib);
|
2003-08-02 06:40:01 +00:00
|
|
|
|
|
|
|
mask &= ~CWCursor;
|
2007-03-02 06:01:16 +00:00
|
|
|
self->label = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->max = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->close = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->desk = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->shade = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->icon = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->iconify = createWindow(self->title, NULL, mask, &attrib);
|
|
|
|
self->handle = createWindow(self->window, NULL, mask, &attrib);
|
2003-08-02 06:40:01 +00:00
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
mask |= CWCursor;
|
2003-07-10 06:18:47 +00:00
|
|
|
attrib.cursor = ob_cursor(OB_CURSOR_SOUTHWEST);
|
2007-03-02 06:01:16 +00:00
|
|
|
self->lgrip = createWindow(self->handle, NULL, mask, &attrib);
|
2003-07-10 06:18:47 +00:00
|
|
|
attrib.cursor = ob_cursor(OB_CURSOR_SOUTHEAST);
|
2007-03-02 06:01:16 +00:00
|
|
|
self->rgrip = createWindow(self->handle, NULL, mask, &attrib);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-04-25 19:55:41 +00:00
|
|
|
self->focused = FALSE;
|
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
/* the other stuff is shown based on decor settings */
|
|
|
|
XMapWindow(ob_display, self->plate);
|
2007-04-23 23:21:47 +00:00
|
|
|
XMapWindow(ob_display, self->inner);
|
2003-04-13 07:18:28 +00:00
|
|
|
XMapWindow(ob_display, self->lgrip);
|
|
|
|
XMapWindow(ob_display, self->rgrip);
|
|
|
|
XMapWindow(ob_display, self->label);
|
|
|
|
|
2003-09-03 18:11:39 +00:00
|
|
|
self->max_press = self->close_press = self->desk_press =
|
2004-03-21 01:03:00 +00:00
|
|
|
self->iconify_press = self->shade_press = FALSE;
|
2003-09-03 18:11:39 +00:00
|
|
|
self->max_hover = self->close_hover = self->desk_hover =
|
2004-03-21 01:03:00 +00:00
|
|
|
self->iconify_hover = self->shade_hover = FALSE;
|
2003-09-03 18:11:39 +00:00
|
|
|
|
|
|
|
set_theme_statics(self);
|
|
|
|
|
|
|
|
return (ObFrame*)self;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void set_theme_statics(ObFrame *self)
|
|
|
|
{
|
2003-04-13 07:18:28 +00:00
|
|
|
/* set colors/appearance/sizes for stuff that doesn't change */
|
2003-10-11 06:47:29 +00:00
|
|
|
XSetWindowBorder(ob_display, self->window,
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
RrColorPixel(ob_rr_theme->frame_b_color));
|
2003-10-11 06:47:29 +00:00
|
|
|
XSetWindowBorder(ob_display, self->title,
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
RrColorPixel(ob_rr_theme->frame_b_color));
|
2003-10-11 06:47:29 +00:00
|
|
|
XSetWindowBorder(ob_display, self->handle,
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
RrColorPixel(ob_rr_theme->frame_b_color));
|
2003-10-11 06:47:29 +00:00
|
|
|
XSetWindowBorder(ob_display, self->rgrip,
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
RrColorPixel(ob_rr_theme->frame_b_color));
|
2003-10-11 06:47:29 +00:00
|
|
|
XSetWindowBorder(ob_display, self->lgrip,
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
RrColorPixel(ob_rr_theme->frame_b_color));
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-06-21 01:53:26 +00:00
|
|
|
XResizeWindow(ob_display, self->max,
|
|
|
|
ob_rr_theme->button_size, ob_rr_theme->button_size);
|
2003-04-13 07:18:28 +00:00
|
|
|
XResizeWindow(ob_display, self->iconify,
|
2003-06-21 01:53:26 +00:00
|
|
|
ob_rr_theme->button_size, ob_rr_theme->button_size);
|
2003-04-13 07:18:28 +00:00
|
|
|
XResizeWindow(ob_display, self->icon,
|
2003-06-21 01:53:26 +00:00
|
|
|
ob_rr_theme->button_size + 2, ob_rr_theme->button_size + 2);
|
2003-04-13 07:18:28 +00:00
|
|
|
XResizeWindow(ob_display, self->close,
|
2003-06-21 01:53:26 +00:00
|
|
|
ob_rr_theme->button_size, ob_rr_theme->button_size);
|
2003-04-13 07:18:28 +00:00
|
|
|
XResizeWindow(ob_display, self->desk,
|
2003-06-21 01:53:26 +00:00
|
|
|
ob_rr_theme->button_size, ob_rr_theme->button_size);
|
2003-04-13 07:18:28 +00:00
|
|
|
XResizeWindow(ob_display, self->shade,
|
2003-06-21 01:53:26 +00:00
|
|
|
ob_rr_theme->button_size, ob_rr_theme->button_size);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
if (ob_rr_theme->handle_height > 0) {
|
|
|
|
XResizeWindow(ob_display, self->lgrip,
|
|
|
|
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
|
|
|
|
XResizeWindow(ob_display, self->rgrip,
|
|
|
|
ob_rr_theme->grip_width, ob_rr_theme->handle_height);
|
|
|
|
}
|
2007-03-08 01:26:03 +00:00
|
|
|
XResizeWindow(ob_display, self->tltresize,
|
|
|
|
ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1);
|
|
|
|
XResizeWindow(ob_display, self->trtresize,
|
|
|
|
ob_rr_theme->grip_width, ob_rr_theme->paddingy + 1);
|
|
|
|
XResizeWindow(ob_display, self->tllresize,
|
|
|
|
ob_rr_theme->paddingx + 1, ob_rr_theme->title_height);
|
|
|
|
XResizeWindow(ob_display, self->trrresize,
|
|
|
|
ob_rr_theme->paddingx + 1, ob_rr_theme->title_height);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
/* set up the dynamic appearances */
|
2003-06-21 01:53:26 +00:00
|
|
|
self->a_unfocused_title = RrAppearanceCopy(ob_rr_theme->a_unfocused_title);
|
|
|
|
self->a_focused_title = RrAppearanceCopy(ob_rr_theme->a_focused_title);
|
|
|
|
self->a_unfocused_label = RrAppearanceCopy(ob_rr_theme->a_unfocused_label);
|
|
|
|
self->a_focused_label = RrAppearanceCopy(ob_rr_theme->a_focused_label);
|
|
|
|
self->a_unfocused_handle =
|
|
|
|
RrAppearanceCopy(ob_rr_theme->a_unfocused_handle);
|
|
|
|
self->a_focused_handle = RrAppearanceCopy(ob_rr_theme->a_focused_handle);
|
|
|
|
self->a_icon = RrAppearanceCopy(ob_rr_theme->a_icon);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-09-03 18:11:39 +00:00
|
|
|
static void free_theme_statics(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2003-06-21 00:42:47 +00:00
|
|
|
RrAppearanceFree(self->a_unfocused_title);
|
|
|
|
RrAppearanceFree(self->a_focused_title);
|
|
|
|
RrAppearanceFree(self->a_unfocused_label);
|
|
|
|
RrAppearanceFree(self->a_focused_label);
|
|
|
|
RrAppearanceFree(self->a_unfocused_handle);
|
|
|
|
RrAppearanceFree(self->a_focused_handle);
|
|
|
|
RrAppearanceFree(self->a_icon);
|
2003-09-03 18:11:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void frame_free(ObFrame *self)
|
|
|
|
{
|
|
|
|
free_theme_statics(self);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
XDestroyWindow(ob_display, self->window);
|
2007-03-02 06:01:16 +00:00
|
|
|
if (self->colormap)
|
|
|
|
XFreeColormap(ob_display, self->colormap);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
g_free(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_show(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
if (!self->visible) {
|
2003-10-02 04:21:37 +00:00
|
|
|
self->visible = TRUE;
|
2003-10-15 03:01:34 +00:00
|
|
|
XMapWindow(ob_display, self->client->window);
|
2003-10-02 04:21:37 +00:00
|
|
|
XMapWindow(ob_display, self->window);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_hide(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2007-03-24 23:19:45 +00:00
|
|
|
if (self->visible) {
|
|
|
|
self->visible = FALSE;
|
|
|
|
self->client->ignore_unmaps += 1;
|
|
|
|
/* we unmap the client itself so that we can get MapRequest
|
|
|
|
events, and because the ICCCM tells us to! */
|
|
|
|
XUnmapWindow(ob_display, self->window);
|
|
|
|
XUnmapWindow(ob_display, self->client->window);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-09-03 18:11:39 +00:00
|
|
|
void frame_adjust_theme(ObFrame *self)
|
|
|
|
{
|
|
|
|
free_theme_statics(self);
|
|
|
|
set_theme_statics(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_adjust_shape(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
#ifdef SHAPE
|
2003-10-15 03:59:35 +00:00
|
|
|
gint num;
|
2003-04-13 07:18:28 +00:00
|
|
|
XRectangle xrect[2];
|
|
|
|
|
|
|
|
if (!self->client->shaped) {
|
2004-03-21 01:03:00 +00:00
|
|
|
/* clear the shape on the frame window */
|
|
|
|
XShapeCombineMask(ob_display, self->window, ShapeBounding,
|
|
|
|
self->innersize.left,
|
|
|
|
self->innersize.top,
|
|
|
|
None, ShapeSet);
|
2003-04-13 07:18:28 +00:00
|
|
|
} else {
|
2004-03-21 01:03:00 +00:00
|
|
|
/* make the frame's shape match the clients */
|
|
|
|
XShapeCombineShape(ob_display, self->window, ShapeBounding,
|
|
|
|
self->innersize.left,
|
|
|
|
self->innersize.top,
|
|
|
|
self->client->window,
|
|
|
|
ShapeBounding, ShapeSet);
|
|
|
|
|
|
|
|
num = 0;
|
|
|
|
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
xrect[0].x = -ob_rr_theme->fbwidth;
|
|
|
|
xrect[0].y = -ob_rr_theme->fbwidth;
|
2004-03-21 01:03:00 +00:00
|
|
|
xrect[0].width = self->width + self->rbwidth * 2;
|
|
|
|
xrect[0].height = ob_rr_theme->title_height +
|
|
|
|
self->bwidth * 2;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (self->decorations & OB_FRAME_DECOR_HANDLE) {
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
xrect[1].x = -ob_rr_theme->fbwidth;
|
2004-03-21 01:03:00 +00:00
|
|
|
xrect[1].y = FRAME_HANDLE_Y(self);
|
|
|
|
xrect[1].width = self->width + self->rbwidth * 2;
|
|
|
|
xrect[1].height = ob_rr_theme->handle_height +
|
|
|
|
self->bwidth * 2;
|
|
|
|
++num;
|
|
|
|
}
|
|
|
|
|
|
|
|
XShapeCombineRectangles(ob_display, self->window,
|
|
|
|
ShapeBounding, 0, 0, xrect, num,
|
|
|
|
ShapeUnion, Unsorted);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
void frame_adjust_area(ObFrame *self, gboolean moved,
|
|
|
|
gboolean resized, gboolean fake)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2003-09-24 17:17:59 +00:00
|
|
|
Strut oldsize;
|
|
|
|
|
|
|
|
oldsize = self->size;
|
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
if (resized) {
|
2003-06-21 18:59:35 +00:00
|
|
|
self->decorations = self->client->decorations;
|
2003-08-25 08:49:48 +00:00
|
|
|
self->max_horz = self->client->max_horz;
|
2003-08-05 10:31:20 +00:00
|
|
|
|
2003-07-10 23:27:02 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_BORDER) {
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
self->bwidth = ob_rr_theme->fbwidth;
|
|
|
|
self->cbwidth_x = ob_rr_theme->cbwidthx;
|
|
|
|
self->cbwidth_y = ob_rr_theme->cbwidthy;
|
2003-04-13 07:18:28 +00:00
|
|
|
} else {
|
2003-08-05 10:31:20 +00:00
|
|
|
self->bwidth = self->cbwidth_x = self->cbwidth_y = 0;
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
2003-08-05 10:31:20 +00:00
|
|
|
self->rbwidth = self->bwidth;
|
|
|
|
|
2003-08-25 08:49:48 +00:00
|
|
|
if (self->max_horz)
|
2003-08-05 10:31:20 +00:00
|
|
|
self->bwidth = self->cbwidth_x = 0;
|
|
|
|
|
|
|
|
STRUT_SET(self->innersize,
|
|
|
|
self->cbwidth_x,
|
|
|
|
self->cbwidth_y,
|
|
|
|
self->cbwidth_x,
|
|
|
|
self->cbwidth_y);
|
|
|
|
self->width = self->client->area.width + self->cbwidth_x * 2 -
|
2003-08-25 08:49:48 +00:00
|
|
|
(self->max_horz ? self->rbwidth * 2 : 0);
|
2003-08-05 10:31:20 +00:00
|
|
|
self->width = MAX(self->width, 1); /* no lower than 1 */
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
/* set border widths */
|
2003-08-05 10:31:20 +00:00
|
|
|
if (!fake) {
|
|
|
|
XSetWindowBorderWidth(ob_display, self->window, self->bwidth);
|
|
|
|
XSetWindowBorderWidth(ob_display, self->title, self->rbwidth);
|
|
|
|
XSetWindowBorderWidth(ob_display, self->handle, self->rbwidth);
|
|
|
|
XSetWindowBorderWidth(ob_display, self->lgrip, self->rbwidth);
|
|
|
|
XSetWindowBorderWidth(ob_display, self->rgrip, self->rbwidth);
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
|
|
|
|
self->innersize.top += ob_rr_theme->title_height + self->rbwidth +
|
|
|
|
(self->rbwidth - self->bwidth);
|
2003-09-10 17:03:29 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->handle_height > 0)
|
2003-08-05 10:31:20 +00:00
|
|
|
self->innersize.bottom += ob_rr_theme->handle_height +
|
|
|
|
self->rbwidth + (self->rbwidth - self->bwidth);
|
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
/* they all default off, they're turned on in layout_title */
|
|
|
|
self->icon_x = -1;
|
|
|
|
self->desk_x = -1;
|
|
|
|
self->shade_x = -1;
|
|
|
|
self->iconify_x = -1;
|
|
|
|
self->label_x = -1;
|
|
|
|
self->max_x = -1;
|
|
|
|
self->close_x = -1;
|
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
/* position/size and map/unmap all the windows */
|
|
|
|
|
|
|
|
if (!fake) {
|
|
|
|
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
|
|
|
|
XMoveResizeWindow(ob_display, self->title,
|
|
|
|
-self->bwidth, -self->bwidth,
|
|
|
|
self->width, ob_rr_theme->title_height);
|
|
|
|
XMapWindow(ob_display, self->title);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-08-05 18:58:18 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_GRIPS) {
|
2007-03-08 01:26:03 +00:00
|
|
|
XMoveWindow(ob_display, self->tltresize, 0, 0);
|
|
|
|
XMoveWindow(ob_display, self->tllresize, 0, 0);
|
|
|
|
XMoveWindow(ob_display, self->trtresize,
|
2003-08-05 18:58:18 +00:00
|
|
|
self->width - ob_rr_theme->grip_width, 0);
|
2007-03-08 01:26:03 +00:00
|
|
|
XMoveWindow(ob_display, self->trrresize,
|
|
|
|
self->width - ob_rr_theme->paddingx - 1, 0);
|
|
|
|
XMapWindow(ob_display, self->tltresize);
|
|
|
|
XMapWindow(ob_display, self->tllresize);
|
|
|
|
XMapWindow(ob_display, self->trtresize);
|
|
|
|
XMapWindow(ob_display, self->trrresize);
|
2003-08-05 18:58:18 +00:00
|
|
|
} else {
|
2007-03-08 01:26:03 +00:00
|
|
|
XUnmapWindow(ob_display, self->tltresize);
|
|
|
|
XUnmapWindow(ob_display, self->tllresize);
|
|
|
|
XUnmapWindow(ob_display, self->trtresize);
|
|
|
|
XUnmapWindow(ob_display, self->trrresize);
|
2003-08-05 18:58:18 +00:00
|
|
|
}
|
2003-08-05 10:31:20 +00:00
|
|
|
} else
|
|
|
|
XUnmapWindow(ob_display, self->title);
|
|
|
|
}
|
2003-08-02 06:20:31 +00:00
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
|
2003-04-13 07:18:28 +00:00
|
|
|
/* layout the title bar elements */
|
|
|
|
layout_title(self);
|
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
if (!fake) {
|
2003-09-10 17:03:29 +00:00
|
|
|
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->handle_height > 0)
|
2003-09-10 17:03:29 +00:00
|
|
|
{
|
2003-08-05 10:31:20 +00:00
|
|
|
XMoveResizeWindow(ob_display, self->handle,
|
|
|
|
-self->bwidth, FRAME_HANDLE_Y(self),
|
|
|
|
self->width, ob_rr_theme->handle_height);
|
|
|
|
XMapWindow(ob_display, self->handle);
|
|
|
|
|
|
|
|
if (self->decorations & OB_FRAME_DECOR_GRIPS) {
|
|
|
|
XMoveWindow(ob_display, self->lgrip,
|
|
|
|
-self->rbwidth, -self->rbwidth);
|
|
|
|
XMoveWindow(ob_display, self->rgrip,
|
|
|
|
-self->rbwidth + self->width -
|
|
|
|
ob_rr_theme->grip_width, -self->rbwidth);
|
|
|
|
XMapWindow(ob_display, self->lgrip);
|
|
|
|
XMapWindow(ob_display, self->rgrip);
|
|
|
|
} else {
|
|
|
|
XUnmapWindow(ob_display, self->lgrip);
|
|
|
|
XUnmapWindow(ob_display, self->rgrip);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
XUnmapWindow(ob_display, self->handle);
|
|
|
|
|
2007-04-23 23:21:47 +00:00
|
|
|
/* move and resize the inner border window which contains the plate
|
|
|
|
*/
|
|
|
|
XMoveResizeWindow(ob_display, self->inner,
|
2003-08-05 10:31:20 +00:00
|
|
|
self->innersize.left - self->cbwidth_x,
|
|
|
|
self->innersize.top - self->cbwidth_y,
|
2007-04-23 23:21:47 +00:00
|
|
|
self->client->area.width +
|
|
|
|
self->cbwidth_x * 2,
|
|
|
|
self->client->area.height +
|
|
|
|
self->cbwidth_y * 2);
|
|
|
|
|
2007-04-24 00:00:11 +00:00
|
|
|
/* move the plate */
|
|
|
|
XMoveWindow(ob_display, self->plate,
|
|
|
|
self->cbwidth_x, self->cbwidth_y);
|
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
/* when the client has StaticGravity, it likes to move around. */
|
2007-04-23 23:21:47 +00:00
|
|
|
XMoveWindow(ob_display, self->client->window, 0, 0);
|
2003-08-05 10:31:20 +00:00
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
STRUT_SET(self->size,
|
|
|
|
self->innersize.left + self->bwidth,
|
|
|
|
self->innersize.top + self->bwidth,
|
|
|
|
self->innersize.right + self->bwidth,
|
|
|
|
self->innersize.bottom + self->bwidth);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* shading can change without being moved or resized */
|
|
|
|
RECT_SET_SIZE(self->area,
|
2004-03-21 01:03:00 +00:00
|
|
|
self->client->area.width +
|
|
|
|
self->size.left + self->size.right,
|
|
|
|
(self->client->shaded ?
|
2003-08-27 18:38:36 +00:00
|
|
|
ob_rr_theme->title_height + self->rbwidth * 2:
|
2003-04-13 07:18:28 +00:00
|
|
|
self->client->area.height +
|
|
|
|
self->size.top + self->size.bottom));
|
|
|
|
|
|
|
|
if (moved) {
|
|
|
|
/* find the new coordinates, done after setting the frame.size, for
|
|
|
|
frame_client_gravity. */
|
|
|
|
self->area.x = self->client->area.x;
|
|
|
|
self->area.y = self->client->area.y;
|
2003-07-30 06:08:12 +00:00
|
|
|
frame_client_gravity(self, &self->area.x, &self->area.y);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
if (!fake) {
|
|
|
|
/* move and resize the top level frame.
|
|
|
|
shading can change without being moved or resized */
|
|
|
|
XMoveResizeWindow(ob_display, self->window,
|
|
|
|
self->area.x, self->area.y,
|
|
|
|
self->area.width - self->bwidth * 2,
|
|
|
|
self->area.height - self->bwidth * 2);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-08-05 10:31:20 +00:00
|
|
|
if (resized) {
|
|
|
|
framerender_frame(self);
|
|
|
|
frame_adjust_shape(self);
|
|
|
|
}
|
2003-09-24 17:17:59 +00:00
|
|
|
|
|
|
|
if (!STRUT_EQUAL(self->size, oldsize)) {
|
2005-10-07 17:00:35 +00:00
|
|
|
gulong vals[4];
|
2003-09-24 17:17:59 +00:00
|
|
|
vals[0] = self->size.left;
|
|
|
|
vals[1] = self->size.right;
|
|
|
|
vals[2] = self->size.top;
|
|
|
|
vals[3] = self->size.bottom;
|
2007-03-11 00:12:37 +00:00
|
|
|
PROP_SETA32(self->client->window, net_frame_extents,
|
2003-09-24 17:17:59 +00:00
|
|
|
cardinal, vals, 4);
|
|
|
|
}
|
2003-10-09 19:18:20 +00:00
|
|
|
|
|
|
|
/* if this occurs while we are focus cycling, the indicator needs to
|
|
|
|
match the changes */
|
|
|
|
if (focus_cycle_target == self->client)
|
|
|
|
focus_cycle_draw_indicator();
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
2006-03-13 11:51:40 +00:00
|
|
|
if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR))
|
|
|
|
XResizeWindow(ob_display, self->label, self->label_width,
|
|
|
|
ob_rr_theme->label_height);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_adjust_state(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
framerender_frame(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_adjust_focus(ObFrame *self, gboolean hilite)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2003-04-25 19:55:41 +00:00
|
|
|
self->focused = hilite;
|
2003-04-13 07:18:28 +00:00
|
|
|
framerender_frame(self);
|
2007-04-22 19:08:38 +00:00
|
|
|
XFlush(ob_display);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2007-04-24 00:00:11 +00:00
|
|
|
void frame_adjust_client_area(ObFrame *self)
|
|
|
|
{
|
|
|
|
/* resize the plate */
|
|
|
|
XResizeWindow(ob_display, self->plate,
|
|
|
|
self->client->area.width, self->client->area.height);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_adjust_title(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
framerender_frame(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_adjust_icon(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
framerender_frame(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_grab_client(ObFrame *self, ObClient *client)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
self->client = client;
|
|
|
|
|
|
|
|
/* reparent the client to the frame */
|
|
|
|
XReparentWindow(ob_display, client->window, self->plate, 0, 0);
|
|
|
|
/*
|
|
|
|
When reparenting the client window, it is usually not mapped yet, since
|
|
|
|
this occurs from a MapRequest. However, in the case where Openbox is
|
|
|
|
starting up, the window is already mapped, so we'll see unmap events for
|
|
|
|
it. There are 2 unmap events generated that we see, one with the 'event'
|
|
|
|
member set the root window, and one set to the client, but both get
|
|
|
|
handled and need to be ignored.
|
|
|
|
*/
|
2003-07-10 19:06:00 +00:00
|
|
|
if (ob_state() == OB_STATE_STARTING)
|
2004-03-21 01:03:00 +00:00
|
|
|
client->ignore_unmaps += 2;
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
/* select the event mask on the client's parent (to receive config/map
|
|
|
|
req's) the ButtonPress is to catch clicks on the client border */
|
|
|
|
XSelectInput(ob_display, self->plate, PLATE_EVENTMASK);
|
|
|
|
|
2007-03-14 02:23:50 +00:00
|
|
|
frame_adjust_area(self, TRUE, TRUE, FALSE);
|
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
/* map the client so it maps when the frame does */
|
|
|
|
XMapWindow(ob_display, client->window);
|
|
|
|
|
2003-05-16 18:10:10 +00:00
|
|
|
/* set all the windows for the frame in the window_map */
|
|
|
|
g_hash_table_insert(window_map, &self->window, client);
|
|
|
|
g_hash_table_insert(window_map, &self->plate, client);
|
2007-04-23 23:21:47 +00:00
|
|
|
g_hash_table_insert(window_map, &self->inner, client);
|
2003-05-16 18:10:10 +00:00
|
|
|
g_hash_table_insert(window_map, &self->title, client);
|
|
|
|
g_hash_table_insert(window_map, &self->label, client);
|
|
|
|
g_hash_table_insert(window_map, &self->max, client);
|
|
|
|
g_hash_table_insert(window_map, &self->close, client);
|
|
|
|
g_hash_table_insert(window_map, &self->desk, client);
|
|
|
|
g_hash_table_insert(window_map, &self->shade, client);
|
|
|
|
g_hash_table_insert(window_map, &self->icon, client);
|
|
|
|
g_hash_table_insert(window_map, &self->iconify, client);
|
|
|
|
g_hash_table_insert(window_map, &self->handle, client);
|
|
|
|
g_hash_table_insert(window_map, &self->lgrip, client);
|
|
|
|
g_hash_table_insert(window_map, &self->rgrip, client);
|
2007-03-08 01:26:03 +00:00
|
|
|
g_hash_table_insert(window_map, &self->tltresize, client);
|
|
|
|
g_hash_table_insert(window_map, &self->tllresize, client);
|
|
|
|
g_hash_table_insert(window_map, &self->trtresize, client);
|
|
|
|
g_hash_table_insert(window_map, &self->trrresize, client);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
void frame_release_client(ObFrame *self, ObClient *client)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
|
|
|
XEvent ev;
|
2004-02-24 20:11:36 +00:00
|
|
|
gboolean reparent = TRUE;
|
2003-04-13 07:18:28 +00:00
|
|
|
|
|
|
|
g_assert(self->client == client);
|
|
|
|
|
|
|
|
/* check if the app has already reparented its window away */
|
2004-02-24 20:11:36 +00:00
|
|
|
while (XCheckTypedWindowEvent(ob_display, client->window,
|
|
|
|
ReparentNotify, &ev))
|
|
|
|
{
|
|
|
|
/* This check makes sure we don't catch our own reparent action to
|
|
|
|
our frame window. This doesn't count as the app reparenting itself
|
|
|
|
away of course.
|
|
|
|
|
|
|
|
Reparent events that are generated by us are just discarded here.
|
|
|
|
They are of no consequence to us anyhow.
|
|
|
|
*/
|
|
|
|
if (ev.xreparent.parent != self->plate) {
|
|
|
|
reparent = FALSE;
|
|
|
|
XPutBackEvent(ob_display, &ev);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-05-10 20:52:32 +00:00
|
|
|
|
2004-02-24 20:11:36 +00:00
|
|
|
if (reparent) {
|
|
|
|
/* according to the ICCCM - if the client doesn't reparent itself,
|
|
|
|
then we will reparent the window to root for them */
|
|
|
|
XReparentWindow(ob_display, client->window,
|
2003-07-10 19:01:41 +00:00
|
|
|
RootWindow(ob_display, ob_screen),
|
2004-02-24 20:11:36 +00:00
|
|
|
client->area.x,
|
|
|
|
client->area.y);
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-05-16 18:10:10 +00:00
|
|
|
/* remove all the windows for the frame from the window_map */
|
|
|
|
g_hash_table_remove(window_map, &self->window);
|
|
|
|
g_hash_table_remove(window_map, &self->plate);
|
2007-04-23 23:21:47 +00:00
|
|
|
g_hash_table_remove(window_map, &self->inner);
|
2003-05-16 18:10:10 +00:00
|
|
|
g_hash_table_remove(window_map, &self->title);
|
|
|
|
g_hash_table_remove(window_map, &self->label);
|
|
|
|
g_hash_table_remove(window_map, &self->max);
|
|
|
|
g_hash_table_remove(window_map, &self->close);
|
|
|
|
g_hash_table_remove(window_map, &self->desk);
|
|
|
|
g_hash_table_remove(window_map, &self->shade);
|
|
|
|
g_hash_table_remove(window_map, &self->icon);
|
|
|
|
g_hash_table_remove(window_map, &self->iconify);
|
|
|
|
g_hash_table_remove(window_map, &self->handle);
|
|
|
|
g_hash_table_remove(window_map, &self->lgrip);
|
|
|
|
g_hash_table_remove(window_map, &self->rgrip);
|
2007-03-08 01:26:03 +00:00
|
|
|
g_hash_table_remove(window_map, &self->tltresize);
|
|
|
|
g_hash_table_remove(window_map, &self->tllresize);
|
|
|
|
g_hash_table_remove(window_map, &self->trtresize);
|
|
|
|
g_hash_table_remove(window_map, &self->trrresize);
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2006-08-17 20:16:02 +00:00
|
|
|
ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE);
|
2003-09-01 04:30:59 +00:00
|
|
|
|
2003-04-13 07:18:28 +00:00
|
|
|
frame_free(self);
|
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
static void layout_title(ObFrame *self)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2003-10-15 03:59:35 +00:00
|
|
|
gchar *lc;
|
|
|
|
gint x;
|
2003-04-13 07:18:28 +00:00
|
|
|
gboolean n, d, i, l, m, c, s;
|
|
|
|
|
|
|
|
n = d = i = l = m = c = s = FALSE;
|
|
|
|
|
|
|
|
/* figure out whats being shown, and the width of the label */
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
self->label_width = self->width - (ob_rr_theme->paddingx + 1) * 2;
|
2003-07-30 16:25:08 +00:00
|
|
|
for (lc = config_title_layout; *lc != '\0'; ++lc) {
|
2004-03-21 01:03:00 +00:00
|
|
|
switch (*lc) {
|
|
|
|
case 'N':
|
2003-04-13 07:18:28 +00:00
|
|
|
if (n) { *lc = ' '; break; } /* rm duplicates */
|
2004-03-21 01:03:00 +00:00
|
|
|
n = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size + 2 +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'D':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (d) { *lc = ' '; break; }
|
2006-11-15 21:12:06 +00:00
|
|
|
if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
|
|
|
|
&& config_theme_hidedisabled)
|
2005-07-14 13:44:33 +00:00
|
|
|
break;
|
2004-03-21 01:03:00 +00:00
|
|
|
d = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'S':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (s) { *lc = ' '; break; }
|
2006-11-15 21:12:06 +00:00
|
|
|
if (!(self->decorations & OB_FRAME_DECOR_SHADE)
|
|
|
|
&& config_theme_hidedisabled)
|
2005-07-14 13:44:33 +00:00
|
|
|
break;
|
2004-03-21 01:03:00 +00:00
|
|
|
s = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'I':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (i) { *lc = ' '; break; }
|
2006-11-15 21:12:06 +00:00
|
|
|
if (!(self->decorations & OB_FRAME_DECOR_ICONIFY)
|
|
|
|
&& config_theme_hidedisabled)
|
2005-07-14 13:44:33 +00:00
|
|
|
break;
|
2004-03-21 01:03:00 +00:00
|
|
|
i = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'L':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (l) { *lc = ' '; break; }
|
2004-03-21 01:03:00 +00:00
|
|
|
l = TRUE;
|
|
|
|
break;
|
|
|
|
case 'M':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (m) { *lc = ' '; break; }
|
2006-11-15 21:12:06 +00:00
|
|
|
if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE)
|
|
|
|
&& config_theme_hidedisabled)
|
2005-07-14 13:44:33 +00:00
|
|
|
break;
|
2004-03-21 01:03:00 +00:00
|
|
|
m = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'C':
|
2005-07-14 13:23:05 +00:00
|
|
|
if (c) { *lc = ' '; break; }
|
2006-11-15 21:12:06 +00:00
|
|
|
if (!(self->decorations & OB_FRAME_DECOR_CLOSE)
|
|
|
|
&& config_theme_hidedisabled)
|
2005-07-14 13:44:33 +00:00
|
|
|
break;
|
2004-03-21 01:03:00 +00:00
|
|
|
c = TRUE;
|
|
|
|
self->label_width -= (ob_rr_theme->button_size +
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
ob_rr_theme->paddingx + 1);
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
if (self->label_width < 1) self->label_width = 1;
|
|
|
|
|
|
|
|
if (!n) XUnmapWindow(ob_display, self->icon);
|
|
|
|
if (!d) XUnmapWindow(ob_display, self->desk);
|
|
|
|
if (!s) XUnmapWindow(ob_display, self->shade);
|
|
|
|
if (!i) XUnmapWindow(ob_display, self->iconify);
|
|
|
|
if (!l) XUnmapWindow(ob_display, self->label);
|
|
|
|
if (!m) XUnmapWindow(ob_display, self->max);
|
|
|
|
if (!c) XUnmapWindow(ob_display, self->close);
|
|
|
|
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x = ob_rr_theme->paddingx + 1;
|
2003-07-30 16:25:08 +00:00
|
|
|
for (lc = config_title_layout; *lc != '\0'; ++lc) {
|
2004-03-21 01:03:00 +00:00
|
|
|
switch (*lc) {
|
|
|
|
case 'N':
|
|
|
|
if (!n) break;
|
|
|
|
self->icon_x = x;
|
|
|
|
XMapWindow(ob_display, self->icon);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->icon, x, ob_rr_theme->paddingy);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + 2 + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'D':
|
|
|
|
if (!d) break;
|
|
|
|
self->desk_x = x;
|
|
|
|
XMapWindow(ob_display, self->desk);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->desk, x, ob_rr_theme->paddingy + 1);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'S':
|
|
|
|
if (!s) break;
|
|
|
|
self->shade_x = x;
|
|
|
|
XMapWindow(ob_display, self->shade);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->shade, x, ob_rr_theme->paddingy + 1);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'I':
|
|
|
|
if (!i) break;
|
|
|
|
self->iconify_x = x;
|
|
|
|
XMapWindow(ob_display, self->iconify);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display,self->iconify, x, ob_rr_theme->paddingy + 1);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'L':
|
|
|
|
if (!l) break;
|
|
|
|
self->label_x = x;
|
|
|
|
XMapWindow(ob_display, self->label);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->label, x, ob_rr_theme->paddingy);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += self->label_width + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'M':
|
|
|
|
if (!m) break;
|
|
|
|
self->max_x = x;
|
|
|
|
XMapWindow(ob_display, self->max);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->max, x, ob_rr_theme->paddingy + 1);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
case 'C':
|
|
|
|
if (!c) break;
|
|
|
|
self->close_x = x;
|
|
|
|
XMapWindow(ob_display, self->close);
|
2007-03-08 01:08:44 +00:00
|
|
|
XMoveWindow(ob_display, self->close, x, ob_rr_theme->paddingy + 1);
|
scary commit..but here goes.
YOUR THEMES ARE NOW OFFICIALLY BROKEN.
Openbox has just moved it's theme format to an XML based one. The details of
this format can be found in data/themerc.xsd (and http://openbox.org/themerc.xsd
ALSO! This is very good and important and stuff! In the tools directory you
will find THEMETOXML ! This tool takes a themerc on stdin, and spits out
the same theme in theme.xml format. So this is all you need to do to update
your themes.
PLEASE NOTE: This themetoxml does _not_ install itself anywhere. It simply
builds and then lives out in its tools/themetoxml directory, and that's it. So
if you want to use it, that is where to find it.
In moving to the new XML format, a number of additions/changes to the theme
engine have been made. Themetoxml takes these into account and will set all
the new things appropriately to make your theme look the same as it always has.
New additions include..
* padding now has an horizontal and vertical component, instead of being one number
* menus can have different borders than windows (color and size)
* menu offset can now be negative. it's a little weird, but someone will want it no doubt
* fonts are no longer controled by the theme at all, however font shadowing is, and on that note..
* font shadows are now any color you want, not just black and white
* you can now set the shadow anywhere you can set the text's color, so you have more control, i.e. you can set shadow on active menu items but not inactive, or disabled, etc.
* every color now has an alpha channel. at the moment they don't do anything, besides the font shadow one, but it leaves room for future explorations. it is REALLY HIGHLY RECOMMENDED that you set the alpha to 255 all the time, until such time as it could be useful. otherwise one day your theme may turn awful for people.
* font colors are in the range 0-255, in case you were wondering, and they have to be specified in decimal
* if you'd like to change you font's you can do so in your configuration file. this is how it is going to stay. changing the font in the theme assumes too much about peoples eye sight and locality and stuff. it doesn't belong there, sorry. the system-wide default rc.xml includes the new font settings for your viewing pleasure, and ill drop an example of it below.
* shadows can now be positioned in any direction, they have both an x and a y offset which can be negative and positive. and offset of 0,0 will disable the shadow
This isn't a release or anything. If someone had some good ideas about the xml theme format, I'd like to hear them. But I don't think it will be changing much right now beyond where it is. I don't even know how the new functionality will play out for themers, so we'll see.
Whew.. I guess that's it. I'm not sure if I mentioned every little change or not, but oh well. Mileage may vary.. Please send any feedback.
Here's the font configuration example. Hopefully ObConf will let you set this real soon.
<theme>
...
<font place="ActiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="InactiveWindow">
<name>arial,sans</name>
<size>7</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuTitle">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
<font place="MenuItem">
<name>arial,sans</name>
<size>8</size>
<weight>bold</weight>
<slant>normal</slant>
</font>
</theme>
2007-03-05 15:44:17 +00:00
|
|
|
x += ob_rr_theme->button_size + ob_rr_theme->paddingx + 1;
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
}
|
2003-03-16 21:11:39 +00:00
|
|
|
|
2003-09-17 08:01:37 +00:00
|
|
|
ObFrameContext frame_context_from_string(const gchar *name)
|
2003-04-05 17:22:01 +00:00
|
|
|
{
|
2003-09-17 06:44:04 +00:00
|
|
|
if (!g_ascii_strcasecmp("Desktop", name))
|
2003-08-20 23:13:40 +00:00
|
|
|
return OB_FRAME_CONTEXT_DESKTOP;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Client", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_CLIENT;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Titlebar", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_TITLEBAR;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Handle", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_HANDLE;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Frame", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_FRAME;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("TLCorner", name))
|
2003-08-02 06:20:31 +00:00
|
|
|
return OB_FRAME_CONTEXT_TLCORNER;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("TRCorner", name))
|
2003-08-02 06:20:31 +00:00
|
|
|
return OB_FRAME_CONTEXT_TRCORNER;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("BLCorner", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_BLCORNER;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("BRCorner", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_BRCORNER;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Maximize", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_MAXIMIZE;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("AllDesktops", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_ALLDESKTOPS;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Shade", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_SHADE;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Iconify", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_ICONIFY;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Icon", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_ICON;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("Close", name))
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_CLOSE;
|
2003-09-17 06:44:04 +00:00
|
|
|
else if (!g_ascii_strcasecmp("MoveResize", name))
|
|
|
|
return OB_FRAME_CONTEXT_MOVE_RESIZE;
|
2003-07-10 07:16:19 +00:00
|
|
|
return OB_FRAME_CONTEXT_NONE;
|
2003-04-05 17:22:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 07:16:19 +00:00
|
|
|
ObFrameContext frame_context(ObClient *client, Window win)
|
2003-04-13 07:18:28 +00:00
|
|
|
{
|
2003-07-10 07:16:19 +00:00
|
|
|
ObFrame *self;
|
2003-04-13 08:36:38 +00:00
|
|
|
|
2003-09-17 06:44:04 +00:00
|
|
|
if (moveresize_in_progress)
|
|
|
|
return OB_FRAME_CONTEXT_MOVE_RESIZE;
|
|
|
|
|
2003-08-20 23:13:40 +00:00
|
|
|
if (win == RootWindow(ob_display, ob_screen))
|
|
|
|
return OB_FRAME_CONTEXT_DESKTOP;
|
2003-07-10 07:16:19 +00:00
|
|
|
if (client == NULL) return OB_FRAME_CONTEXT_NONE;
|
2003-08-20 06:17:43 +00:00
|
|
|
if (win == client->window) {
|
2003-08-20 23:13:40 +00:00
|
|
|
/* conceptually, this is the desktop, as far as users are
|
2003-08-20 06:17:43 +00:00
|
|
|
concerned */
|
|
|
|
if (client->type == OB_CLIENT_TYPE_DESKTOP)
|
2003-08-20 23:13:40 +00:00
|
|
|
return OB_FRAME_CONTEXT_DESKTOP;
|
2003-08-20 06:17:43 +00:00
|
|
|
return OB_FRAME_CONTEXT_CLIENT;
|
|
|
|
}
|
2003-04-13 07:18:28 +00:00
|
|
|
|
2003-04-13 08:36:38 +00:00
|
|
|
self = client->frame;
|
2003-08-20 06:17:43 +00:00
|
|
|
if (win == self->plate) {
|
2003-08-20 23:13:40 +00:00
|
|
|
/* conceptually, this is the desktop, as far as users are
|
2003-08-20 06:17:43 +00:00
|
|
|
concerned */
|
|
|
|
if (client->type == OB_CLIENT_TYPE_DESKTOP)
|
2003-08-20 23:13:40 +00:00
|
|
|
return OB_FRAME_CONTEXT_DESKTOP;
|
2003-08-20 06:17:43 +00:00
|
|
|
return OB_FRAME_CONTEXT_CLIENT;
|
|
|
|
}
|
|
|
|
|
2007-04-23 23:21:47 +00:00
|
|
|
if (win == self->window) return OB_FRAME_CONTEXT_FRAME;
|
|
|
|
if (win == self->inner) return OB_FRAME_CONTEXT_FRAME;
|
|
|
|
if (win == self->title) return OB_FRAME_CONTEXT_TITLEBAR;
|
|
|
|
if (win == self->label) return OB_FRAME_CONTEXT_TITLEBAR;
|
|
|
|
if (win == self->handle) return OB_FRAME_CONTEXT_HANDLE;
|
|
|
|
if (win == self->lgrip) return OB_FRAME_CONTEXT_BLCORNER;
|
|
|
|
if (win == self->rgrip) return OB_FRAME_CONTEXT_BRCORNER;
|
2007-03-08 01:26:03 +00:00
|
|
|
if (win == self->tltresize) return OB_FRAME_CONTEXT_TLCORNER;
|
|
|
|
if (win == self->tllresize) return OB_FRAME_CONTEXT_TLCORNER;
|
|
|
|
if (win == self->trtresize) return OB_FRAME_CONTEXT_TRCORNER;
|
|
|
|
if (win == self->trrresize) return OB_FRAME_CONTEXT_TRCORNER;
|
2007-04-23 23:21:47 +00:00
|
|
|
if (win == self->max) return OB_FRAME_CONTEXT_MAXIMIZE;
|
|
|
|
if (win == self->iconify) return OB_FRAME_CONTEXT_ICONIFY;
|
|
|
|
if (win == self->close) return OB_FRAME_CONTEXT_CLOSE;
|
|
|
|
if (win == self->icon) return OB_FRAME_CONTEXT_ICON;
|
|
|
|
if (win == self->desk) return OB_FRAME_CONTEXT_ALLDESKTOPS;
|
|
|
|
if (win == self->shade) return OB_FRAME_CONTEXT_SHADE;
|
2003-07-10 07:16:19 +00:00
|
|
|
|
|
|
|
return OB_FRAME_CONTEXT_NONE;
|
2003-04-13 07:18:28 +00:00
|
|
|
}
|
|
|
|
|
2003-10-15 03:59:35 +00:00
|
|
|
void frame_client_gravity(ObFrame *self, gint *x, gint *y)
|
2003-03-16 21:11:39 +00:00
|
|
|
{
|
|
|
|
/* horizontal */
|
|
|
|
switch (self->client->gravity) {
|
|
|
|
default:
|
|
|
|
case NorthWestGravity:
|
|
|
|
case SouthWestGravity:
|
|
|
|
case WestGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case NorthGravity:
|
|
|
|
case SouthGravity:
|
|
|
|
case CenterGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x -= (self->size.left + self->size.right) / 2;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case NorthEastGravity:
|
|
|
|
case SouthEastGravity:
|
|
|
|
case EastGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x -= self->size.left + self->size.right;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case ForgetGravity:
|
|
|
|
case StaticGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x -= self->size.left;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* vertical */
|
|
|
|
switch (self->client->gravity) {
|
|
|
|
default:
|
|
|
|
case NorthWestGravity:
|
|
|
|
case NorthEastGravity:
|
|
|
|
case NorthGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case CenterGravity:
|
|
|
|
case EastGravity:
|
|
|
|
case WestGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y -= (self->size.top + self->size.bottom) / 2;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case SouthWestGravity:
|
|
|
|
case SouthEastGravity:
|
|
|
|
case SouthGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y -= self->size.top + self->size.bottom;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
|
|
|
|
case ForgetGravity:
|
|
|
|
case StaticGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y -= self->size.top;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-10-15 03:59:35 +00:00
|
|
|
void frame_frame_gravity(ObFrame *self, gint *x, gint *y)
|
2003-03-16 21:11:39 +00:00
|
|
|
{
|
|
|
|
/* horizontal */
|
|
|
|
switch (self->client->gravity) {
|
|
|
|
default:
|
|
|
|
case NorthWestGravity:
|
|
|
|
case WestGravity:
|
|
|
|
case SouthWestGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
case NorthGravity:
|
|
|
|
case CenterGravity:
|
|
|
|
case SouthGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x += (self->size.left + self->size.right) / 2;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
case NorthEastGravity:
|
|
|
|
case EastGravity:
|
|
|
|
case SouthEastGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x += self->size.left + self->size.right;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
case StaticGravity:
|
|
|
|
case ForgetGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*x += self->size.left;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* vertical */
|
|
|
|
switch (self->client->gravity) {
|
|
|
|
default:
|
|
|
|
case NorthWestGravity:
|
|
|
|
case NorthGravity:
|
2003-07-31 19:16:04 +00:00
|
|
|
case NorthEastGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
break;
|
2003-07-31 19:16:04 +00:00
|
|
|
case WestGravity:
|
2003-03-16 21:11:39 +00:00
|
|
|
case CenterGravity:
|
2003-07-31 19:16:04 +00:00
|
|
|
case EastGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y += (self->size.top + self->size.bottom) / 2;
|
|
|
|
break;
|
2003-07-31 19:16:04 +00:00
|
|
|
case SouthWestGravity:
|
|
|
|
case SouthGravity:
|
2003-03-16 21:11:39 +00:00
|
|
|
case SouthEastGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y += self->size.top + self->size.bottom;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
case StaticGravity:
|
|
|
|
case ForgetGravity:
|
2004-03-21 01:03:00 +00:00
|
|
|
*y += self->size.top;
|
|
|
|
break;
|
2003-03-16 21:11:39 +00:00
|
|
|
}
|
|
|
|
}
|
2003-09-01 02:57:19 +00:00
|
|
|
|
|
|
|
static void flash_done(gpointer data)
|
|
|
|
{
|
|
|
|
ObFrame *self = data;
|
|
|
|
|
|
|
|
if (self->focused != self->flash_on)
|
|
|
|
frame_adjust_focus(self, self->focused);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean flash_timeout(gpointer data)
|
|
|
|
{
|
|
|
|
ObFrame *self = data;
|
|
|
|
GTimeVal now;
|
|
|
|
|
|
|
|
g_get_current_time(&now);
|
|
|
|
if (now.tv_sec > self->flash_end.tv_sec ||
|
|
|
|
(now.tv_sec == self->flash_end.tv_sec &&
|
2003-09-01 03:41:53 +00:00
|
|
|
now.tv_usec >= self->flash_end.tv_usec))
|
|
|
|
self->flashing = FALSE;
|
|
|
|
|
|
|
|
if (!self->flashing)
|
2003-09-01 02:57:19 +00:00
|
|
|
return FALSE; /* we are done */
|
|
|
|
|
|
|
|
self->flash_on = !self->flash_on;
|
2003-09-24 17:17:59 +00:00
|
|
|
if (!self->focused) {
|
2003-09-01 02:57:19 +00:00
|
|
|
frame_adjust_focus(self, self->flash_on);
|
2003-09-24 17:17:59 +00:00
|
|
|
self->focused = FALSE;
|
2003-09-01 02:57:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE; /* go again */
|
|
|
|
}
|
|
|
|
|
2003-09-01 03:41:53 +00:00
|
|
|
void frame_flash_start(ObFrame *self)
|
2003-09-01 02:57:19 +00:00
|
|
|
{
|
|
|
|
self->flash_on = self->focused;
|
|
|
|
|
|
|
|
if (!self->flashing)
|
|
|
|
ob_main_loop_timeout_add(ob_main_loop,
|
2003-09-24 17:17:59 +00:00
|
|
|
G_USEC_PER_SEC * 0.6,
|
2003-09-01 02:57:19 +00:00
|
|
|
flash_timeout,
|
|
|
|
self,
|
2007-04-22 04:16:00 +00:00
|
|
|
g_direct_equal,
|
2003-09-01 02:57:19 +00:00
|
|
|
flash_done);
|
|
|
|
g_get_current_time(&self->flash_end);
|
2003-09-01 03:41:53 +00:00
|
|
|
g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
|
2003-09-01 02:57:19 +00:00
|
|
|
|
|
|
|
self->flashing = TRUE;
|
|
|
|
}
|
2003-09-01 03:41:53 +00:00
|
|
|
|
|
|
|
void frame_flash_stop(ObFrame *self)
|
|
|
|
{
|
|
|
|
self->flashing = FALSE;
|
|
|
|
}
|