root/src/nsxwidget.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


     1 /* Header for NS Cocoa part of xwidget and webkit widget.
     2 
     3 Copyright (C) 2019-2023 Free Software Foundation, Inc.
     4 
     5 This file is part of GNU Emacs.
     6 
     7 GNU Emacs is free software: you can redistribute it and/or modify
     8 it under the terms of the GNU General Public License as published by
     9 the Free Software Foundation, either version 3 of the License, or (at
    10 your option) any later version.
    11 
    12 GNU Emacs is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
    16 
    17 You should have received a copy of the GNU General Public License
    18 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
    19 
    20 #ifndef NSXWIDGET_H_INCLUDED
    21 #define NSXWIDGET_H_INCLUDED
    22 
    23 /* This file can be included from non-objc files through 'xwidget.h'.  */
    24 #ifdef __OBJC__
    25 #import <AppKit/NSView.h>
    26 #endif
    27 
    28 #include "dispextern.h"
    29 #include "lisp.h"
    30 #include "xwidget.h"
    31 
    32 /* Functions for xwidget webkit.  */
    33 
    34 bool nsxwidget_is_web_view (struct xwidget *xw);
    35 Lisp_Object nsxwidget_webkit_uri (struct xwidget *xw);
    36 Lisp_Object nsxwidget_webkit_title (struct xwidget *xw);
    37 void nsxwidget_webkit_goto_uri (struct xwidget *xw, const char *uri);
    38 void nsxwidget_webkit_goto_history (struct xwidget *xw, int rel_pos);
    39 double nsxwidget_webkit_estimated_load_progress(struct xwidget *xw);
    40 void nsxwidget_webkit_stop_loading (struct xwidget *xw);
    41 void nsxwidget_webkit_zoom (struct xwidget *xw, double zoom_change);
    42 void nsxwidget_webkit_execute_script (struct xwidget *xw, const char *script,
    43                                       Lisp_Object fun);
    44 
    45 /* Functions for xwidget model.  */
    46 
    47 #ifdef __OBJC__
    48 @interface XwWindow : NSView
    49 @property struct xwidget *xw;
    50 @end
    51 #endif
    52 
    53 void nsxwidget_init (struct xwidget *xw);
    54 void nsxwidget_kill (struct xwidget *xw);
    55 void nsxwidget_resize (struct xwidget *xw);
    56 Lisp_Object nsxwidget_get_size (struct xwidget *xw);
    57 
    58 /* Functions for xwidget view.  */
    59 
    60 #ifdef __OBJC__
    61 @interface XvWindow : NSView
    62 @property struct xwidget *xw;
    63 @property struct xwidget_view *xv;
    64 @end
    65 #endif
    66 
    67 void nsxwidget_init_view (struct xwidget_view *xv,
    68                           struct xwidget *xww,
    69                           struct glyph_string *s,
    70                           int x, int y);
    71 void nsxwidget_delete_view (struct xwidget_view *xv);
    72 
    73 void nsxwidget_show_view (struct xwidget_view *xv);
    74 void nsxwidget_hide_view (struct xwidget_view *xv);
    75 void nsxwidget_resize_view (struct xwidget_view *xv,
    76                             int widget, int height);
    77 
    78 void nsxwidget_move_view (struct xwidget_view *xv, int x, int y);
    79 void nsxwidget_move_widget_in_view (struct xwidget_view *xv, int x, int y);
    80 void nsxwidget_set_needsdisplay (struct xwidget_view *xv);
    81 
    82 #endif /* NSXWIDGET_H_INCLUDED */

/* [<][>][^][v][top][bottom][index][help] */