mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 02:32:44 +03:00
allow beos frontend to make clipboard functions private.
reduces the unecessary export of clipboard functions in beos frontend and also removes inclusion of unecessary headers.
This commit is contained in:
parent
6da3b3102c
commit
246ab6d9ff
@ -948,10 +948,6 @@ void die(const char * const error)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct gui_clipboard_table beos_clipboard_table = {
|
|
||||||
gui_get_clipboard,
|
|
||||||
gui_set_clipboard,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct gui_fetch_table beos_fetch_table = {
|
static struct gui_fetch_table beos_fetch_table = {
|
||||||
fetch_filetype,
|
fetch_filetype,
|
||||||
@ -981,7 +977,7 @@ int main(int argc, char** argv)
|
|||||||
&beos_misc_table,
|
&beos_misc_table,
|
||||||
beos_window_table,
|
beos_window_table,
|
||||||
beos_download_table,
|
beos_download_table,
|
||||||
&beos_clipboard_table,
|
beos_clipboard_table,
|
||||||
&beos_fetch_table,
|
&beos_fetch_table,
|
||||||
NULL, /* use POSIX file */
|
NULL, /* use POSIX file */
|
||||||
NULL, /* default utf8 */
|
NULL, /* default utf8 */
|
||||||
|
@ -407,7 +407,7 @@ static struct gui_window *gui_window_create(struct browser_window *bw,
|
|||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported interface documented in beos/window.h */
|
||||||
void nsbeos_dispatch_event(BMessage *message)
|
void nsbeos_dispatch_event(BMessage *message)
|
||||||
{
|
{
|
||||||
struct gui_window *gui = NULL;
|
struct gui_window *gui = NULL;
|
||||||
@ -1266,7 +1266,7 @@ static void gui_start_selection(struct gui_window *g)
|
|||||||
g->view->UnlockLooper();
|
g->view->UnlockLooper();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_get_clipboard(char **buffer, size_t *length)
|
static void gui_get_clipboard(char **buffer, size_t *length)
|
||||||
{
|
{
|
||||||
BMessage *clip;
|
BMessage *clip;
|
||||||
*length = 0;
|
*length = 0;
|
||||||
@ -1288,7 +1288,7 @@ void gui_get_clipboard(char **buffer, size_t *length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_set_clipboard(const char *buffer, size_t length,
|
static void gui_set_clipboard(const char *buffer, size_t length,
|
||||||
nsclipboard_styles styles[], int n_styles)
|
nsclipboard_styles styles[], int n_styles)
|
||||||
{
|
{
|
||||||
BMessage *clip;
|
BMessage *clip;
|
||||||
@ -1320,6 +1320,13 @@ void gui_set_clipboard(const char *buffer, size_t length,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct gui_clipboard_table clipboard_table = {
|
||||||
|
gui_get_clipboard,
|
||||||
|
gui_set_clipboard,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct gui_clipboard_table *beos_clipboard_table = &clipboard_table;
|
||||||
|
|
||||||
static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
|
static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height,
|
||||||
bool scaled)
|
bool scaled)
|
||||||
{
|
{
|
||||||
|
@ -19,49 +19,61 @@
|
|||||||
#ifndef NETSURF_BEOS_WINDOW_H
|
#ifndef NETSURF_BEOS_WINDOW_H
|
||||||
#define NETSURF_BEOS_WINDOW_H 1
|
#define NETSURF_BEOS_WINDOW_H 1
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "content/content.h"
|
|
||||||
#include "desktop/browser.h"
|
|
||||||
}
|
|
||||||
#include "beos/scaffolding.h"
|
|
||||||
|
|
||||||
extern struct gui_window_table *beos_window_table;
|
extern struct gui_window_table *beos_window_table;
|
||||||
|
extern struct gui_clipboard_table *beos_clipboard_table;
|
||||||
|
|
||||||
|
struct gui_window;
|
||||||
|
struct browser_window;
|
||||||
|
struct beos_scaffolding;
|
||||||
|
|
||||||
class NSBrowserFrameView : public BView {
|
class NSBrowserFrameView : public BView {
|
||||||
public:
|
public:
|
||||||
NSBrowserFrameView(BRect frame, struct gui_window *gui);
|
NSBrowserFrameView(BRect frame, struct gui_window *gui);
|
||||||
virtual ~NSBrowserFrameView();
|
virtual ~NSBrowserFrameView();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
|
|
||||||
//virtual void FrameMoved(BPoint new_location);
|
//virtual void FrameMoved(BPoint new_location);
|
||||||
virtual void FrameResized(float new_width, float new_height);
|
virtual void FrameResized(float new_width, float new_height);
|
||||||
|
|
||||||
virtual void KeyDown(const char *bytes, int32 numBytes);
|
virtual void KeyDown(const char *bytes, int32 numBytes);
|
||||||
virtual void MouseDown(BPoint where);
|
virtual void MouseDown(BPoint where);
|
||||||
virtual void MouseUp(BPoint where);
|
virtual void MouseUp(BPoint where);
|
||||||
virtual void MouseMoved(BPoint where, uint32 transit, const BMessage *msg);
|
virtual void MouseMoved(BPoint where, uint32 transit, const BMessage *msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct gui_window *fGuiWindow;
|
struct gui_window *fGuiWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process beos messages into browser operations.
|
||||||
|
*
|
||||||
|
* \param message The beos message to process.
|
||||||
|
*/
|
||||||
void nsbeos_dispatch_event(BMessage *message);
|
void nsbeos_dispatch_event(BMessage *message);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cause all windows to be reflowed.
|
||||||
|
*/
|
||||||
void nsbeos_reflow_all_windows(void);
|
void nsbeos_reflow_all_windows(void);
|
||||||
|
|
||||||
nsbeos_scaffolding *nsbeos_get_scaffold(struct gui_window *g);
|
/**
|
||||||
|
* Get containing scaffold of a beos gui window
|
||||||
|
*
|
||||||
|
* \param g gui window to find scaffold of.
|
||||||
|
* \return The containing scaffold.
|
||||||
|
*/
|
||||||
|
struct beos_scaffolding *nsbeos_get_scaffold(struct gui_window *g);
|
||||||
|
|
||||||
struct browser_window *nsbeos_get_browser_for_gui(struct gui_window *g);
|
struct browser_window *nsbeos_get_browser_for_gui(struct gui_window *g);
|
||||||
|
|
||||||
float nsbeos_get_scale_for_gui(struct gui_window *g);
|
float nsbeos_get_scale_for_gui(struct gui_window *g);
|
||||||
|
|
||||||
int nsbeos_gui_window_update_targets(struct gui_window *g);
|
int nsbeos_gui_window_update_targets(struct gui_window *g);
|
||||||
|
|
||||||
void nsbeos_window_destroy_browser(struct gui_window *g);
|
void nsbeos_window_destroy_browser(struct gui_window *g);
|
||||||
|
|
||||||
struct browser_window *nsbeos_get_browser_window(struct gui_window *g);
|
struct browser_window *nsbeos_get_browser_window(struct gui_window *g);
|
||||||
|
|
||||||
void gui_get_clipboard(char **buffer, size_t *length);
|
|
||||||
void gui_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles);
|
|
||||||
|
|
||||||
#endif /* NETSURF_BEOS_WINDOW_H */
|
#endif /* NETSURF_BEOS_WINDOW_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user