wlmaker
|
Functions | |
void | wlmaker_primitives_cairo_fill (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr) |
void | wlmaker_primitives_cairo_fill_at (cairo_t *cairo_ptr, int x, int y, unsigned width, unsigned height, const wlmtk_style_fill_t *fill_ptr) |
void | wlmaker_primitives_set_bezel_color (cairo_t *cairo_ptr, bool illuminated) |
void | wlmaker_primitives_draw_bezel (cairo_t *cairo_ptr, double bezel_width, bool raised) |
void | wlmaker_primitives_draw_bezel_at (cairo_t *cairo_ptr, int x, int y, unsigned width, unsigned height, double bezel_width, bool raised) |
void | wlmaker_primitives_draw_minimize_icon (cairo_t *cairo_ptr, int size, uint32_t color) |
void | wlmaker_primitives_draw_close_icon (cairo_t *cairo_ptr, int size, uint32_t color) |
void | wlmaker_primitives_draw_window_title (cairo_t *cairo_ptr, const wlmtk_style_font_t *font_style_ptr, const char *title_ptr, uint32_t color) |
void | wlmaker_primitives_draw_text (cairo_t *cairo_ptr, int x, int y, const wlmtk_style_font_t *font_style_ptr, uint32_t color, const char *text_ptr) |
static void | test_fill (bs_test_t *test_ptr) |
static void | test_close (bs_test_t *test_ptr) |
static void | test_close_large (bs_test_t *test_ptr) |
static void | test_minimize (bs_test_t *test_ptr) |
static void | test_minimize_large (bs_test_t *test_ptr) |
static void | test_text (bs_test_t *test_ptr) |
static void | test_window_title (bs_test_t *test_ptr) |
Variables | |
const bs_test_case_t | wlmaker_primitives_test_cases [] |
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.
|
static |
Verifies the looks of the "close" icon.
|
static |
Verifies the looks of the "close" icon, with non-default size.
|
static |
Verifies the fill styles
|
static |
Verifies the looks of the "minimize" icon.
|
static |
Verifies the looks of the "minimize" icon, widht non-default size.
|
static |
Verifies drawing a text.
|
static |
Verifies the looks of the window title.
void wlmaker_primitives_cairo_fill | ( | cairo_t * | cairo_ptr, |
const wlmtk_style_fill_t * | fill_ptr | ||
) |
Completely fills the cairo with the specified style.
cairo_ptr | A cairo, backed by an image surface. |
fill_ptr |
void wlmaker_primitives_cairo_fill_at | ( | cairo_t * | cairo_ptr, |
int | x, | ||
int | y, | ||
unsigned | width, | ||
unsigned | height, | ||
const wlmtk_style_fill_t * | fill_ptr | ||
) |
Fills the cairo with the specified style at the specified rectangle.
cairo_ptr | A cairo, backed by an image surface. |
x | |
y | |
width | |
height | |
fill_ptr |
void wlmaker_primitives_draw_bezel | ( | cairo_t * | cairo_ptr, |
double | bezel_width, | ||
bool | raised | ||
) |
Draws a bezel into the cairo.
cairo_ptr | A cairo, backed by an image surface. |
bezel_width | |
raised | Whether the bezel is to highlight a raised (true) or pressed (false) state. |
void wlmaker_primitives_draw_bezel_at | ( | cairo_t * | cairo_ptr, |
int | x, | ||
int | y, | ||
unsigned | width, | ||
unsigned | height, | ||
double | bezel_width, | ||
bool | raised | ||
) |
Draws a bezel into the cairo, at specified position and width/height.
cairo_ptr | A cairo, backed by an image surface. |
x | |
y | |
width | |
height | |
bezel_width | |
raised | Whether the bezel is to highlight a raised (true) or pressed (false) state. |
void wlmaker_primitives_draw_close_icon | ( | cairo_t * | cairo_ptr, |
int | size, | ||
uint32_t | color | ||
) |
Draws the "close" icon, as used in the title bar.
cairo_ptr | |
size | |
color |
void wlmaker_primitives_draw_minimize_icon | ( | cairo_t * | cairo_ptr, |
int | size, | ||
uint32_t | color | ||
) |
Draws the "minimize" icon, as used in the title bar.
cairo_ptr | |
size | |
color |
void wlmaker_primitives_draw_text | ( | cairo_t * | cairo_ptr, |
int | x, | ||
int | y, | ||
const wlmtk_style_font_t * | font_style_ptr, | ||
uint32_t | color, | ||
const char * | text_ptr | ||
) |
Draws the text with given parameters into the cairo_t
at (x, y).
cairo_ptr | |
x | |
y | |
font_style_ptr | |
color | |
text_ptr |
void wlmaker_primitives_draw_window_title | ( | cairo_t * | cairo_ptr, |
const wlmtk_style_font_t * | font_style_ptr, | ||
const char * | title_ptr, | ||
uint32_t | color | ||
) |
Draws the window title into the cairo_t
.
cairo_ptr | |
font_style_ptr | The font style to use. |
title_ptr | Title string, or NULL. |
color | As an ARGB 8888 value. |
void wlmaker_primitives_set_bezel_color | ( | cairo_t * | cairo_ptr, |
bool | illuminated | ||
) |
Sets the bezel color.
Note: Window Maker draws the bezel by adding 80 (0x50) to each R, G, B of the underlying title for the illuminated side; respectively by subtracting 40 (0x28) on the non-illuminated side. We are using cairo's overlaying with the respective "alpha" values below, which leads to different results.
cairo_ptr | |
illuminated |
const bs_test_case_t wlmaker_primitives_test_cases[] |
Unit tests.