|
wlmaker
|
#include <cairo.h>#include <libbase/libbase.h>#include <math.h>#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <wayland-server-core.h>#include <wayland-util.h>#include <xkbcommon/xkbcommon-keysyms.h>#include <xkbcommon/xkbcommon.h>#include "libwlclient/xdg_toplevel.h"#include "libwlclient/libwlclient.h"#include "libwlclient/icon.h"
Functions | |
| static void | _handle_key (struct wl_listener *listener_ptr, void *data_ptr) |
| static double | sqr (double x) |
| void | _draw_around (cairo_t *cairo_ptr, double x, double y, int width, int height) |
| void | _draw_pupil (cairo_t *cairo_ptr, double pointer_x, double pointer_y, double px, double py, double w, double h, int width, int height) |
| static bool | _callback (bs_gfxbuf_t *gfxbuf_ptr, void *ud_ptr) |
| static void | _position_callback (double x, double y, void *ud_ptr) |
| static bool | _icon_callback (bs_gfxbuf_t *gfxbuf_ptr, void *ud_ptr) |
| static void | _icon_position_callback (double x, double y, void *ud_ptr) |
| int | main (int argc, const char **argv) |
Variables | |
| wlclient_t * | wlclient_ptr |
| static struct wl_listener | _key_listener |
| double | pointer_x |
| double | pointer_y |
| double | icon_pointer_x |
| double | icon_pointer_y |
| uint32_t | toplevel_width |
| uint32_t | toplevel_height |
| static const bs_arg_t | _wlmeyes_args [] |
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 |
Draws something into the buffer.
| void _draw_around | ( | cairo_t * | cairo_ptr, |
| double | x, | ||
| double | y, | ||
| int | width, | ||
| int | height ) |
Draws the white + border of the eye.
| void _draw_pupil | ( | cairo_t * | cairo_ptr, |
| double | pointer_x, | ||
| double | pointer_y, | ||
| double | px, | ||
| double | py, | ||
| double | w, | ||
| double | h, | ||
| int | width, | ||
| int | height ) |
Draws the eyes' pupil, in relative coordinates.
|
static |
Handles key events.
|
static |
Called when the icon is ready to refresh.
|
static |
Updates pointer position for the icon.
|
static |
Updates pointer position.
| int main | ( | int | argc, |
| const char ** | argv ) |
Main program.
|
inlinestatic |
|
static |
Listener for key events.
|
static |
Commandline arguments.
| double icon_pointer_x |
Most recent X position of the pointer relative to the ivon.
| double icon_pointer_y |
Most recent Y position of the pointer relative to the ivon.
| double pointer_x |
Most recent X position of the pointer.
| double pointer_y |
Most recent Y position of the pointer.
| uint32_t toplevel_height |
Desired height of the toplevel, in pixels.
| uint32_t toplevel_width |
Desired width of the toplevel, in pixels.
| wlclient_t* wlclient_ptr |
State of the client.