"Fossies" - the Fresh Open Source Software Archive

Member "gimp-2.10.28/app/actions/actions.h" (14 Sep 2021, 4869 Bytes) of package /linux/misc/gimp-2.10.28.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "actions.h" see the Fossies "Dox" file reference documentation.

    1 /* GIMP - The GNU Image Manipulation Program
    2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
    3  *
    4  * This program is free software: you can redistribute it and/or modify
    5  * it under the terms of the GNU General Public License as published by
    6  * the Free Software Foundation; either version 3 of the License, or
    7  * (at your option) any later version.
    8  *
    9  * This program is distributed in the hope that it will be useful,
   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12  * GNU General Public License for more details.
   13  *
   14  * You should have received a copy of the GNU General Public License
   15  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
   16  */
   17 
   18 #ifndef __ACTIONS_H__
   19 #define __ACTIONS_H__
   20 
   21 
   22 extern GimpActionFactory *global_action_factory;
   23 
   24 
   25 void               actions_init            (Gimp                 *gimp);
   26 void               actions_exit            (Gimp                 *gimp);
   27 
   28 Gimp             * action_data_get_gimp    (gpointer              data);
   29 GimpContext      * action_data_get_context (gpointer              data);
   30 GimpImage        * action_data_get_image   (gpointer              data);
   31 GimpDisplay      * action_data_get_display (gpointer              data);
   32 GimpDisplayShell * action_data_get_shell   (gpointer              data);
   33 GtkWidget        * action_data_get_widget  (gpointer              data);
   34 gint               action_data_sel_count   (gpointer              data);
   35 
   36 gdouble            action_select_value     (GimpActionSelectType  select_type,
   37                                             gdouble               value,
   38                                             gdouble               min,
   39                                             gdouble               max,
   40                                             gdouble               def,
   41                                             gdouble               small_inc,
   42                                             gdouble               inc,
   43                                             gdouble               skip_inc,
   44                                             gdouble               delta_factor,
   45                                             gboolean              wrap);
   46 void               action_select_property  (GimpActionSelectType  select_type,
   47                                             GimpDisplay          *display,
   48                                             GObject              *object,
   49                                             const gchar          *property_name,
   50                                             gdouble               small_inc,
   51                                             gdouble               inc,
   52                                             gdouble               skip_inc,
   53                                             gdouble               delta_factor,
   54                                             gboolean              wrap);
   55 GimpObject       * action_select_object    (GimpActionSelectType  select_type,
   56                                             GimpContainer        *container,
   57                                             GimpObject           *current);
   58 void               action_message          (GimpDisplay          *display,
   59                                             GObject              *object,
   60                                             const gchar          *format,
   61                                             ...) G_GNUC_PRINTF(3,4);
   62 
   63 
   64 #define return_if_no_gimp(gimp,data) \
   65   gimp = action_data_get_gimp (data); \
   66   if (! gimp) \
   67     return
   68 
   69 #define return_if_no_context(context,data) \
   70   context = action_data_get_context (data); \
   71   if (! context) \
   72     return
   73 
   74 #define return_if_no_image(image,data) \
   75   image = action_data_get_image (data); \
   76   if (! image) \
   77     return
   78 
   79 #define return_if_no_display(display,data) \
   80   display = action_data_get_display (data); \
   81   if (! display) \
   82     return
   83 
   84 #define return_if_no_shell(shell,data) \
   85   shell = action_data_get_shell (data); \
   86   if (! shell) \
   87     return
   88 
   89 #define return_if_no_widget(widget,data) \
   90   widget = action_data_get_widget (data); \
   91   if (! widget) \
   92     return
   93 
   94 
   95 #define return_if_no_drawable(image,drawable,data) \
   96   return_if_no_image (image,data); \
   97   drawable = gimp_image_get_active_drawable (image); \
   98   if (! drawable) \
   99     return
  100 
  101 #define return_if_no_layer(image,layer,data) \
  102   return_if_no_image (image,data); \
  103   layer = gimp_image_get_active_layer (image); \
  104   if (! layer) \
  105     return
  106 
  107 #define return_if_no_channel(image,channel,data) \
  108   return_if_no_image (image,data); \
  109   channel = gimp_image_get_active_channel (image); \
  110   if (! channel) \
  111     return
  112 
  113 #define return_if_no_vectors(image,vectors,data) \
  114   return_if_no_image (image,data); \
  115   vectors = gimp_image_get_active_vectors (image); \
  116   if (! vectors) \
  117     return
  118 
  119 
  120 #endif /* __ACTIONS_H__ */