Factor resources.{h,c} out into //wmaker:resources.

This commit is contained in:
2025-02-09 22:25:19 -05:00
parent fc5b1e4d8e
commit 16343ec2e0
3 changed files with 24 additions and 12 deletions

View File

@@ -41,6 +41,20 @@ cc_library(
],
)
cc_library(
name = "resources",
hdrs = ["resources.h"],
srcs = ["resources.c"],
deps = [
":globals",
":wconfig",
"//wmaker/screen:interface",
"//wrlib",
"//WINGs",
"@x11//:lib",
],
)
# TODO: factor this apart into at least 1 library. (Shared functions defined in
# main.c will have to go elsewhere.)
cc_binary(

View File

@@ -19,21 +19,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "wconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "wmaker/wconfig.h"
#include "wmaker/globals.h"
#include "wmaker/screen/interface.h"
#include "X11/Xlib.h"
#include "X11/Xutil.h"
#include "wrlib/wraster.h"
#include "WindowMaker.h"
#include "texture.h"
#include "resources.h"
#include "screen.h"
#include "WINGs/WUtil.h"
int wGetColorForColormap(Colormap colormap, const char *color_name, XColor *color)
{

View File

@@ -18,11 +18,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef WMRESOURCES_H_
#define WMRESOURCES_H_
#ifndef WRESOURCES_H_
#define WRESOURCES_H_
int wGetColorForColormap(Colormap colormap, const char *color_name, XColor *color);
int wGetColor(WScreen *scr, const char *color_name, XColor *color);
void wFreeColor(WScreen *scr, unsigned long pixel);
#endif
#endif // WRESOURCES_H_