parent
a1f7517f39
commit
33aebf6fd1
|
@ -149,27 +149,6 @@ bool browser_destroy( struct s_browser * b )
|
|||
return( true );
|
||||
}
|
||||
|
||||
bool browser_attach_frame( struct gui_window * container, struct gui_window * frame )
|
||||
{
|
||||
struct browser_window * cbw = container->browser->bw;
|
||||
int lt = CLT_STACK;
|
||||
if (cbw->rows >= cbw->cols)
|
||||
lt = CLT_VERTICAL;
|
||||
else
|
||||
lt = CLT_HORIZONTAL;
|
||||
|
||||
printf("attaching frame as: %s\n", (lt == CLT_VERTICAL) ? "CLT_VERTICAL" : "CLT_HORIZONTAL" );
|
||||
/* todo: if first frame, remove compwin, or something like that, because it is still occupiying space */
|
||||
container->browser->compwin->h_max = 0;
|
||||
container->browser->compwin->w_max = 0;
|
||||
container->browser->comp->flex = 0;
|
||||
container->browser->comp->size = 300;
|
||||
container->browser->comp->type = lt;
|
||||
mt_CompAttach( &app, container->browser->comp, frame->browser->comp );
|
||||
browser_update_rects( container );
|
||||
frame->browser->attached = true;
|
||||
}
|
||||
|
||||
void browser_get_rect( struct gui_window * gw, enum browser_rect type, LGRECT * out)
|
||||
{
|
||||
GRECT work;
|
||||
|
@ -210,7 +189,7 @@ void browser_get_rect( struct gui_window * gw, enum browser_rect type, LGRECT *
|
|||
void browser_update_rects(struct gui_window * gw )
|
||||
{
|
||||
short buff[8];
|
||||
LGRECT cmprect;
|
||||
LGRECT cmprect;
|
||||
mt_WindGetGrect( &app, gw->root->handle, WF_CURRXYWH, (GRECT*)&buff[4]);
|
||||
buff[0] = CM_REFLOW;
|
||||
buff[1] = _AESapid;
|
||||
|
@ -351,7 +330,7 @@ static void __CDECL browser_evnt_mbutton( WINDOW * c, short buff[8], void * data
|
|||
if( i == 2 ) {
|
||||
browser_window_mouse_click(gw->browser->bw,BROWSER_MOUSE_PRESS_2,sx,sy);
|
||||
bmstate |= BROWSER_MOUSE_HOLDING_2 | BROWSER_MOUSE_DRAG_ON;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( i == 1 ) {
|
||||
bmstate |= BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_DRAG_ON;
|
||||
|
@ -383,7 +362,6 @@ static void __CDECL browser_evnt_mbutton( WINDOW * c, short buff[8], void * data
|
|||
browser_window_mouse_click(gw->browser->bw,BROWSER_MOUSE_CLICK_1,sx,sy);
|
||||
bmstate &= ~( BROWSER_MOUSE_HOLDING_1 | BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_CLICK_1);
|
||||
}
|
||||
|
||||
if( i == 2 ) {
|
||||
LOG(("Click within %s at %d / %d", gw->browser->bw->name, mx, my ));
|
||||
browser_window_mouse_click(gw->browser->bw,BROWSER_MOUSE_PRESS_1,sx,sy);
|
||||
|
|
|
@ -103,7 +103,6 @@ bool browser_input( struct gui_window * gw, unsigned short nkc ) ;
|
|||
void browser_redraw( struct gui_window * gw );
|
||||
void browser_set_content_size(struct gui_window * gw, int w, int h);
|
||||
void browser_scroll( struct gui_window * gw, short MODE, int value, bool abs );
|
||||
bool browser_attach_frame( struct gui_window * container, struct gui_window * frame );
|
||||
struct gui_window * browser_find_root( struct gui_window * gw );
|
||||
static void browser_process_scroll( struct gui_window * gw, LGRECT bwrect );
|
||||
bool browser_redraw_required( struct gui_window * gw);
|
||||
|
|
|
@ -838,8 +838,7 @@ gui_selection_traverse_handler(const char *text,
|
|||
bool gui_copy_to_clipboard(struct selection *s)
|
||||
{
|
||||
bool ret = false;
|
||||
if( (s->defined) && (s->bw != NULL) && (s->bw->window != NULL) &&
|
||||
(s->bw->window->root != NULL )) {
|
||||
if( s->defined ) {
|
||||
gui_empty_clipboard();
|
||||
if(selection_traverse(s, gui_selection_traverse_handler, NULL)){
|
||||
ret = gui_commit_clipboard();
|
||||
|
@ -1089,7 +1088,7 @@ static void gui_init(int argc, char** argv)
|
|||
option_gui_colour_fg_2 = 0x000000; /** Foreground selected (bbggrr) */
|
||||
}
|
||||
|
||||
static char *theapp = "NetSurf";
|
||||
static char *theapp = (char*)"NetSurf";
|
||||
static void gui_init2(int argc, char** argv)
|
||||
{
|
||||
struct browser_window *bw;
|
||||
|
|
|
@ -100,8 +100,7 @@ typedef struct s_browser * CMP_BROWSER;
|
|||
/*
|
||||
This is the "main" window. It can consist of several components
|
||||
and also holds information shared by several frames within
|
||||
the window. Each frame, no matter how deep nested,
|
||||
knows about it's root (GEM window).
|
||||
the window.
|
||||
*/
|
||||
struct s_gui_win_root
|
||||
{
|
||||
|
@ -121,8 +120,7 @@ struct s_gui_win_root
|
|||
This is the part of the gui which is known by netsurf core.
|
||||
You must implement it. Altough, you are free how to do it.
|
||||
Each of the browser "viewports" managed by netsurf are bound
|
||||
to this structure. gui_window does not mean that it is an
|
||||
comple window - also frames own an gui_window.
|
||||
to this structure.
|
||||
*/
|
||||
struct gui_window {
|
||||
struct s_gui_win_root * root;
|
||||
|
|
|
@ -26,6 +26,7 @@ extern int option_atari_font_monochrom;
|
|||
extern int option_atari_dither;
|
||||
extern int option_atari_transparency;
|
||||
extern int option_atari_knockout;
|
||||
extern int option_atari_realtime_move;
|
||||
extern char *option_atari_face_sans_serif; /* default sans face */
|
||||
extern char *option_atari_face_sans_serif_bold; /* bold sans face */
|
||||
extern char *option_atari_face_sans_serif_italic; /* bold sans face */
|
||||
|
@ -49,13 +50,14 @@ int option_atari_font_monochrom = 0;\
|
|||
int option_atari_dither = 1;\
|
||||
int option_atari_transparency = 1;\
|
||||
int option_atari_knockout = 0;\
|
||||
char *option_atari_face_sans_serif; \
|
||||
char *option_atari_face_sans_serif_bold; \
|
||||
char *option_atari_face_sans_serif_italic; \
|
||||
char *option_atari_face_sans_serif_italic_bold; \
|
||||
char *option_atari_face_monospace; \
|
||||
char *option_atari_face_monospace_bold; \
|
||||
char *option_atari_face_serif; \
|
||||
int option_atari_realtime_move = 0; \
|
||||
char *option_atari_face_sans_serif;\
|
||||
char *option_atari_face_sans_serif_bold;\
|
||||
char *option_atari_face_sans_serif_italic;\
|
||||
char *option_atari_face_sans_serif_italic_bold;\
|
||||
char *option_atari_face_monospace;\
|
||||
char *option_atari_face_monospace_bold;\
|
||||
char *option_atari_face_serif;\
|
||||
char *option_atari_face_serif_bold; \
|
||||
char *option_atari_face_cursive; \
|
||||
char *option_atari_face_fantasy; \
|
||||
|
@ -71,6 +73,7 @@ char *option_tree_icons_path = (char*)"./res/icons";
|
|||
{ "atari_transparency", OPTION_INTEGER, &option_atari_transparency },\
|
||||
{ "atari_knockout", OPTION_INTEGER, &option_atari_knockout },\
|
||||
{ "atari_dither", OPTION_INTEGER, &option_atari_dither },\
|
||||
{ "atari_realtime_move", OPTION_INTEGER, &option_atari_realtime_move },\
|
||||
{ "font_face_sans_serif", OPTION_STRING, &option_atari_face_sans_serif },\
|
||||
{ "font_face_sans_serif_bold", OPTION_STRING, &option_atari_face_sans_serif_bold },\
|
||||
{ "font_face_sans_serif_italic", OPTION_STRING, &option_atari_face_sans_serif_italic },\
|
||||
|
|
Loading…
Reference in New Issue