mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 06:10:30 +00:00
Move wayland stuff around
This commit is contained in:
parent
97ea1c6d0b
commit
c4bd599aec
4 changed files with 54 additions and 12 deletions
|
@ -106,16 +106,4 @@ void display_dump_monitor_layout ( void );
|
|||
*/
|
||||
void display_startup_notification ( RofiHelperExecuteContext *context, GSpawnChildSetupFunc *child_setup, gpointer *user_data );
|
||||
|
||||
|
||||
// !
|
||||
typedef struct _display_buffer_pool display_buffer_pool;
|
||||
display_buffer_pool *display_buffer_pool_new(gint width, gint height);
|
||||
void display_buffer_pool_free(display_buffer_pool *pool);
|
||||
|
||||
cairo_surface_t *display_buffer_pool_get_next_buffer(display_buffer_pool *pool);
|
||||
void display_surface_commit(cairo_surface_t *surface);
|
||||
|
||||
gboolean display_get_surface_dimensions ( int *width, int *height );
|
||||
void display_set_surface_dimensions ( int width, int height, int loc );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
#include "xcb.h"
|
||||
#include "theme.h"
|
||||
|
||||
#ifdef ENABLE_WAYLAND
|
||||
#include "wayland.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup ViewHandle
|
||||
*
|
||||
|
@ -125,8 +129,11 @@ struct RofiViewState
|
|||
/** Y position of the view */
|
||||
int y;
|
||||
|
||||
#ifdef ENABLE_WAYLAND
|
||||
/** wayland */
|
||||
display_buffer_pool *pool;
|
||||
gboolean frame_callback;
|
||||
#endif
|
||||
|
||||
/** Position and target of the mouse. */
|
||||
struct
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <libgwater-wayland.h>
|
||||
#include <nkutils-bindings.h>
|
||||
|
||||
#include "wayland.h"
|
||||
|
||||
typedef enum {
|
||||
WAYLAND_GLOBAL_COMPOSITOR,
|
||||
WAYLAND_GLOBAL_SHM,
|
||||
|
|
45
include/wayland.h
Normal file
45
include/wayland.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* rofi
|
||||
*
|
||||
* MIT/X11 License
|
||||
* Copyright © 2013-2020 Qball Cow <qball@gmpclient.org>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ROFI_WAYLAND_H
|
||||
#define ROFI_WAYLAND_H
|
||||
|
||||
#include <glib.h>
|
||||
#include <cairo.h>
|
||||
|
||||
typedef struct _display_buffer_pool display_buffer_pool;
|
||||
display_buffer_pool *display_buffer_pool_new(gint width, gint height);
|
||||
void display_buffer_pool_free(display_buffer_pool *pool);
|
||||
|
||||
cairo_surface_t *display_buffer_pool_get_next_buffer(display_buffer_pool *pool);
|
||||
void display_surface_commit(cairo_surface_t *surface);
|
||||
|
||||
gboolean display_get_surface_dimensions ( int *width, int *height );
|
||||
void display_set_surface_dimensions ( int width, int height, int loc );
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue