wlmaker
Loading...
Searching...
No Matches
Functions | Variables
decorations.h File Reference
#include <cairo.h>
#include <stdint.h>
#include <libbase/libbase.h>
#include "cairo_util.h"
#include "toolkit/toolkit.h"
Include dependency graph for decorations.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void wlmaker_decorations_draw_tile (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr, bool pressed)
 
bool wlmaker_decorations_draw_tile_icon (cairo_t *cairo_ptr, const char *icon_path_ptr)
 
void wlmaker_decorations_draw_iconified (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr, uint32_t font_color, const char *title_ptr)
 
bool wlmaker_decorations_draw_clip (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr, bool pressed)
 
bool wlmaker_decorations_draw_clip_button_next (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr, bool pressed)
 
bool wlmaker_decorations_draw_clip_button_prev (cairo_t *cairo_ptr, const wlmtk_style_fill_t *fill_ptr, bool pressed)
 

Variables

const uint32_t wlmaker_decorations_tile_size
 
const uint32_t wlmaker_decorations_clip_button_size
 
const bs_test_case_t wlmaker_decorations_test_cases []
 

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.

Provides methods for drawing decorations on a cairo drawable.

Function Documentation

◆ wlmaker_decorations_draw_clip()

bool wlmaker_decorations_draw_clip ( cairo_t * cairo_ptr,
const wlmtk_style_fill_t * fill_ptr,
bool pressed )

Draws the clip's tile into |cairo_ptr|.

This includes the tile with the diagonal bezel edges facing the triangle buttons, but excludes the triangle buttons. Excludes the text.

Parameters
cairo_ptr
fill_ptr
pressed
Returns
true, iff the clip was drawn.

◆ wlmaker_decorations_draw_clip_button_next()

bool wlmaker_decorations_draw_clip_button_next ( cairo_t * cairo_ptr,
const wlmtk_style_fill_t * fill_ptr,
bool pressed )

Draws the north-eastern clip button ("next") onto |cairo_ptr|.

Parameters
cairo_ptr
fill_ptr
pressed
Returns
true, iff the button was drawn.

◆ wlmaker_decorations_draw_clip_button_prev()

bool wlmaker_decorations_draw_clip_button_prev ( cairo_t * cairo_ptr,
const wlmtk_style_fill_t * fill_ptr,
bool pressed )

Draws the south-western clip button ("prev") onto |cairo_ptr|.

Parameters
cairo_ptr
fill_ptr
pressed
Returns
true, iff the button was drawn.

◆ wlmaker_decorations_draw_iconified()

void wlmaker_decorations_draw_iconified ( cairo_t * cairo_ptr,
const wlmtk_style_fill_t * fill_ptr,
uint32_t font_color,
const char * title_ptr )

Draws the title of an iconified on to cairo_ptr.

Parameters
cairo_ptr
fill_ptr
font_color
title_ptr

◆ wlmaker_decorations_draw_tile()

void wlmaker_decorations_draw_tile ( cairo_t * cairo_ptr,
const wlmtk_style_fill_t * fill_ptr,
bool pressed )

Draws a tile into the cairo_t.

Parameters
cairo_ptr
fill_ptr
pressed

◆ wlmaker_decorations_draw_tile_icon()

bool wlmaker_decorations_draw_tile_icon ( cairo_t * cairo_ptr,
const char * icon_path_ptr )

Loads an icon and draws it onto the pre-drawn tile at |cairo_ptr|.

Parameters
cairo_ptr
icon_path_ptr
Returns
true if the icon was loaded (and then drawn) successfully.

Variable Documentation

◆ wlmaker_decorations_clip_button_size

const uint32_t wlmaker_decorations_clip_button_size
extern

Size of the clip button (length of the catheti)

◆ wlmaker_decorations_test_cases

const bs_test_case_t wlmaker_decorations_test_cases[]
extern

Unit tests.

◆ wlmaker_decorations_tile_size

const uint32_t wlmaker_decorations_tile_size
extern

Hardcoded: Default size of tiles.