ffi: Eliminate squeek_button and squeek_row

This commit is contained in:
Dorota Czaplejewicz
2020-12-04 15:34:31 +00:00
parent 9522d4e302
commit c6cc58fd8e
5 changed files with 1 additions and 30 deletions

View File

@ -31,10 +31,6 @@
static void render_button_label (cairo_t *cr, GtkStyleContext *ctx, static void render_button_label (cairo_t *cr, GtkStyleContext *ctx,
const gchar *label, EekBounds bounds); const gchar *label, EekBounds bounds);
void eek_render_button (EekRenderer *self,
cairo_t *cr, const struct squeek_button *button,
gboolean pressed, gboolean locked);
static void static void
render_outline (cairo_t *cr, render_outline (cairo_t *cr,
GtkStyleContext *ctx, GtkStyleContext *ctx,

View File

@ -90,13 +90,5 @@ struct transformation {
gdouble scale; gdouble scale;
}; };
struct squeek_button;
struct squeek_row;
/// Represents the path to the button within a view
struct button_place {
const struct squeek_row *row;
const struct squeek_button *button;
};
G_END_DECLS G_END_DECLS
#endif /* EEK_TYPES_H */ #endif /* EEK_TYPES_H */

View File

@ -26,7 +26,6 @@ struct squeek_layout_state {
struct squeek_layout; struct squeek_layout;
void squeek_button_print(const struct squeek_button* button);
struct transformation squeek_layout_calculate_transformation( struct transformation squeek_layout_calculate_transformation(
const struct squeek_layout *layout, const struct squeek_layout *layout,

View File

@ -41,7 +41,7 @@ pub mod c {
use super::*; use super::*;
use gtk_sys; use gtk_sys;
use std::os::raw::{ c_char, c_void }; use std::os::raw::c_void;
use std::ops::{ Add, Sub }; use std::ops::{ Add, Sub };
@ -161,13 +161,6 @@ pub mod c {
// The following defined in Rust. TODO: wrap naked pointers to Rust data inside RefCells to prevent multiple writers // The following defined in Rust. TODO: wrap naked pointers to Rust data inside RefCells to prevent multiple writers
#[no_mangle]
pub extern "C"
fn squeek_button_print(button: *const ::layout::Button) {
let button = unsafe { &*button };
println!("{:?}", button);
}
/// Positions the layout contents within the available space. /// Positions the layout contents within the available space.
/// The origin of the transformation is the point inside the margins. /// The origin of the transformation is the point inside the margins.
#[no_mangle] #[no_mangle]

View File

@ -1,9 +0,0 @@
#ifndef POPOVER_H__
#define POPOVER_H__
#include <gtk/gtk.h>
#include "eek/eek-keyboard.h"
void squeek_popover_show(GtkWidget*, struct button_place);
#endif