wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
style.h File Reference
#include <cairo.h>
#include <inttypes.h>
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdbool.h>
Include dependency graph for style.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmtk_style_color_solid_data_t
 
struct  wlmtk_style_color_gradient_data_t
 
struct  wlmtk_style_fill_t
 
struct  wlmtk_style_font_t
 
struct  wlmtk_margin_style
 
struct  wlmtk_titlebar_style
 

Macros

#define WLMTK_STYLE_FONT_FACE_LENGTH   128
 

Enumerations

enum  wlmtk_style_fill_type_t {
  WLMTK_STYLE_COLOR_SOLID , WLMTK_STYLE_COLOR_HGRADIENT , WLMTK_STYLE_COLOR_VGRADIENT , WLMTK_STYLE_COLOR_DGRADIENT ,
  WLMTK_STYLE_COLOR_ADGRADIENT
}
 
enum  wlmtk_style_font_weight_t { WLMTK_FONT_WEIGHT_NORMAL , WLMTK_FONT_WEIGHT_BOLD }
 

Functions

cairo_font_weight_t wlmtk_style_font_weight_cairo_from_wlmtk (wlmtk_style_font_weight_t weight)
 
bool wlmtk_style_decode_fill (bspl_object_t *object_ptr, const union bspl_desc_value *desc_value_ptr, void *value_ptr)
 

Variables

const bspl_desc_t wlmtk_style_margin_desc []
 
const bspl_desc_t wlmtk_style_font_desc []
 
const bs_test_set_t wlmtk_style_test_set
 

Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Macro Definition Documentation

◆ WLMTK_STYLE_FONT_FACE_LENGTH

#define WLMTK_STYLE_FONT_FACE_LENGTH   128

Hardcoded max length of the font face name.

Enumeration Type Documentation

◆ wlmtk_style_fill_type_t

Specifies the type of coloring to use for the fill.

Enumerator
WLMTK_STYLE_COLOR_SOLID 

Horizontal color gradient.

WLMTK_STYLE_COLOR_HGRADIENT 

Horizontal color gradient.

WLMTK_STYLE_COLOR_VGRADIENT 

Vertical color gradient.

WLMTK_STYLE_COLOR_DGRADIENT 

Diagonal color gradient, Cairo style.

Colors are interpolated from top-left to bottom-right corner. Areas of equal color value are arranged perpendicular to that diagonal. This produces a smooth color flow across all rectangle edges.

WLMTK_STYLE_COLOR_ADGRADIENT 

Alternative diagonal color gradient, Window Maker style.

Colors are interpolated from top-left to bottom-right corner. Areas of equal color value are aligned with the other diagonal – from top-right to bottom-left. This may produce a steep gradient along the thin axis of long & thin rectangles, but is similar to what Window Maker uses.

◆ wlmtk_style_font_weight_t

Weight of a font.

Function Documentation

◆ wlmtk_style_decode_fill()

bool wlmtk_style_decode_fill ( bspl_object_t *  object_ptr,
const union bspl_desc_value *  desc_value_ptr,
void *  value_ptr 
)

Custom decoder for fill style struct from a plist dict.

Parameters
object_ptr
desc_value_ptr
value_ptr
Returns
true on success.

◆ wlmtk_style_font_weight_cairo_from_wlmtk()

cairo_font_weight_t wlmtk_style_font_weight_cairo_from_wlmtk ( wlmtk_style_font_weight_t  weight)

Translates the font weight from toolkit into cairo enum.

Variable Documentation

◆ wlmtk_style_font_desc

const bspl_desc_t wlmtk_style_font_desc[]
extern

Plist decoding descriptor for decoding "Font" sections.

◆ wlmtk_style_margin_desc

const bspl_desc_t wlmtk_style_margin_desc[]
extern

Plist decoding descriptor of a margin's style.

◆ wlmtk_style_test_set

const bs_test_set_t wlmtk_style_test_set
extern

Unit test cases.