wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
clip.c File Reference
#include "clip.h"
#include "button.h"
#include "config.h"
#include "decorations.h"
#include "toolkit/toolkit.h"
Include dependency graph for clip.c:

Classes

struct  _wlmaker_clip_t
 

Functions

static wlmaker_clip_tclip_from_view (wlmaker_view_t *view_ptr)
 
static void clip_get_size (wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
 
static void draw_workspace (cairo_t *cairo_ptr, int num, const char *name_ptr)
 
static void callback_prev (wlmaker_interactive_t *interactive_ptr, void *data_ptr)
 
static void callback_next (wlmaker_interactive_t *interactive_ptr, void *data_ptr)
 
static void handle_workspace_changed (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_axis (wlmaker_view_t *view_ptr, struct wlr_pointer_axis_event *event_ptr)
 
wlmaker_clip_twlmaker_clip_create (wlmaker_server_t *server_ptr)
 
void wlmaker_clip_destroy (wlmaker_clip_t *clip_ptr)
 

Variables

const wlmaker_view_impl_t clip_view_impl
 

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.

Function Documentation

◆ callback_next()

void callback_next ( wlmaker_interactive_t * interactive_ptr,
void * data_ptr )
static

Called when the "next" button is clicked on the clip.

Parameters
interactive_ptr
data_ptrpoints to the wlmaker_clip_t.

◆ callback_prev()

void callback_prev ( wlmaker_interactive_t * interactive_ptr,
void * data_ptr )
static

Called when the "previous" button is clicked on the clip.

Parameters
interactive_ptr
data_ptrpoints to the wlmaker_clip_t.

◆ clip_from_view()

wlmaker_clip_t * clip_from_view ( wlmaker_view_t * view_ptr)
static

Typecast: Retrieves the wlmaker_clip_t for the given |view_ptr|.

Parameters
view_ptr
Returns
A pointer to the wlmaker_clip_t holding |view_ptr|.

◆ clip_get_size()

void clip_get_size ( wlmaker_view_t * view_ptr,
uint32_t * width_ptr,
uint32_t * height_ptr )
static

Gets the size of the clip in pixels.

Parameters
view_ptr
width_ptr
height_ptr

◆ draw_workspace()

void draw_workspace ( cairo_t * cairo_ptr,
int num,
const char * name_ptr )
static

Draws workspace details onto the |cairo_ptr|.

Parameters
cairo_ptr
numNumber (index) of the workspace.
name_ptrName of the workspace.

◆ handle_axis()

void handle_axis ( wlmaker_view_t * view_ptr,
struct wlr_pointer_axis_event * event_ptr )
static

Handles axis events: Move to previous, respectively next workspace.

Parameters
view_ptr
event_ptr

◆ handle_workspace_changed()

void handle_workspace_changed ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the workspace_changed signal of wlmaker_server_t.

Will redraw the clip contents with the current workspace, and re-map the clip to the new workspace.

Parameters
listener_ptr
data_ptrPoints to the new wlmaker_workspace_t.

◆ wlmaker_clip_create()

wlmaker_clip_t * wlmaker_clip_create ( wlmaker_server_t * server_ptr)

Creates the Clip handle. Needs the server to be up with workspaces running.

Parameters
server_ptr
Returns
Pointer to the Clip handle, or NULL on error.

TODO(kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h): Cleanup the code here - move the drawing functions to a separate function and make sure the return values are all respected.

◆ wlmaker_clip_destroy()

void wlmaker_clip_destroy ( wlmaker_clip_t * clip_ptr)

Destroys the Clip handle.

Parameters
clip_ptr

Variable Documentation

◆ clip_view_impl

const wlmaker_view_impl_t clip_view_impl
Initial value:
= {
.set_activated = NULL,
.get_size = clip_get_size,
.handle_axis = handle_axis
}
static void handle_axis(wlmaker_view_t *view_ptr, struct wlr_pointer_axis_event *event_ptr)
Definition clip.c:448
static void clip_get_size(wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
Definition clip.c:325

View implementor methods.