root/src/haikuselect.h

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

INCLUDED FROM


     1 /* Haiku window system selection support. Hey Emacs, this is -*- C++ -*-
     2    Copyright (C) 2021-2023 Free Software Foundation, Inc.
     3 
     4 This file is part of GNU Emacs.
     5 
     6 GNU Emacs is free software: you can redistribute it and/or modify
     7 it under the terms of the GNU General Public License as published by
     8 the Free Software Foundation, either version 3 of the License, or (at
     9 your option) any later version.
    10 
    11 GNU Emacs is distributed in the hope that it will be useful,
    12 but WITHOUT ANY WARRANTY; without even the implied warranty of
    13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14 GNU General Public License for more details.
    15 
    16 You should have received a copy of the GNU General Public License
    17 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
    18 
    19 #ifndef _HAIKU_SELECT_H_
    20 #define _HAIKU_SELECT_H_
    21 
    22 #ifdef __cplusplus
    23 #include <cstdio>
    24 #include <cstdint>
    25 #else /* !__cplusplus */
    26 #include <stdio.h>
    27 #include <stdint.h>
    28 #endif /* __cplusplus */
    29 
    30 #include <SupportDefs.h>
    31 
    32 enum haiku_clipboard
    33   {
    34     CLIPBOARD_PRIMARY,
    35     CLIPBOARD_SECONDARY,
    36     CLIPBOARD_CLIPBOARD
    37   };
    38 
    39 #ifdef __cplusplus
    40 extern "C"
    41 {
    42 #endif /* __cplusplus */
    43 /* Defined in haikuselect.c.  */
    44 extern void haiku_selection_disowned (enum haiku_clipboard, int64);
    45 
    46 /* Defined in haiku_select.cc.  */
    47 extern void be_clipboard_init (void);
    48 extern char *be_find_clipboard_data (enum haiku_clipboard, const char *,
    49                                      ssize_t *);
    50 extern void be_set_clipboard_data (enum haiku_clipboard, const char *,
    51                                    const char *, ssize_t, bool);
    52 extern bool be_clipboard_owner_p (enum haiku_clipboard);
    53 extern void be_update_clipboard_count (enum haiku_clipboard);
    54 
    55 extern int be_enum_message (void *, int32 *, int32, int32 *, const char **);
    56 extern int be_get_message_data (void *, const char *, int32, int32,
    57                                 const void **, ssize_t *);
    58 extern int be_get_refs_data (void *, const char *, int32, char **);
    59 extern int be_get_point_data (void *, const char *, int32, float *, float *);
    60 extern uint32 be_get_message_type (void *);
    61 extern void be_set_message_type (void *, uint32);
    62 extern void *be_get_message_message (void *, const char *, int32);
    63 extern void *be_create_simple_message (void);
    64 extern int be_add_message_data (void *, const char *, int32, const void *,
    65                                 ssize_t);
    66 extern int be_add_refs_data (void *, const char *, const char *);
    67 extern int be_add_point_data (void *, const char *, float, float);
    68 extern int be_add_message_message (void *, const char *, void *);
    69 extern int be_lock_clipboard_message (enum haiku_clipboard, void **, bool);
    70 extern void be_unlock_clipboard (enum haiku_clipboard, bool);
    71 extern void be_handle_clipboard_changed_message (void);
    72 extern void be_start_watching_selection (enum haiku_clipboard);
    73 extern bool be_selection_outdated_p (enum haiku_clipboard, int64);
    74 extern int64 be_get_clipboard_count (enum haiku_clipboard);
    75 
    76 
    77 
    78 extern intmax_t be_display_notification (const char *, const char *,
    79                                          intmax_t, int, const char *);
    80 
    81 #ifdef __cplusplus
    82 };
    83 #endif /* __cplusplus */
    84 #endif /* _HAIKU_SELECT_H_ */
    85 
    86 // Local Variables:
    87 // eval: (setf (alist-get 'inextern-lang c-offsets-alist) 0)
    88 // End:

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