colourpick 4.51 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
/* Copyright 1996 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#ifndef __colourpicker_h
#define __colourpicker_h

/* C header file for ColourPicker
 * Copyright © Acorn Computers Ltd, 1993
 */

#ifndef __coords_h
   #include "coords.h"
#endif

#ifndef __os_h
   #include "os.h"
#endif

#ifndef __wimp_h
   #include "wimp.h"
#endif

/*Structure and union declarations*/
typedef struct colourpicker_colour colourpicker_colour;
typedef struct colourpicker_dialogue colourpicker_dialogue;
typedef struct colourpicker_model colourpicker_model;
typedef struct colourpicker_message_colour_choice colourpicker_message_colour_choice;
typedef struct colourpicker_message_colour_changed colourpicker_message_colour_changed;
typedef struct colourpicker_message_open_parent_request colourpicker_message_open_parent_request;
typedef struct colourpicker_message_close_dialogue_request colourpicker_message_close_dialogue_request;

/*Type definitions*/
typedef void *(colourpicker_d);

struct colourpicker_colour
   {  int colour;
      int size;
      int (info) [1];
   };

struct colourpicker_dialogue
   {  int flags;
      char *(title);
      wimp_box visible;
      int xscroll;
      int yscroll;
      int colour;
      int size;
      int (info) [1];
   };

struct colourpicker_model
   {  int flags;
      char *(name);
      char *(description);
      int info_size;
      coords_pointstr pane_size;
      void *((entries) [8]);
   };

struct colourpicker_message_colour_choice
   {  colourpicker_d d;
      int flags;
      int colour;
      int size;
      int (info) [1];
   };

struct colourpicker_message_colour_changed
   {  colourpicker_d d;
      int flags;
      int colour;
      int size;
      int (info) [1];
   };

struct colourpicker_message_open_parent_request
   {  colourpicker_d d;
   };

struct colourpicker_message_close_dialogue_request
   {  colourpicker_d d;
   };

/*Constant definitions*/
#define colourpicker_ERROR_UNINIT 134400
#define colourpicker_ERROR_BAD_MODEL 134401
#define colourpicker_ERROR_BAD_HANDLE 134402
#define colourpicker_ERROR_BAD_FLAGS 134403
#define colourpicker_ERROR_IN_USE 134404
#define colourpicker_ERROR_MODEL_IN_USE 134405
#define colourpicker_ERROR_BAD_REASON 134406
#define colourpicker_DIALOGUE_OFFERS_TRANSPARENT ((int) 0x1u)
#define colourpicker_DIALOGUE_TRANSPARENT ((int) 0x2u)
#define colourpicker_DIALOGUE_TYPE ((int) 0xCu)
#define colourpicker_DIALOGUE_TYPE_SHIFT 2
#define colourpicker_DIALOGUE_TYPE_ONCE 0
#define colourpicker_DIALOGUE_TYPE_CLICK 1
#define colourpicker_DIALOGUE_TYPE_CLICK_DRAG 2
#define colourpicker_DIALOGUE_IGNORE_HELP ((int) 0x10u)
#define colourpicker_OPEN_TRANSIENT ((int) 0x1u)
#define colourpicker_OPEN_SUB_MENU ((int) 0x2u)
#define colourpicker_OPEN_TOOLBOX ((int) 0x2u)
#define colourpicker_UPDATE_OFFERS_TRANSPARENT ((int) 0x1u)
#define colourpicker_UPDATE_TRANSPARENT ((int) 0x2u)
#define colourpicker_UPDATE_TYPE ((int) 0x4u)
#define colourpicker_UPDATE_VISIBLE ((int) 0x8u)
#define colourpicker_UPDATE_SCROLL ((int) 0x10u)
#define colourpicker_UPDATE_TITLE ((int) 0x20u)
#define colourpicker_UPDATE_COLOUR ((int) 0x40u)
#define colourpicker_UPDATE_MODEL ((int) 0x80u)
#define colourpicker_COLOUR_TRANSPARENT ((int) 0x1u)
#define colourpicker_COLOUR_DRAGGING ((int) 0x2u)
#define colourpicker_ENTRY_DIALOGUE_STARTING 0
#define colourpicker_ENTRY_DIALOGUE_FINISHING 1
#define colourpicker_ENTRY_REDRAW_AREA 2
#define colourpicker_ENTRY_UPDATE_AREA 3
#define colourpicker_ENTRY_READ_VALUES 4
#define colourpicker_ENTRY_SET_VALUES 5
#define colourpicker_ENTRY_PROCESS_EVENT 6
#define colourpicker_ENTRY_SET_COLOUR 7
#define colourpicker_ENTRY_LIMIT 8
#define colourpicker_MODEL_SIZE_RGB 16
#define colourpicker_MODEL_SIZE_CMYK 20
#define colourpicker_MODEL_SIZE_HSV 16
#define colourpicker_MODEL_RGB 0
#define colourpicker_MODEL_CMYK 1
#define colourpicker_MODEL_HSV 2
#define message_COLOUR_PICKER_COLOUR_CHOICE 292608
#define message_COLOUR_PICKER_COLOUR_CHANGED 292609
#define message_COLOUR_PICKER_CLOSE_DIALOGUE_REQUEST 292610
#define message_COLOUR_PICKER_OPEN_PARENT_REQUEST 292611

#endif